Henrywood and Agarwal, Equation (13)

Percentage Accurate: 24.0% → 62.2%
Time: 26.4s
Alternatives: 19
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 19 alternatives:

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

Initial Program: 24.0% accurate, 1.0× speedup?

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

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

Alternative 1: 62.2% accurate, 0.8× speedup?

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

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


\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 68.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. 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{\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot d}{\color{blue}{D \cdot D}}\right)\right) \]
      2. associate-/r*N/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot d}{D}\right), \color{blue}{D}\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(\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot d\right), D\right), D\right)\right) \]
      5. associate-*r/N/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 \frac{d}{w}\right)}{h} \cdot d\right), D\right), D\right)\right) \]
      6. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right) \cdot d}{h}\right), D\right), D\right)\right) \]
      7. /-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(\left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right) \cdot d\right), h\right), D\right), D\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(\mathsf{*.f64}\left(\left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right), d\right), h\right), D\right), D\right)\right) \]
      9. associate-*r/N/A

        \[\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(\left(2 \cdot \frac{c0 \cdot d}{w}\right), d\right), h\right), D\right), D\right)\right) \]
      10. clear-numN/A

        \[\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(\left(2 \cdot \frac{1}{\frac{w}{c0 \cdot d}}\right), d\right), h\right), D\right), D\right)\right) \]
      11. un-div-invN/A

        \[\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(\left(\frac{2}{\frac{w}{c0 \cdot d}}\right), d\right), h\right), D\right), D\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(\mathsf{/.f64}\left(2, \left(\frac{w}{c0 \cdot d}\right)\right), d\right), h\right), D\right), D\right)\right) \]
      13. /-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(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(w, \left(c0 \cdot d\right)\right)\right), d\right), h\right), D\right), D\right)\right) \]
      14. *-lowering-*.f6475.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(\mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \mathsf{/.f64}\left(w, \mathsf{*.f64}\left(c0, d\right)\right)\right), d\right), h\right), D\right), D\right)\right) \]
    9. Applied egg-rr75.1%

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

        \[\leadsto \frac{\frac{c0}{2 \cdot w} \cdot \frac{\frac{\frac{2}{\frac{w}{c0 \cdot d}} \cdot d}{h}}{D}}{\color{blue}{D}} \]
      2. div-invN/A

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

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

      \[\leadsto \color{blue}{\left(\frac{0.5}{\frac{w}{c0}} \cdot \frac{\frac{2 \cdot \frac{d}{\frac{w}{c0}}}{D}}{\frac{h}{d}}\right) \cdot \frac{1}{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. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified0.1%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified20.3%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 38.1% accurate, 3.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{if}\;w \leq -2.1 \cdot 10^{+229}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;w \leq -1.75 \cdot 10^{-85}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)\\ \mathbf{elif}\;w \leq -1.05 \cdot 10^{-111}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;w \leq -4.2 \cdot 10^{-208}:\\ \;\;\;\;\frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{D \cdot \left(D \cdot \left(h \cdot \left(w \cdot w\right)\right)\right)}\\ \mathbf{elif}\;w \leq 7.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot D\right)}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (* (* D 0.25) (* (* M M) (* h D))) (* d d))))
   (if (<= w -2.1e+229)
     t_0
     (if (<= w -1.75e-85)
       (* (/ c0 (* 2.0 w)) (* (* 2.0 (/ (* c0 (/ d w)) h)) (/ d (* D D))))
       (if (<= w -1.05e-111)
         t_0
         (if (<= w -4.2e-208)
           (/ (* c0 (* c0 (* d d))) (* D (* D (* h (* w w)))))
           (if (<= w 7.8e-119)
             (/ (* D (* D (* (* h (* M M)) 0.25))) (* d d))
             (* (/ (/ (* d (* c0 d)) w) D) (/ c0 (* w (* h D)))))))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = ((D * 0.25) * ((M * M) * (h * D))) / (d * d);
	double tmp;
	if (w <= -2.1e+229) {
		tmp = t_0;
	} else if (w <= -1.75e-85) {
		tmp = (c0 / (2.0 * w)) * ((2.0 * ((c0 * (d / w)) / h)) * (d / (D * D)));
	} else if (w <= -1.05e-111) {
		tmp = t_0;
	} else if (w <= -4.2e-208) {
		tmp = (c0 * (c0 * (d * d))) / (D * (D * (h * (w * w))));
	} else if (w <= 7.8e-119) {
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	} else {
		tmp = (((d * (c0 * d)) / w) / D) * (c0 / (w * (h * 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 * 0.25d0) * ((m * m) * (h * d))) / (d_1 * d_1)
    if (w <= (-2.1d+229)) then
        tmp = t_0
    else if (w <= (-1.75d-85)) then
        tmp = (c0 / (2.0d0 * w)) * ((2.0d0 * ((c0 * (d_1 / w)) / h)) * (d_1 / (d * d)))
    else if (w <= (-1.05d-111)) then
        tmp = t_0
    else if (w <= (-4.2d-208)) then
        tmp = (c0 * (c0 * (d_1 * d_1))) / (d * (d * (h * (w * w))))
    else if (w <= 7.8d-119) then
        tmp = (d * (d * ((h * (m * m)) * 0.25d0))) / (d_1 * d_1)
    else
        tmp = (((d_1 * (c0 * d_1)) / w) / d) * (c0 / (w * (h * 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 * 0.25) * ((M * M) * (h * D))) / (d * d);
	double tmp;
	if (w <= -2.1e+229) {
		tmp = t_0;
	} else if (w <= -1.75e-85) {
		tmp = (c0 / (2.0 * w)) * ((2.0 * ((c0 * (d / w)) / h)) * (d / (D * D)));
	} else if (w <= -1.05e-111) {
		tmp = t_0;
	} else if (w <= -4.2e-208) {
		tmp = (c0 * (c0 * (d * d))) / (D * (D * (h * (w * w))));
	} else if (w <= 7.8e-119) {
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	} else {
		tmp = (((d * (c0 * d)) / w) / D) * (c0 / (w * (h * D)));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = ((D * 0.25) * ((M * M) * (h * D))) / (d * d)
	tmp = 0
	if w <= -2.1e+229:
		tmp = t_0
	elif w <= -1.75e-85:
		tmp = (c0 / (2.0 * w)) * ((2.0 * ((c0 * (d / w)) / h)) * (d / (D * D)))
	elif w <= -1.05e-111:
		tmp = t_0
	elif w <= -4.2e-208:
		tmp = (c0 * (c0 * (d * d))) / (D * (D * (h * (w * w))))
	elif w <= 7.8e-119:
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d)
	else:
		tmp = (((d * (c0 * d)) / w) / D) * (c0 / (w * (h * D)))
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(Float64(D * 0.25) * Float64(Float64(M * M) * Float64(h * D))) / Float64(d * d))
	tmp = 0.0
	if (w <= -2.1e+229)
		tmp = t_0;
	elseif (w <= -1.75e-85)
		tmp = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(Float64(2.0 * Float64(Float64(c0 * Float64(d / w)) / h)) * Float64(d / Float64(D * D))));
	elseif (w <= -1.05e-111)
		tmp = t_0;
	elseif (w <= -4.2e-208)
		tmp = Float64(Float64(c0 * Float64(c0 * Float64(d * d))) / Float64(D * Float64(D * Float64(h * Float64(w * w)))));
	elseif (w <= 7.8e-119)
		tmp = Float64(Float64(D * Float64(D * Float64(Float64(h * Float64(M * M)) * 0.25))) / Float64(d * d));
	else
		tmp = Float64(Float64(Float64(Float64(d * Float64(c0 * d)) / w) / D) * Float64(c0 / Float64(w * Float64(h * D))));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = ((D * 0.25) * ((M * M) * (h * D))) / (d * d);
	tmp = 0.0;
	if (w <= -2.1e+229)
		tmp = t_0;
	elseif (w <= -1.75e-85)
		tmp = (c0 / (2.0 * w)) * ((2.0 * ((c0 * (d / w)) / h)) * (d / (D * D)));
	elseif (w <= -1.05e-111)
		tmp = t_0;
	elseif (w <= -4.2e-208)
		tmp = (c0 * (c0 * (d * d))) / (D * (D * (h * (w * w))));
	elseif (w <= 7.8e-119)
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	else
		tmp = (((d * (c0 * d)) / w) / D) * (c0 / (w * (h * D)));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(N[(D * 0.25), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[w, -2.1e+229], t$95$0, If[LessEqual[w, -1.75e-85], N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[(N[(c0 * N[(d / w), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision] * N[(d / N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[w, -1.05e-111], t$95$0, If[LessEqual[w, -4.2e-208], N[(N[(c0 * N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(D * N[(D * N[(h * N[(w * w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[w, 7.8e-119], N[(N[(D * N[(D * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(d * N[(c0 * d), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision] / D), $MachinePrecision] * N[(c0 / N[(w * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;w \leq -1.05 \cdot 10^{-111}:\\
\;\;\;\;t\_0\\

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

\mathbf{elif}\;w \leq 7.8 \cdot 10^{-119}:\\
\;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if w < -2.09999999999999988e229 or -1.74999999999999989e-85 < w < -1.0499999999999999e-111

    1. Initial program 0.8%

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

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified0.8%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified20.8%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      5. associate-*r*N/A

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

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

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

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

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

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

    if -2.09999999999999988e229 < w < -1.74999999999999989e-85

    1. Initial program 33.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

    if -1.0499999999999999e-111 < w < -4.20000000000000024e-208

    1. Initial program 44.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000024e-208 < w < 7.7999999999999998e-119

    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. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified15.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified19.5%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Taylor expanded in D 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.7999999999999998e-119 < w

    1. Initial program 26.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -2.1 \cdot 10^{+229}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{elif}\;w \leq -1.75 \cdot 10^{-85}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)\\ \mathbf{elif}\;w \leq -1.05 \cdot 10^{-111}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{elif}\;w \leq -4.2 \cdot 10^{-208}:\\ \;\;\;\;\frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{D \cdot \left(D \cdot \left(h \cdot \left(w \cdot w\right)\right)\right)}\\ \mathbf{elif}\;w \leq 7.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot D\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 41.5% accurate, 3.7× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{d}{w \cdot h}\\
t_1 := \frac{c0}{2 \cdot w}\\
\mathbf{if}\;w \leq -1.25 \cdot 10^{-214}:\\
\;\;\;\;t\_1 \cdot \frac{\frac{2 \cdot \left(c0 \cdot t\_0\right)}{\frac{D}{d}}}{D}\\

\mathbf{elif}\;w \leq 3.8 \cdot 10^{-119}:\\
\;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\

\mathbf{elif}\;w \leq 1.75 \cdot 10^{+30}:\\
\;\;\;\;t\_1 \cdot \left(\frac{c0 \cdot 2}{D} \cdot \frac{t\_0}{\frac{D}{d}}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if w < -1.2499999999999999e-214

    1. Initial program 30.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. 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(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{\color{blue}{D}}\right)\right) \]
      2. associate-*r/N/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}}{\frac{D}{d}}\right), D\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(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      7. *-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(2, \left(\frac{c0 \cdot \frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot \frac{\frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \left(\frac{\frac{d}{w}}{h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      10. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{h \cdot w}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      11. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{w \cdot h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \left(w \cdot h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      13. *-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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      14. /-lowering-/.f6454.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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
    9. Applied egg-rr54.8%

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

    if -1.2499999999999999e-214 < w < 3.79999999999999975e-119

    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. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified15.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified19.5%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Taylor expanded in D 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.79999999999999975e-119 < w < 1.75000000000000011e30

    1. Initial program 23.6%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. 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(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{\color{blue}{D}}\right)\right) \]
      2. associate-*r/N/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}}{\frac{D}{d}}\right), D\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(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      7. *-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(2, \left(\frac{c0 \cdot \frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot \frac{\frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \left(\frac{\frac{d}{w}}{h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      10. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{h \cdot w}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      11. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{w \cdot h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \left(w \cdot h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      13. *-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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      14. /-lowering-/.f6461.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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
    9. Applied egg-rr61.4%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{2 \cdot c0}{D} \cdot \color{blue}{\frac{\frac{d}{w \cdot h}}{\frac{D}{d}}}\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{2 \cdot c0}{D}\right), \color{blue}{\left(\frac{\frac{d}{w \cdot h}}{\frac{D}{d}}\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(\mathsf{/.f64}\left(\left(2 \cdot c0\right), D\right), \left(\frac{\color{blue}{\frac{d}{w \cdot h}}}{\frac{D}{d}}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot 2\right), D\right), \left(\frac{\frac{\color{blue}{d}}{w \cdot h}}{\frac{D}{d}}\right)\right)\right) \]
      7. *-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(c0, 2\right), D\right), \left(\frac{\frac{\color{blue}{d}}{w \cdot h}}{\frac{D}{d}}\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(c0, 2\right), D\right), \mathsf{/.f64}\left(\left(\frac{d}{w \cdot h}\right), \color{blue}{\left(\frac{D}{d}\right)}\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(c0, 2\right), D\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \left(w \cdot h\right)\right), \left(\frac{\color{blue}{D}}{d}\right)\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(c0, 2\right), D\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right), \left(\frac{D}{d}\right)\right)\right)\right) \]
      11. /-lowering-/.f6461.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(c0, 2\right), D\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right), \mathsf{/.f64}\left(D, \color{blue}{d}\right)\right)\right)\right) \]
    11. Applied egg-rr61.5%

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

    if 1.75000000000000011e30 < w < 1.4999999999999999e41

    1. Initial program 33.3%

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

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified16.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified83.8%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4999999999999999e41 < w

    1. Initial program 28.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\frac{d}{D}}{D} \cdot \left(\color{blue}{2} \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right)\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{d}{D}}{D} \cdot \frac{2 \cdot \left(c0 \cdot \frac{d}{w}\right)}{\color{blue}{h}}\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\frac{d}{D} \cdot \left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right)}{\color{blue}{D \cdot h}}\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(\frac{d}{D} \cdot \left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right)\right), \color{blue}{\left(D \cdot h\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(\left(\frac{d}{D}\right), \left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right)\right), \left(\color{blue}{D} \cdot h\right)\right)\right) \]
      7. /-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(d, D\right), \left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right)\right), \left(D \cdot h\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(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, D\right), \left(2 \cdot \frac{c0 \cdot d}{w}\right)\right), \left(D \cdot h\right)\right)\right) \]
      9. clear-numN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, D\right), \left(\frac{2}{\frac{w}{c0 \cdot d}}\right)\right), \left(D \cdot h\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(d, D\right), \mathsf{/.f64}\left(2, \left(\frac{w}{c0 \cdot d}\right)\right)\right), \left(D \cdot h\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(d, D\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(w, \left(c0 \cdot d\right)\right)\right)\right), \left(D \cdot h\right)\right)\right) \]
      13. *-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(d, D\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(w, \mathsf{*.f64}\left(c0, d\right)\right)\right)\right), \left(D \cdot h\right)\right)\right) \]
      14. *-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(d, D\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(w, \mathsf{*.f64}\left(c0, d\right)\right)\right)\right), \left(h \cdot \color{blue}{D}\right)\right)\right) \]
      15. *-lowering-*.f6455.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(d, D\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(w, \mathsf{*.f64}\left(c0, d\right)\right)\right)\right), \mathsf{*.f64}\left(h, \color{blue}{D}\right)\right)\right) \]
    9. Applied egg-rr55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -1.25 \cdot 10^{-214}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \frac{\frac{2 \cdot \left(c0 \cdot \frac{d}{w \cdot h}\right)}{\frac{D}{d}}}{D}\\ \mathbf{elif}\;w \leq 3.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{elif}\;w \leq 1.75 \cdot 10^{+30}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot 2}{D} \cdot \frac{\frac{d}{w \cdot h}}{\frac{D}{d}}\right)\\ \mathbf{elif}\;w \leq 1.5 \cdot 10^{+41}:\\ \;\;\;\;\frac{0.25 \cdot \left(\left(h \cdot M\right) \cdot \left(\left(D \cdot D\right) \cdot M\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \frac{\frac{d}{D} \cdot \frac{2}{\frac{w}{c0 \cdot d}}}{h \cdot D}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 41.6% accurate, 3.7× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{d}{w \cdot h}\\
t_1 := \frac{c0}{2 \cdot w}\\
\mathbf{if}\;w \leq -1.25 \cdot 10^{-214}:\\
\;\;\;\;t\_1 \cdot \left(\frac{d}{D} \cdot \frac{2 \cdot \left(c0 \cdot t\_0\right)}{D}\right)\\

\mathbf{elif}\;w \leq 3.9 \cdot 10^{-119}:\\
\;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\

\mathbf{elif}\;w \leq 10^{+30}:\\
\;\;\;\;t\_1 \cdot \left(\frac{c0 \cdot 2}{D} \cdot \frac{t\_0}{\frac{D}{d}}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if w < -1.2499999999999999e-214

    1. Initial program 30.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}}{D}\right), \color{blue}{\left(\frac{d}{D}\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(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right), D\right), \left(\frac{\color{blue}{d}}{D}\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot \frac{d}{w}}{h}\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot \frac{\frac{d}{w}}{h}\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      7. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{\frac{d}{w}}{h}\right)\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{h \cdot w}\right)\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      9. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{w \cdot h}\right)\right)\right), D\right), \left(\frac{d}{D}\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \left(w \cdot h\right)\right)\right)\right), D\right), \left(\frac{d}{D}\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      12. /-lowering-/.f6453.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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), D\right), \mathsf{/.f64}\left(d, \color{blue}{D}\right)\right)\right) \]
    9. Applied egg-rr53.8%

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

    if -1.2499999999999999e-214 < w < 3.8999999999999999e-119

    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. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified15.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified19.5%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Taylor expanded in D 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8999999999999999e-119 < w < 1e30

    1. Initial program 23.6%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. 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(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{\color{blue}{D}}\right)\right) \]
      2. associate-*r/N/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}}{\frac{D}{d}}\right), D\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(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      7. *-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(2, \left(\frac{c0 \cdot \frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot \frac{\frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \left(\frac{\frac{d}{w}}{h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      10. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{h \cdot w}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      11. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{w \cdot h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \left(w \cdot h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      13. *-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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      14. /-lowering-/.f6461.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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
    9. Applied egg-rr61.4%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{2 \cdot c0}{D} \cdot \color{blue}{\frac{\frac{d}{w \cdot h}}{\frac{D}{d}}}\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{2 \cdot c0}{D}\right), \color{blue}{\left(\frac{\frac{d}{w \cdot h}}{\frac{D}{d}}\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(\mathsf{/.f64}\left(\left(2 \cdot c0\right), D\right), \left(\frac{\color{blue}{\frac{d}{w \cdot h}}}{\frac{D}{d}}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot 2\right), D\right), \left(\frac{\frac{\color{blue}{d}}{w \cdot h}}{\frac{D}{d}}\right)\right)\right) \]
      7. *-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(c0, 2\right), D\right), \left(\frac{\frac{\color{blue}{d}}{w \cdot h}}{\frac{D}{d}}\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(c0, 2\right), D\right), \mathsf{/.f64}\left(\left(\frac{d}{w \cdot h}\right), \color{blue}{\left(\frac{D}{d}\right)}\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(c0, 2\right), D\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \left(w \cdot h\right)\right), \left(\frac{\color{blue}{D}}{d}\right)\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(c0, 2\right), D\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right), \left(\frac{D}{d}\right)\right)\right)\right) \]
      11. /-lowering-/.f6461.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(c0, 2\right), D\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right), \mathsf{/.f64}\left(D, \color{blue}{d}\right)\right)\right)\right) \]
    11. Applied egg-rr61.5%

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

    if 1e30 < w < 3.40000000000000012e43

    1. Initial program 33.3%

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

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified16.9%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified83.8%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.40000000000000012e43 < w

    1. Initial program 28.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\frac{d}{D}}{D} \cdot \left(\color{blue}{2} \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right)\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{d}{D}}{D} \cdot \frac{2 \cdot \left(c0 \cdot \frac{d}{w}\right)}{\color{blue}{h}}\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\frac{d}{D} \cdot \left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right)}{\color{blue}{D \cdot h}}\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(\frac{d}{D} \cdot \left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right)\right), \color{blue}{\left(D \cdot h\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(\left(\frac{d}{D}\right), \left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right)\right), \left(\color{blue}{D} \cdot h\right)\right)\right) \]
      7. /-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(d, D\right), \left(2 \cdot \left(c0 \cdot \frac{d}{w}\right)\right)\right), \left(D \cdot h\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(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, D\right), \left(2 \cdot \frac{c0 \cdot d}{w}\right)\right), \left(D \cdot h\right)\right)\right) \]
      9. clear-numN/A

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, D\right), \left(\frac{2}{\frac{w}{c0 \cdot d}}\right)\right), \left(D \cdot h\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(d, D\right), \mathsf{/.f64}\left(2, \left(\frac{w}{c0 \cdot d}\right)\right)\right), \left(D \cdot h\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(d, D\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(w, \left(c0 \cdot d\right)\right)\right)\right), \left(D \cdot h\right)\right)\right) \]
      13. *-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(d, D\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(w, \mathsf{*.f64}\left(c0, d\right)\right)\right)\right), \left(D \cdot h\right)\right)\right) \]
      14. *-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(d, D\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(w, \mathsf{*.f64}\left(c0, d\right)\right)\right)\right), \left(h \cdot \color{blue}{D}\right)\right)\right) \]
      15. *-lowering-*.f6455.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(d, D\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(w, \mathsf{*.f64}\left(c0, d\right)\right)\right)\right), \mathsf{*.f64}\left(h, \color{blue}{D}\right)\right)\right) \]
    9. Applied egg-rr55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -1.25 \cdot 10^{-214}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{2 \cdot \left(c0 \cdot \frac{d}{w \cdot h}\right)}{D}\right)\\ \mathbf{elif}\;w \leq 3.9 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{elif}\;w \leq 10^{+30}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot 2}{D} \cdot \frac{\frac{d}{w \cdot h}}{\frac{D}{d}}\right)\\ \mathbf{elif}\;w \leq 3.4 \cdot 10^{+43}:\\ \;\;\;\;\frac{0.25 \cdot \left(\left(h \cdot M\right) \cdot \left(\left(D \cdot D\right) \cdot M\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \frac{\frac{d}{D} \cdot \frac{2}{\frac{w}{c0 \cdot d}}}{h \cdot D}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 44.6% accurate, 3.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c0}{2 \cdot w} \cdot \left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{D}\right)\\ \mathbf{if}\;d \leq 7.5 \cdot 10^{-109}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;d \leq 1.75 \cdot 10^{-67}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-11}:\\ \;\;\;\;\frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{w \cdot \left(h \cdot D\right)} \cdot \frac{c0}{D}\\ \mathbf{elif}\;d \leq 4.5 \cdot 10^{+161}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0
         (* (/ c0 (* 2.0 w)) (* (* 2.0 (/ (* c0 (/ d w)) h)) (/ (/ d D) D)))))
   (if (<= d 7.5e-109)
     t_0
     (if (<= d 1.75e-67)
       (/ (* D (* D (* (* h (* M M)) 0.25))) (* d d))
       (if (<= d 1.55e-11)
         (* (/ (/ (* d (* c0 d)) w) (* w (* h D))) (/ c0 D))
         (if (<= d 4.5e+161)
           (/ (* (* D 0.25) (* (* M M) (* h D))) (* d d))
           t_0))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 / (2.0 * w)) * ((2.0 * ((c0 * (d / w)) / h)) * ((d / D) / D));
	double tmp;
	if (d <= 7.5e-109) {
		tmp = t_0;
	} else if (d <= 1.75e-67) {
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	} else if (d <= 1.55e-11) {
		tmp = (((d * (c0 * d)) / w) / (w * (h * D))) * (c0 / D);
	} else if (d <= 4.5e+161) {
		tmp = ((D * 0.25) * ((M * M) * (h * 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 = (c0 / (2.0d0 * w)) * ((2.0d0 * ((c0 * (d_1 / w)) / h)) * ((d_1 / d) / d))
    if (d_1 <= 7.5d-109) then
        tmp = t_0
    else if (d_1 <= 1.75d-67) then
        tmp = (d * (d * ((h * (m * m)) * 0.25d0))) / (d_1 * d_1)
    else if (d_1 <= 1.55d-11) then
        tmp = (((d_1 * (c0 * d_1)) / w) / (w * (h * d))) * (c0 / d)
    else if (d_1 <= 4.5d+161) then
        tmp = ((d * 0.25d0) * ((m * m) * (h * d))) / (d_1 * d_1)
    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 = (c0 / (2.0 * w)) * ((2.0 * ((c0 * (d / w)) / h)) * ((d / D) / D));
	double tmp;
	if (d <= 7.5e-109) {
		tmp = t_0;
	} else if (d <= 1.75e-67) {
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	} else if (d <= 1.55e-11) {
		tmp = (((d * (c0 * d)) / w) / (w * (h * D))) * (c0 / D);
	} else if (d <= 4.5e+161) {
		tmp = ((D * 0.25) * ((M * M) * (h * D))) / (d * d);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (c0 / (2.0 * w)) * ((2.0 * ((c0 * (d / w)) / h)) * ((d / D) / D))
	tmp = 0
	if d <= 7.5e-109:
		tmp = t_0
	elif d <= 1.75e-67:
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d)
	elif d <= 1.55e-11:
		tmp = (((d * (c0 * d)) / w) / (w * (h * D))) * (c0 / D)
	elif d <= 4.5e+161:
		tmp = ((D * 0.25) * ((M * M) * (h * D))) / (d * d)
	else:
		tmp = t_0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(Float64(2.0 * Float64(Float64(c0 * Float64(d / w)) / h)) * Float64(Float64(d / D) / D)))
	tmp = 0.0
	if (d <= 7.5e-109)
		tmp = t_0;
	elseif (d <= 1.75e-67)
		tmp = Float64(Float64(D * Float64(D * Float64(Float64(h * Float64(M * M)) * 0.25))) / Float64(d * d));
	elseif (d <= 1.55e-11)
		tmp = Float64(Float64(Float64(Float64(d * Float64(c0 * d)) / w) / Float64(w * Float64(h * D))) * Float64(c0 / D));
	elseif (d <= 4.5e+161)
		tmp = Float64(Float64(Float64(D * 0.25) * Float64(Float64(M * M) * Float64(h * D))) / Float64(d * d));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (c0 / (2.0 * w)) * ((2.0 * ((c0 * (d / w)) / h)) * ((d / D) / D));
	tmp = 0.0;
	if (d <= 7.5e-109)
		tmp = t_0;
	elseif (d <= 1.75e-67)
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	elseif (d <= 1.55e-11)
		tmp = (((d * (c0 * d)) / w) / (w * (h * D))) * (c0 / D);
	elseif (d <= 4.5e+161)
		tmp = ((D * 0.25) * ((M * M) * (h * 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[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[(N[(c0 * N[(d / w), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision] * N[(N[(d / D), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, 7.5e-109], t$95$0, If[LessEqual[d, 1.75e-67], N[(N[(D * N[(D * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.55e-11], N[(N[(N[(N[(d * N[(c0 * d), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision] / N[(w * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(c0 / D), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.5e+161], N[(N[(N[(D * 0.25), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{c0}{2 \cdot w} \cdot \left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{D}\right)\\
\mathbf{if}\;d \leq 7.5 \cdot 10^{-109}:\\
\;\;\;\;t\_0\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < 7.49999999999999982e-109 or 4.49999999999999992e161 < d

    1. Initial program 25.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. 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(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{\frac{d}{D}}{\color{blue}{D}}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(\left(\frac{d}{D}\right), \color{blue}{D}\right)\right)\right) \]
      3. /-lowering-/.f6448.6%

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

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

    if 7.49999999999999982e-109 < d < 1.75e-67

    1. Initial program 1.9%

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

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified0.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified1.9%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Taylor expanded in D 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75e-67 < d < 1.55000000000000014e-11

    1. Initial program 55.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.55000000000000014e-11 < d < 4.49999999999999992e161

    1. Initial program 16.0%

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

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified11.7%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified18.8%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      5. associate-*r*N/A

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 7.5 \cdot 10^{-109}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{D}\right)\\ \mathbf{elif}\;d \leq 1.75 \cdot 10^{-67}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-11}:\\ \;\;\;\;\frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{w \cdot \left(h \cdot D\right)} \cdot \frac{c0}{D}\\ \mathbf{elif}\;d \leq 4.5 \cdot 10^{+161}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{D}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 41.3% accurate, 4.1× speedup?

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

\\
\begin{array}{l}
t_0 := h \cdot \left(M \cdot M\right)\\
t_1 := \frac{d}{w \cdot h}\\
t_2 := \frac{c0}{2 \cdot w}\\
\mathbf{if}\;w \leq -3.8 \cdot 10^{-215}:\\
\;\;\;\;t\_2 \cdot \left(\frac{d}{D} \cdot \frac{2 \cdot \left(c0 \cdot t\_1\right)}{D}\right)\\

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

\mathbf{elif}\;w \leq 1.45 \cdot 10^{+30}:\\
\;\;\;\;t\_2 \cdot \left(\frac{c0 \cdot 2}{D} \cdot \frac{t\_1}{\frac{D}{d}}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if w < -3.79999999999999977e-215

    1. Initial program 30.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}}{D}\right), \color{blue}{\left(\frac{d}{D}\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(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right), D\right), \left(\frac{\color{blue}{d}}{D}\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot \frac{d}{w}}{h}\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot \frac{\frac{d}{w}}{h}\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      7. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{\frac{d}{w}}{h}\right)\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{h \cdot w}\right)\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      9. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{w \cdot h}\right)\right)\right), D\right), \left(\frac{d}{D}\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \left(w \cdot h\right)\right)\right)\right), D\right), \left(\frac{d}{D}\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      12. /-lowering-/.f6453.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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), D\right), \mathsf{/.f64}\left(d, \color{blue}{D}\right)\right)\right) \]
    9. Applied egg-rr53.8%

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

    if -3.79999999999999977e-215 < w < 4.30000000000000018e-118

    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. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified15.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified19.5%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Taylor expanded in D 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.30000000000000018e-118 < w < 1.4499999999999999e30

    1. Initial program 23.6%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. 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(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{\color{blue}{D}}\right)\right) \]
      2. associate-*r/N/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}}{\frac{D}{d}}\right), D\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(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      7. *-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(2, \left(\frac{c0 \cdot \frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot \frac{\frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \left(\frac{\frac{d}{w}}{h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      10. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{h \cdot w}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      11. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{w \cdot h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \left(w \cdot h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      13. *-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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      14. /-lowering-/.f6461.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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
    9. Applied egg-rr61.4%

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{2 \cdot c0}{D} \cdot \color{blue}{\frac{\frac{d}{w \cdot h}}{\frac{D}{d}}}\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{2 \cdot c0}{D}\right), \color{blue}{\left(\frac{\frac{d}{w \cdot h}}{\frac{D}{d}}\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(\mathsf{/.f64}\left(\left(2 \cdot c0\right), D\right), \left(\frac{\color{blue}{\frac{d}{w \cdot h}}}{\frac{D}{d}}\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(c0 \cdot 2\right), D\right), \left(\frac{\frac{\color{blue}{d}}{w \cdot h}}{\frac{D}{d}}\right)\right)\right) \]
      7. *-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(c0, 2\right), D\right), \left(\frac{\frac{\color{blue}{d}}{w \cdot h}}{\frac{D}{d}}\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(c0, 2\right), D\right), \mathsf{/.f64}\left(\left(\frac{d}{w \cdot h}\right), \color{blue}{\left(\frac{D}{d}\right)}\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(c0, 2\right), D\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \left(w \cdot h\right)\right), \left(\frac{\color{blue}{D}}{d}\right)\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(c0, 2\right), D\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right), \left(\frac{D}{d}\right)\right)\right)\right) \]
      11. /-lowering-/.f6461.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(c0, 2\right), D\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right), \mathsf{/.f64}\left(D, \color{blue}{d}\right)\right)\right)\right) \]
    11. Applied egg-rr61.5%

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

    if 1.4499999999999999e30 < w < 1.09999999999999989e99

    1. Initial program 34.1%

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

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified21.1%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified53.8%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.09999999999999989e99 < w

    1. Initial program 25.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -3.8 \cdot 10^{-215}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{2 \cdot \left(c0 \cdot \frac{d}{w \cdot h}\right)}{D}\right)\\ \mathbf{elif}\;w \leq 4.3 \cdot 10^{-118}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{elif}\;w \leq 1.45 \cdot 10^{+30}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot 2}{D} \cdot \frac{\frac{d}{w \cdot h}}{\frac{D}{d}}\right)\\ \mathbf{elif}\;w \leq 1.1 \cdot 10^{+99}:\\ \;\;\;\;\frac{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\frac{d}{0.25}}}{d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot D\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 41.6% accurate, 4.1× speedup?

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

\\
\begin{array}{l}
t_0 := h \cdot \left(M \cdot M\right)\\
t_1 := \frac{c0}{2 \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{2 \cdot \left(c0 \cdot \frac{d}{w \cdot h}\right)}{D}\right)\\
\mathbf{if}\;w \leq -4.6 \cdot 10^{-214}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;w \leq 4 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if w < -4.60000000000000022e-214 or 7.7999999999999998e-119 < w < 3.99999999999999966e29

    1. Initial program 29.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\left(\frac{2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}}{D}\right), \color{blue}{\left(\frac{d}{D}\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(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right), D\right), \left(\frac{\color{blue}{d}}{D}\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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot \frac{d}{w}}{h}\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot \frac{\frac{d}{w}}{h}\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      7. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{\frac{d}{w}}{h}\right)\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      8. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{h \cdot w}\right)\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      9. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{w \cdot h}\right)\right)\right), D\right), \left(\frac{d}{D}\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \left(w \cdot h\right)\right)\right)\right), D\right), \left(\frac{d}{D}\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), D\right), \left(\frac{d}{D}\right)\right)\right) \]
      12. /-lowering-/.f6455.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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), D\right), \mathsf{/.f64}\left(d, \color{blue}{D}\right)\right)\right) \]
    9. Applied egg-rr55.7%

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

    if -4.60000000000000022e-214 < w < 7.7999999999999998e-119

    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. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified15.0%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified19.5%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Taylor expanded in D 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999966e29 < w < 3.10000000000000019e98

    1. Initial program 34.1%

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

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified21.1%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified53.8%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.10000000000000019e98 < w

    1. Initial program 25.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -4.6 \cdot 10^{-214}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{2 \cdot \left(c0 \cdot \frac{d}{w \cdot h}\right)}{D}\right)\\ \mathbf{elif}\;w \leq 7.8 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{elif}\;w \leq 4 \cdot 10^{+29}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{d}{D} \cdot \frac{2 \cdot \left(c0 \cdot \frac{d}{w \cdot h}\right)}{D}\right)\\ \mathbf{elif}\;w \leq 3.1 \cdot 10^{+98}:\\ \;\;\;\;\frac{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\frac{d}{0.25}}}{d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot D\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 42.7% accurate, 4.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < 5.50000000000000046e-54

    1. Initial program 24.2%

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

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified22.6%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified12.8%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.50000000000000046e-54 < d < 3.49999999999999975e49

    1. Initial program 39.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.49999999999999975e49 < d < 4.8000000000000003e160

    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. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified9.3%

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

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified21.5%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6438.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified38.7%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\left(D \cdot h\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\left(h \cdot D\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      9. *-lowering-*.f6455.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
    12. Applied egg-rr55.9%

      \[\leadsto \frac{\color{blue}{\left(0.25 \cdot D\right) \cdot \left(\left(h \cdot D\right) \cdot \left(M \cdot M\right)\right)}}{d \cdot d} \]

    if 4.8000000000000003e160 < d

    1. Initial program 27.9%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(c0 \cdot {d}^{2}\right)\right), \color{blue}{\left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \left(c0 \cdot {d}^{2}\right)\right), \left(\color{blue}{{D}^{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right)\right), \left({D}^{\color{blue}{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(h \cdot w\right)}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(w \cdot \color{blue}{h}\right)\right)\right)\right) \]
      11. *-lowering-*.f6434.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(w, \color{blue}{h}\right)\right)\right)\right) \]
    5. Simplified34.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\left(w \cdot h\right) \cdot \color{blue}{\left(D \cdot D\right)}}\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \left(\frac{c0 \cdot d}{w \cdot h} \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      14. *-lowering-*.f6441.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Applied egg-rr41.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. 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(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{\color{blue}{D}}\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D}}{\color{blue}{D}}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D}\right), \color{blue}{D}\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{1}{\frac{D}{d}}\right), D\right)\right) \]
      5. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}}{\frac{D}{d}}\right), D\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(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      7. *-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(2, \left(\frac{c0 \cdot \frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot \frac{\frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \left(\frac{\frac{d}{w}}{h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      10. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{h \cdot w}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      11. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{w \cdot h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \left(w \cdot h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      13. *-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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      14. /-lowering-/.f6450.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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
    9. Applied egg-rr50.1%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{\frac{2 \cdot \left(c0 \cdot \frac{d}{w \cdot h}\right)}{\frac{D}{d}}}{D}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{{c0}^{2} \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)}} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{{d}^{2} \cdot {c0}^{2}}{\color{blue}{{D}^{2}} \cdot \left(h \cdot {w}^{2}\right)} \]
      2. associate-/l*N/A

        \[\leadsto {d}^{2} \cdot \color{blue}{\frac{{c0}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{{c0}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)} \cdot \color{blue}{{d}^{2}} \]
      4. unpow2N/A

        \[\leadsto \frac{{c0}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)} \cdot \left(d \cdot \color{blue}{d}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(\frac{{c0}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)} \cdot d\right) \cdot \color{blue}{d} \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{{c0}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)} \cdot d\right), \color{blue}{d}\right) \]
    12. Simplified41.7%

      \[\leadsto \color{blue}{\left(\frac{\frac{\frac{c0 \cdot \frac{c0}{D \cdot D}}{w}}{w}}{h} \cdot d\right) \cdot d} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification42.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 5.5 \cdot 10^{-54}:\\ \;\;\;\;\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\ \mathbf{elif}\;d \leq 3.5 \cdot 10^{+49}:\\ \;\;\;\;\frac{c0 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{D \cdot \left(D \cdot \left(h \cdot \left(w \cdot w\right)\right)\right)}\\ \mathbf{elif}\;d \leq 4.8 \cdot 10^{+160}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left(d \cdot \frac{\frac{\frac{c0 \cdot \frac{c0}{D \cdot D}}{w}}{w}}{h}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 42.8% accurate, 4.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c0}{2 \cdot w} \cdot \frac{\frac{2 \cdot \frac{\frac{c0}{w}}{\frac{h}{d}}}{\frac{D}{d}}}{D}\\ \mathbf{if}\;w \leq -1.8 \cdot 10^{-223}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;w \leq 3.6 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0
         (* (/ c0 (* 2.0 w)) (/ (/ (* 2.0 (/ (/ c0 w) (/ h d))) (/ D d)) D))))
   (if (<= w -1.8e-223)
     t_0
     (if (<= w 3.6e-119) (/ (* D (* D (* (* h (* M M)) 0.25))) (* d d)) t_0))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 / (2.0 * w)) * (((2.0 * ((c0 / w) / (h / d))) / (D / d)) / D);
	double tmp;
	if (w <= -1.8e-223) {
		tmp = t_0;
	} else if (w <= 3.6e-119) {
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (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 = (c0 / (2.0d0 * w)) * (((2.0d0 * ((c0 / w) / (h / d_1))) / (d / d_1)) / d)
    if (w <= (-1.8d-223)) then
        tmp = t_0
    else if (w <= 3.6d-119) then
        tmp = (d * (d * ((h * (m * m)) * 0.25d0))) / (d_1 * d_1)
    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 = (c0 / (2.0 * w)) * (((2.0 * ((c0 / w) / (h / d))) / (D / d)) / D);
	double tmp;
	if (w <= -1.8e-223) {
		tmp = t_0;
	} else if (w <= 3.6e-119) {
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (c0 / (2.0 * w)) * (((2.0 * ((c0 / w) / (h / d))) / (D / d)) / D)
	tmp = 0
	if w <= -1.8e-223:
		tmp = t_0
	elif w <= 3.6e-119:
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d)
	else:
		tmp = t_0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(Float64(Float64(2.0 * Float64(Float64(c0 / w) / Float64(h / d))) / Float64(D / d)) / D))
	tmp = 0.0
	if (w <= -1.8e-223)
		tmp = t_0;
	elseif (w <= 3.6e-119)
		tmp = Float64(Float64(D * Float64(D * Float64(Float64(h * Float64(M * M)) * 0.25))) / Float64(d * d));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (c0 / (2.0 * w)) * (((2.0 * ((c0 / w) / (h / d))) / (D / d)) / D);
	tmp = 0.0;
	if (w <= -1.8e-223)
		tmp = t_0;
	elseif (w <= 3.6e-119)
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(2.0 * N[(N[(c0 / w), $MachinePrecision] / N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(D / d), $MachinePrecision]), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[w, -1.8e-223], t$95$0, If[LessEqual[w, 3.6e-119], N[(N[(D * N[(D * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{c0}{2 \cdot w} \cdot \frac{\frac{2 \cdot \frac{\frac{c0}{w}}{\frac{h}{d}}}{\frac{D}{d}}}{D}\\
\mathbf{if}\;w \leq -1.8 \cdot 10^{-223}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;w \leq 3.6 \cdot 10^{-119}:\\
\;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if w < -1.8000000000000002e-223 or 3.6e-119 < w

    1. Initial program 29.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(c0 \cdot {d}^{2}\right)\right), \color{blue}{\left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \left(c0 \cdot {d}^{2}\right)\right), \left(\color{blue}{{D}^{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right)\right), \left({D}^{\color{blue}{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(h \cdot w\right)}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(w \cdot \color{blue}{h}\right)\right)\right)\right) \]
      11. *-lowering-*.f6436.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(w, \color{blue}{h}\right)\right)\right)\right) \]
    5. Simplified36.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\left(w \cdot h\right) \cdot \color{blue}{\left(D \cdot D\right)}}\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \left(\frac{c0 \cdot d}{w \cdot h} \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      14. *-lowering-*.f6442.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Applied egg-rr42.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. 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(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{\color{blue}{D}}\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D}}{\color{blue}{D}}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D}\right), \color{blue}{D}\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{1}{\frac{D}{d}}\right), D\right)\right) \]
      5. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}}{\frac{D}{d}}\right), D\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(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      7. *-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(2, \left(\frac{c0 \cdot \frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot \frac{\frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \left(\frac{\frac{d}{w}}{h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      10. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{h \cdot w}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      11. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{w \cdot h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \left(w \cdot h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      13. *-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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      14. /-lowering-/.f6452.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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
    9. Applied egg-rr52.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{\frac{2 \cdot \left(c0 \cdot \frac{d}{w \cdot h}\right)}{\frac{D}{d}}}{D}} \]
    10. 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(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0}{w} \cdot \frac{d}{h}\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0}{w} \cdot \frac{1}{\frac{h}{d}}\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
      4. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0}{w}}{\frac{h}{d}}\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
      5. /-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(2, \mathsf{/.f64}\left(\left(\frac{c0}{w}\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\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(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), \left(\frac{h}{d}\right)\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
      7. /-lowering-/.f6456.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(2, \mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), \mathsf{/.f64}\left(h, d\right)\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
    11. Applied egg-rr56.5%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{\frac{2 \cdot \color{blue}{\frac{\frac{c0}{w}}{\frac{h}{d}}}}{\frac{D}{d}}}{D} \]

    if -1.8000000000000002e-223 < w < 3.6e-119

    1. Initial program 13.8%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified14.0%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified18.7%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6447.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified47.6%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Taylor expanded in D 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. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right) \cdot \frac{1}{4}\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\left({D}^{2} \cdot {M}^{2}\right) \cdot h\right) \cdot \frac{1}{4}\right), \left({d}^{2}\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left({D}^{2} \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\left(D \cdot D\right) \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({d}^{2}\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(D \cdot \left(D \cdot {M}^{2}\right)\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({d}^{2}\right)\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(D \cdot \left(\left(D \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(D \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot \left(h \cdot \frac{1}{4}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\left({M}^{2} \cdot h\right) \cdot \frac{1}{4}\right)\right)\right), \left({d}^{2}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \left(h \cdot {M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      17. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      20. *-lowering-*.f6455.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    13. Simplified55.9%

      \[\leadsto \color{blue}{\frac{D \cdot \left(D \cdot \left(0.25 \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -1.8 \cdot 10^{-223}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \frac{\frac{2 \cdot \frac{\frac{c0}{w}}{\frac{h}{d}}}{\frac{D}{d}}}{D}\\ \mathbf{elif}\;w \leq 3.6 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \frac{\frac{2 \cdot \frac{\frac{c0}{w}}{\frac{h}{d}}}{\frac{D}{d}}}{D}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 39.0% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := w \cdot \left(h \cdot D\right)\\ t_1 := \frac{d \cdot \left(c0 \cdot d\right)}{w}\\ \mathbf{if}\;w \leq -3.5 \cdot 10^{-223}:\\ \;\;\;\;\frac{t\_1}{t\_0} \cdot \frac{c0}{D}\\ \mathbf{elif}\;w \leq 6.6 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1}{D} \cdot \frac{c0}{t\_0}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* w (* h D))) (t_1 (/ (* d (* c0 d)) w)))
   (if (<= w -3.5e-223)
     (* (/ t_1 t_0) (/ c0 D))
     (if (<= w 6.6e-119)
       (/ (* D (* D (* (* h (* M M)) 0.25))) (* d d))
       (* (/ t_1 D) (/ c0 t_0))))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = w * (h * D);
	double t_1 = (d * (c0 * d)) / w;
	double tmp;
	if (w <= -3.5e-223) {
		tmp = (t_1 / t_0) * (c0 / D);
	} else if (w <= 6.6e-119) {
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	} else {
		tmp = (t_1 / D) * (c0 / 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) :: t_1
    real(8) :: tmp
    t_0 = w * (h * d)
    t_1 = (d_1 * (c0 * d_1)) / w
    if (w <= (-3.5d-223)) then
        tmp = (t_1 / t_0) * (c0 / d)
    else if (w <= 6.6d-119) then
        tmp = (d * (d * ((h * (m * m)) * 0.25d0))) / (d_1 * d_1)
    else
        tmp = (t_1 / d) * (c0 / 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 = w * (h * D);
	double t_1 = (d * (c0 * d)) / w;
	double tmp;
	if (w <= -3.5e-223) {
		tmp = (t_1 / t_0) * (c0 / D);
	} else if (w <= 6.6e-119) {
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	} else {
		tmp = (t_1 / D) * (c0 / t_0);
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = w * (h * D)
	t_1 = (d * (c0 * d)) / w
	tmp = 0
	if w <= -3.5e-223:
		tmp = (t_1 / t_0) * (c0 / D)
	elif w <= 6.6e-119:
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d)
	else:
		tmp = (t_1 / D) * (c0 / t_0)
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(w * Float64(h * D))
	t_1 = Float64(Float64(d * Float64(c0 * d)) / w)
	tmp = 0.0
	if (w <= -3.5e-223)
		tmp = Float64(Float64(t_1 / t_0) * Float64(c0 / D));
	elseif (w <= 6.6e-119)
		tmp = Float64(Float64(D * Float64(D * Float64(Float64(h * Float64(M * M)) * 0.25))) / Float64(d * d));
	else
		tmp = Float64(Float64(t_1 / D) * Float64(c0 / t_0));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = w * (h * D);
	t_1 = (d * (c0 * d)) / w;
	tmp = 0.0;
	if (w <= -3.5e-223)
		tmp = (t_1 / t_0) * (c0 / D);
	elseif (w <= 6.6e-119)
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	else
		tmp = (t_1 / D) * (c0 / t_0);
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(w * N[(h * D), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(d * N[(c0 * d), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision]}, If[LessEqual[w, -3.5e-223], N[(N[(t$95$1 / t$95$0), $MachinePrecision] * N[(c0 / D), $MachinePrecision]), $MachinePrecision], If[LessEqual[w, 6.6e-119], N[(N[(D * N[(D * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 / D), $MachinePrecision] * N[(c0 / t$95$0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := w \cdot \left(h \cdot D\right)\\
t_1 := \frac{d \cdot \left(c0 \cdot d\right)}{w}\\
\mathbf{if}\;w \leq -3.5 \cdot 10^{-223}:\\
\;\;\;\;\frac{t\_1}{t\_0} \cdot \frac{c0}{D}\\

\mathbf{elif}\;w \leq 6.6 \cdot 10^{-119}:\\
\;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{D} \cdot \frac{c0}{t\_0}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if w < -3.50000000000000009e-223

    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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(c0 \cdot {d}^{2}\right)\right), \color{blue}{\left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \left(c0 \cdot {d}^{2}\right)\right), \left(\color{blue}{{D}^{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right)\right), \left({D}^{\color{blue}{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(h \cdot w\right)}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(w \cdot \color{blue}{h}\right)\right)\right)\right) \]
      11. *-lowering-*.f6440.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(w, \color{blue}{h}\right)\right)\right)\right) \]
    5. Simplified40.3%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\left(w \cdot h\right) \cdot \color{blue}{\left(D \cdot D\right)}}\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \left(\frac{c0 \cdot d}{w \cdot h} \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      14. *-lowering-*.f6444.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Applied egg-rr44.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{c0 \cdot \frac{d}{w}}{h} \cdot \frac{d}{D \cdot D}\right)}\right) \]
      2. associate-*r/N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{\frac{c0 \cdot d}{w}}{h} \cdot \frac{d}{D \cdot D}\right)\right) \]
      3. associate-/l/N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{c0 \cdot d}{h \cdot w} \cdot \frac{\color{blue}{d}}{D \cdot D}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{c0 \cdot d}{w \cdot h} \cdot \frac{d}{D \cdot D}\right)\right) \]
      5. times-fracN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}}\right) \]
      6. associate-*r*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right)} \cdot \left(D \cdot D\right)}\right) \]
      7. *-commutativeN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \color{blue}{\left(w \cdot h\right)}}\right) \]
      8. associate-/l*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
      9. clear-numN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{1}{\color{blue}{\frac{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}}} \]
      10. un-div-invN/A

        \[\leadsto \frac{\frac{c0}{2 \cdot w}}{\color{blue}{\frac{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}}} \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}\right)}\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\frac{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\left(D \cdot D\right) \cdot \color{blue}{\left(w \cdot h\right)}}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}\right)\right) \]
    9. Applied egg-rr52.9%

      \[\leadsto \color{blue}{\frac{\frac{c0}{2 \cdot w}}{\frac{D}{2 \cdot \left(c0 \cdot d\right)} \cdot \frac{D \cdot \left(w \cdot h\right)}{d}}} \]
    10. Applied egg-rr46.2%

      \[\leadsto \color{blue}{\frac{-\frac{d \cdot \left(c0 \cdot d\right)}{w}}{w \cdot \left(h \cdot \left(0 - D\right)\right)} \cdot \frac{c0}{D}} \]

    if -3.50000000000000009e-223 < w < 6.60000000000000017e-119

    1. Initial program 13.8%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified14.0%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified18.7%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6447.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified47.6%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Taylor expanded in D 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. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right) \cdot \frac{1}{4}\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\left({D}^{2} \cdot {M}^{2}\right) \cdot h\right) \cdot \frac{1}{4}\right), \left({d}^{2}\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left({D}^{2} \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\left(D \cdot D\right) \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({d}^{2}\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(D \cdot \left(D \cdot {M}^{2}\right)\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({d}^{2}\right)\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(D \cdot \left(\left(D \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(D \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot \left(h \cdot \frac{1}{4}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\left({M}^{2} \cdot h\right) \cdot \frac{1}{4}\right)\right)\right), \left({d}^{2}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \left(h \cdot {M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      17. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      20. *-lowering-*.f6455.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    13. Simplified55.9%

      \[\leadsto \color{blue}{\frac{D \cdot \left(D \cdot \left(0.25 \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}} \]

    if 6.60000000000000017e-119 < w

    1. Initial program 26.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(c0 \cdot {d}^{2}\right)\right), \color{blue}{\left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \left(c0 \cdot {d}^{2}\right)\right), \left(\color{blue}{{D}^{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right)\right), \left({D}^{\color{blue}{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(h \cdot w\right)}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(w \cdot \color{blue}{h}\right)\right)\right)\right) \]
      11. *-lowering-*.f6430.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(w, \color{blue}{h}\right)\right)\right)\right) \]
    5. Simplified30.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\left(w \cdot h\right) \cdot \color{blue}{\left(D \cdot D\right)}}\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \left(\frac{c0 \cdot d}{w \cdot h} \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      14. *-lowering-*.f6439.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Applied egg-rr39.8%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{c0 \cdot \frac{d}{w}}{h} \cdot \frac{d}{D \cdot D}\right)}\right) \]
      2. associate-*r/N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{\frac{c0 \cdot d}{w}}{h} \cdot \frac{d}{D \cdot D}\right)\right) \]
      3. associate-/l/N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{c0 \cdot d}{h \cdot w} \cdot \frac{\color{blue}{d}}{D \cdot D}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{c0 \cdot d}{w \cdot h} \cdot \frac{d}{D \cdot D}\right)\right) \]
      5. times-fracN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}}\right) \]
      6. associate-*r*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right)} \cdot \left(D \cdot D\right)}\right) \]
      7. *-commutativeN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \color{blue}{\left(w \cdot h\right)}}\right) \]
      8. associate-/l*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
      9. clear-numN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{1}{\color{blue}{\frac{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}}} \]
      10. un-div-invN/A

        \[\leadsto \frac{\frac{c0}{2 \cdot w}}{\color{blue}{\frac{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}}} \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}\right)}\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\frac{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\left(D \cdot D\right) \cdot \color{blue}{\left(w \cdot h\right)}}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}\right)\right) \]
    9. Applied egg-rr47.5%

      \[\leadsto \color{blue}{\frac{\frac{c0}{2 \cdot w}}{\frac{D}{2 \cdot \left(c0 \cdot d\right)} \cdot \frac{D \cdot \left(w \cdot h\right)}{d}}} \]
    10. Applied egg-rr46.4%

      \[\leadsto \color{blue}{\frac{-\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot \left(0 - D\right)\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification49.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -3.5 \cdot 10^{-223}:\\ \;\;\;\;\frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{w \cdot \left(h \cdot D\right)} \cdot \frac{c0}{D}\\ \mathbf{elif}\;w \leq 6.6 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot D\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 39.5% accurate, 5.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot D\right)}\\ \mathbf{if}\;w \leq -3.6 \cdot 10^{-227}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;w \leq 6.3 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* (/ (/ (* d (* c0 d)) w) D) (/ c0 (* w (* h D))))))
   (if (<= w -3.6e-227)
     t_0
     (if (<= w 6.3e-119) (/ (* D (* D (* (* h (* M M)) 0.25))) (* d d)) t_0))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (((d * (c0 * d)) / w) / D) * (c0 / (w * (h * D)));
	double tmp;
	if (w <= -3.6e-227) {
		tmp = t_0;
	} else if (w <= 6.3e-119) {
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (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_1 * (c0 * d_1)) / w) / d) * (c0 / (w * (h * d)))
    if (w <= (-3.6d-227)) then
        tmp = t_0
    else if (w <= 6.3d-119) then
        tmp = (d * (d * ((h * (m * m)) * 0.25d0))) / (d_1 * d_1)
    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 * (c0 * d)) / w) / D) * (c0 / (w * (h * D)));
	double tmp;
	if (w <= -3.6e-227) {
		tmp = t_0;
	} else if (w <= 6.3e-119) {
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (((d * (c0 * d)) / w) / D) * (c0 / (w * (h * D)))
	tmp = 0
	if w <= -3.6e-227:
		tmp = t_0
	elif w <= 6.3e-119:
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (d * d)
	else:
		tmp = t_0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(Float64(Float64(d * Float64(c0 * d)) / w) / D) * Float64(c0 / Float64(w * Float64(h * D))))
	tmp = 0.0
	if (w <= -3.6e-227)
		tmp = t_0;
	elseif (w <= 6.3e-119)
		tmp = Float64(Float64(D * Float64(D * Float64(Float64(h * Float64(M * M)) * 0.25))) / Float64(d * d));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (((d * (c0 * d)) / w) / D) * (c0 / (w * (h * D)));
	tmp = 0.0;
	if (w <= -3.6e-227)
		tmp = t_0;
	elseif (w <= 6.3e-119)
		tmp = (D * (D * ((h * (M * M)) * 0.25))) / (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[(c0 * d), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision] / D), $MachinePrecision] * N[(c0 / N[(w * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[w, -3.6e-227], t$95$0, If[LessEqual[w, 6.3e-119], N[(N[(D * N[(D * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot D\right)}\\
\mathbf{if}\;w \leq -3.6 \cdot 10^{-227}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;w \leq 6.3 \cdot 10^{-119}:\\
\;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if w < -3.5999999999999999e-227 or 6.3e-119 < w

    1. Initial program 29.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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(c0 \cdot {d}^{2}\right)\right), \color{blue}{\left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \left(c0 \cdot {d}^{2}\right)\right), \left(\color{blue}{{D}^{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right)\right), \left({D}^{\color{blue}{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(h \cdot w\right)}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(w \cdot \color{blue}{h}\right)\right)\right)\right) \]
      11. *-lowering-*.f6436.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(w, \color{blue}{h}\right)\right)\right)\right) \]
    5. Simplified36.2%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\left(w \cdot h\right) \cdot \color{blue}{\left(D \cdot D\right)}}\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \left(\frac{c0 \cdot d}{w \cdot h} \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      14. *-lowering-*.f6442.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Applied egg-rr42.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \color{blue}{\left(\frac{c0 \cdot \frac{d}{w}}{h} \cdot \frac{d}{D \cdot D}\right)}\right) \]
      2. associate-*r/N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{\frac{c0 \cdot d}{w}}{h} \cdot \frac{d}{D \cdot D}\right)\right) \]
      3. associate-/l/N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{c0 \cdot d}{h \cdot w} \cdot \frac{\color{blue}{d}}{D \cdot D}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \left(\frac{c0 \cdot d}{w \cdot h} \cdot \frac{d}{D \cdot D}\right)\right) \]
      5. times-fracN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}}\right) \]
      6. associate-*r*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\color{blue}{\left(w \cdot h\right)} \cdot \left(D \cdot D\right)}\right) \]
      7. *-commutativeN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \color{blue}{\left(w \cdot h\right)}}\right) \]
      8. associate-/l*N/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
      9. clear-numN/A

        \[\leadsto \frac{c0}{2 \cdot w} \cdot \frac{1}{\color{blue}{\frac{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}}} \]
      10. un-div-invN/A

        \[\leadsto \frac{\frac{c0}{2 \cdot w}}{\color{blue}{\frac{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}}} \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}\right)}\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \left(2 \cdot w\right)\right), \left(\frac{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\left(D \cdot D\right) \cdot \color{blue}{\left(w \cdot h\right)}}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}\right)\right) \]
    9. Applied egg-rr50.6%

      \[\leadsto \color{blue}{\frac{\frac{c0}{2 \cdot w}}{\frac{D}{2 \cdot \left(c0 \cdot d\right)} \cdot \frac{D \cdot \left(w \cdot h\right)}{d}}} \]
    10. Applied egg-rr46.2%

      \[\leadsto \color{blue}{\frac{-\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot \left(0 - D\right)\right)}} \]

    if -3.5999999999999999e-227 < w < 6.3e-119

    1. Initial program 13.8%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified14.0%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified18.7%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6447.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified47.6%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Taylor expanded in D 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. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right) \cdot \frac{1}{4}\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\left({D}^{2} \cdot {M}^{2}\right) \cdot h\right) \cdot \frac{1}{4}\right), \left({d}^{2}\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left({D}^{2} \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\left(D \cdot D\right) \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({d}^{2}\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(D \cdot \left(D \cdot {M}^{2}\right)\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({d}^{2}\right)\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(D \cdot \left(\left(D \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(D \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot \left(h \cdot \frac{1}{4}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\left({M}^{2} \cdot h\right) \cdot \frac{1}{4}\right)\right)\right), \left({d}^{2}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \left(h \cdot {M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      17. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      20. *-lowering-*.f6455.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    13. Simplified55.9%

      \[\leadsto \color{blue}{\frac{D \cdot \left(D \cdot \left(0.25 \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -3.6 \cdot 10^{-227}:\\ \;\;\;\;\frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot D\right)}\\ \mathbf{elif}\;w \leq 6.3 \cdot 10^{-119}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d \cdot \left(c0 \cdot d\right)}{w}}{D} \cdot \frac{c0}{w \cdot \left(h \cdot D\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 43.5% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := h \cdot \left(M \cdot M\right)\\ \mathbf{if}\;d \leq 1.35 \cdot 10^{-163}:\\ \;\;\;\;\frac{t\_0 \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{+157}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(D \cdot D\right) \cdot t\_0}{\frac{d}{0.25}}}{d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* h (* M M))))
   (if (<= d 1.35e-163)
     (/ (* t_0 (/ D (/ d D))) (/ d 0.25))
     (if (<= d 9.5e+157)
       (/ (* (* D 0.25) (* (* M M) (* h D))) (* d d))
       (/ (/ (* (* D D) t_0) (/ d 0.25)) 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 <= 1.35e-163) {
		tmp = (t_0 * (D / (d / D))) / (d / 0.25);
	} else if (d <= 9.5e+157) {
		tmp = ((D * 0.25) * ((M * M) * (h * D))) / (d * d);
	} else {
		tmp = (((D * D) * t_0) / (d / 0.25)) / 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_1 <= 1.35d-163) then
        tmp = (t_0 * (d / (d_1 / d))) / (d_1 / 0.25d0)
    else if (d_1 <= 9.5d+157) then
        tmp = ((d * 0.25d0) * ((m * m) * (h * d))) / (d_1 * d_1)
    else
        tmp = (((d * d) * t_0) / (d_1 / 0.25d0)) / 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 <= 1.35e-163) {
		tmp = (t_0 * (D / (d / D))) / (d / 0.25);
	} else if (d <= 9.5e+157) {
		tmp = ((D * 0.25) * ((M * M) * (h * D))) / (d * d);
	} else {
		tmp = (((D * D) * t_0) / (d / 0.25)) / d;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = h * (M * M)
	tmp = 0
	if d <= 1.35e-163:
		tmp = (t_0 * (D / (d / D))) / (d / 0.25)
	elif d <= 9.5e+157:
		tmp = ((D * 0.25) * ((M * M) * (h * D))) / (d * d)
	else:
		tmp = (((D * D) * t_0) / (d / 0.25)) / d
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(h * Float64(M * M))
	tmp = 0.0
	if (d <= 1.35e-163)
		tmp = Float64(Float64(t_0 * Float64(D / Float64(d / D))) / Float64(d / 0.25));
	elseif (d <= 9.5e+157)
		tmp = Float64(Float64(Float64(D * 0.25) * Float64(Float64(M * M) * Float64(h * D))) / Float64(d * d));
	else
		tmp = Float64(Float64(Float64(Float64(D * D) * t_0) / Float64(d / 0.25)) / 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 <= 1.35e-163)
		tmp = (t_0 * (D / (d / D))) / (d / 0.25);
	elseif (d <= 9.5e+157)
		tmp = ((D * 0.25) * ((M * M) * (h * D))) / (d * d);
	else
		tmp = (((D * D) * t_0) / (d / 0.25)) / d;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, 1.35e-163], N[(N[(t$95$0 * N[(D / N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d / 0.25), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9.5e+157], N[(N[(N[(D * 0.25), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(D * D), $MachinePrecision] * t$95$0), $MachinePrecision] / N[(d / 0.25), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := h \cdot \left(M \cdot M\right)\\
\mathbf{if}\;d \leq 1.35 \cdot 10^{-163}:\\
\;\;\;\;\frac{t\_0 \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\

\mathbf{elif}\;d \leq 9.5 \cdot 10^{+157}:\\
\;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\left(D \cdot D\right) \cdot t\_0}{\frac{d}{0.25}}}{d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < 1.35000000000000007e-163

    1. Initial program 24.6%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified22.2%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified13.4%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6430.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified30.1%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{1}{4}}{\color{blue}{d} \cdot d} \]
      2. times-fracN/A

        \[\leadsto \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d} \cdot \color{blue}{\frac{\frac{1}{4}}{d}} \]
      3. clear-numN/A

        \[\leadsto \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d} \cdot \frac{1}{\color{blue}{\frac{d}{\frac{1}{4}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}}{\color{blue}{\frac{d}{\frac{1}{4}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right), \color{blue}{\left(\frac{d}{\frac{1}{4}}\right)}\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(D \cdot D\right)}{d}\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{d}\right), \left(\frac{\color{blue}{d}}{\frac{1}{4}}\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{\color{blue}{d}}{\frac{1}{4}}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      12. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \left(D \cdot \frac{1}{\frac{d}{D}}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      13. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \left(\frac{D}{\frac{d}{D}}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \mathsf{/.f64}\left(D, \left(\frac{d}{D}\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, D\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      16. /-lowering-/.f6438.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, D\right)\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\frac{1}{4}}\right)\right) \]
    12. Applied egg-rr38.6%

      \[\leadsto \color{blue}{\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}} \]

    if 1.35000000000000007e-163 < d < 9.4999999999999996e157

    1. Initial program 23.2%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified21.8%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified15.3%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6436.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified36.6%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\left(D \cdot h\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\left(h \cdot D\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      9. *-lowering-*.f6446.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
    12. Applied egg-rr46.3%

      \[\leadsto \frac{\color{blue}{\left(0.25 \cdot D\right) \cdot \left(\left(h \cdot D\right) \cdot \left(M \cdot M\right)\right)}}{d \cdot d} \]

    if 9.4999999999999996e157 < d

    1. Initial program 27.9%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified28.1%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified19.6%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6428.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified28.2%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \frac{\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d}}{\color{blue}{d}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d}\right), \color{blue}{d}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{1}{4}}{d}\right), d\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{\frac{1}{4}}{d}\right), d\right) \]
      5. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{1}{\frac{d}{\frac{1}{4}}}\right), d\right) \]
      6. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\frac{d}{\frac{1}{4}}}\right), d\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right), d\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot D\right), \left(h \cdot \left(M \cdot M\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right), d\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot \left(M \cdot M\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right), d\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right), d\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right), d\right) \]
      12. /-lowering-/.f6439.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{/.f64}\left(d, \frac{1}{4}\right)\right), d\right) \]
    12. Applied egg-rr39.7%

      \[\leadsto \color{blue}{\frac{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\frac{d}{0.25}}}{d}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 1.35 \cdot 10^{-163}:\\ \;\;\;\;\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\ \mathbf{elif}\;d \leq 9.5 \cdot 10^{+157}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\frac{d}{0.25}}}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 43.3% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\ \mathbf{if}\;d \leq 1.35 \cdot 10^{-163}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;d \leq 9.4 \cdot 10^{+157}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (* (* h (* M M)) (/ D (/ d D))) (/ d 0.25))))
   (if (<= d 1.35e-163)
     t_0
     (if (<= d 9.4e+157) (/ (* (* D 0.25) (* (* M M) (* h D))) (* d d)) t_0))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = ((h * (M * M)) * (D / (d / D))) / (d / 0.25);
	double tmp;
	if (d <= 1.35e-163) {
		tmp = t_0;
	} else if (d <= 9.4e+157) {
		tmp = ((D * 0.25) * ((M * M) * (h * 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 = ((h * (m * m)) * (d / (d_1 / d))) / (d_1 / 0.25d0)
    if (d_1 <= 1.35d-163) then
        tmp = t_0
    else if (d_1 <= 9.4d+157) then
        tmp = ((d * 0.25d0) * ((m * m) * (h * d))) / (d_1 * d_1)
    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 = ((h * (M * M)) * (D / (d / D))) / (d / 0.25);
	double tmp;
	if (d <= 1.35e-163) {
		tmp = t_0;
	} else if (d <= 9.4e+157) {
		tmp = ((D * 0.25) * ((M * M) * (h * D))) / (d * d);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = ((h * (M * M)) * (D / (d / D))) / (d / 0.25)
	tmp = 0
	if d <= 1.35e-163:
		tmp = t_0
	elif d <= 9.4e+157:
		tmp = ((D * 0.25) * ((M * M) * (h * D))) / (d * d)
	else:
		tmp = t_0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(Float64(h * Float64(M * M)) * Float64(D / Float64(d / D))) / Float64(d / 0.25))
	tmp = 0.0
	if (d <= 1.35e-163)
		tmp = t_0;
	elseif (d <= 9.4e+157)
		tmp = Float64(Float64(Float64(D * 0.25) * Float64(Float64(M * M) * Float64(h * D))) / Float64(d * d));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = ((h * (M * M)) * (D / (d / D))) / (d / 0.25);
	tmp = 0.0;
	if (d <= 1.35e-163)
		tmp = t_0;
	elseif (d <= 9.4e+157)
		tmp = ((D * 0.25) * ((M * M) * (h * 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[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] * N[(D / N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d / 0.25), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, 1.35e-163], t$95$0, If[LessEqual[d, 9.4e+157], N[(N[(N[(D * 0.25), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\
\mathbf{if}\;d \leq 1.35 \cdot 10^{-163}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;d \leq 9.4 \cdot 10^{+157}:\\
\;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < 1.35000000000000007e-163 or 9.40000000000000061e157 < d

    1. Initial program 25.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. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified23.7%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified15.0%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6429.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified29.6%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{1}{4}}{\color{blue}{d} \cdot d} \]
      2. times-fracN/A

        \[\leadsto \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d} \cdot \color{blue}{\frac{\frac{1}{4}}{d}} \]
      3. clear-numN/A

        \[\leadsto \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d} \cdot \frac{1}{\color{blue}{\frac{d}{\frac{1}{4}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}}{\color{blue}{\frac{d}{\frac{1}{4}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right), \color{blue}{\left(\frac{d}{\frac{1}{4}}\right)}\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(D \cdot D\right)}{d}\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{d}\right), \left(\frac{\color{blue}{d}}{\frac{1}{4}}\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{\color{blue}{d}}{\frac{1}{4}}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      12. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \left(D \cdot \frac{1}{\frac{d}{D}}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      13. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \left(\frac{D}{\frac{d}{D}}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \mathsf{/.f64}\left(D, \left(\frac{d}{D}\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, D\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      16. /-lowering-/.f6438.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, D\right)\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\frac{1}{4}}\right)\right) \]
    12. Applied egg-rr38.4%

      \[\leadsto \color{blue}{\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}} \]

    if 1.35000000000000007e-163 < d < 9.40000000000000061e157

    1. Initial program 23.2%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified21.8%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified15.3%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6436.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified36.6%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\left(D \cdot h\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\left(h \cdot D\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      9. *-lowering-*.f6446.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
    12. Applied egg-rr46.3%

      \[\leadsto \frac{\color{blue}{\left(0.25 \cdot D\right) \cdot \left(\left(h \cdot D\right) \cdot \left(M \cdot M\right)\right)}}{d \cdot d} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 1.35 \cdot 10^{-163}:\\ \;\;\;\;\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\ \mathbf{elif}\;d \leq 9.4 \cdot 10^{+157}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 40.0% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\\ \mathbf{if}\;d \leq 6 \cdot 10^{-167}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{+167}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* (/ (* (* D D) 0.25) d) (/ (* h (* M M)) d))))
   (if (<= d 6e-167)
     t_0
     (if (<= d 1.55e+167)
       (/ (* (* D 0.25) (* (* M M) (* h D))) (* d d))
       t_0))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (((D * D) * 0.25) / d) * ((h * (M * M)) / d);
	double tmp;
	if (d <= 6e-167) {
		tmp = t_0;
	} else if (d <= 1.55e+167) {
		tmp = ((D * 0.25) * ((M * M) * (h * 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 * d) * 0.25d0) / d_1) * ((h * (m * m)) / d_1)
    if (d_1 <= 6d-167) then
        tmp = t_0
    else if (d_1 <= 1.55d+167) then
        tmp = ((d * 0.25d0) * ((m * m) * (h * d))) / (d_1 * d_1)
    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 * D) * 0.25) / d) * ((h * (M * M)) / d);
	double tmp;
	if (d <= 6e-167) {
		tmp = t_0;
	} else if (d <= 1.55e+167) {
		tmp = ((D * 0.25) * ((M * M) * (h * D))) / (d * d);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (((D * D) * 0.25) / d) * ((h * (M * M)) / d)
	tmp = 0
	if d <= 6e-167:
		tmp = t_0
	elif d <= 1.55e+167:
		tmp = ((D * 0.25) * ((M * M) * (h * D))) / (d * d)
	else:
		tmp = t_0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(Float64(Float64(D * D) * 0.25) / d) * Float64(Float64(h * Float64(M * M)) / d))
	tmp = 0.0
	if (d <= 6e-167)
		tmp = t_0;
	elseif (d <= 1.55e+167)
		tmp = Float64(Float64(Float64(D * 0.25) * Float64(Float64(M * M) * Float64(h * D))) / Float64(d * d));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (((D * D) * 0.25) / d) * ((h * (M * M)) / d);
	tmp = 0.0;
	if (d <= 6e-167)
		tmp = t_0;
	elseif (d <= 1.55e+167)
		tmp = ((D * 0.25) * ((M * M) * (h * 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 * D), $MachinePrecision] * 0.25), $MachinePrecision] / d), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, 6e-167], t$95$0, If[LessEqual[d, 1.55e+167], N[(N[(N[(D * 0.25), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] * N[(h * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\\
\mathbf{if}\;d \leq 6 \cdot 10^{-167}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;d \leq 1.55 \cdot 10^{+167}:\\
\;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < 5.9999999999999996e-167 or 1.55e167 < d

    1. Initial program 25.7%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified24.0%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified15.5%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6430.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified30.0%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{\left(\frac{1}{4} \cdot \left(D \cdot D\right)\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{d} \cdot d} \]
      2. times-fracN/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left(D \cdot D\right)}{d} \cdot \color{blue}{\frac{h \cdot \left(M \cdot M\right)}{d}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(D \cdot D\right)}{d}\right), \color{blue}{\left(\frac{h \cdot \left(M \cdot M\right)}{d}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(D \cdot D\right)\right), d\right), \left(\frac{\color{blue}{h \cdot \left(M \cdot M\right)}}{d}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot D\right)\right), d\right), \left(\frac{\color{blue}{h} \cdot \left(M \cdot M\right)}{d}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \left(\frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \color{blue}{d}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), d\right)\right) \]
      9. *-lowering-*.f6436.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), d\right)\right) \]
    12. Applied egg-rr36.2%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(D \cdot D\right)}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}} \]

    if 5.9999999999999996e-167 < d < 1.55e167

    1. Initial program 22.7%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified21.4%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified14.2%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6435.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified35.0%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(\color{blue}{d}, d\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \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), \mathsf{*.f64}\left(d, d\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \left(\left(D \cdot h\right) \cdot \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\left(D \cdot h\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\left(h \cdot D\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), \left(M \cdot M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
      9. *-lowering-*.f6445.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), \mathsf{*.f64}\left(M, M\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right) \]
    12. Applied egg-rr45.3%

      \[\leadsto \frac{\color{blue}{\left(0.25 \cdot D\right) \cdot \left(\left(h \cdot D\right) \cdot \left(M \cdot M\right)\right)}}{d \cdot d} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 6 \cdot 10^{-167}:\\ \;\;\;\;\frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{+167}:\\ \;\;\;\;\frac{\left(D \cdot 0.25\right) \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot D\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 40.3% accurate, 6.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := h \cdot \left(M \cdot M\right)\\ t_1 := \frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{t\_0}{d}\\ \mathbf{if}\;d \leq 1.05 \cdot 10^{-166}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;d \leq 6 \cdot 10^{+187}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(t\_0 \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (* h (* M M))) (t_1 (* (/ (* (* D D) 0.25) d) (/ t_0 d))))
   (if (<= d 1.05e-166)
     t_1
     (if (<= d 6e+187) (/ (* D (* D (* t_0 0.25))) (* d d)) t_1))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = h * (M * M);
	double t_1 = (((D * D) * 0.25) / d) * (t_0 / d);
	double tmp;
	if (d <= 1.05e-166) {
		tmp = t_1;
	} else if (d <= 6e+187) {
		tmp = (D * (D * (t_0 * 0.25))) / (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 = h * (m * m)
    t_1 = (((d * d) * 0.25d0) / d_1) * (t_0 / d_1)
    if (d_1 <= 1.05d-166) then
        tmp = t_1
    else if (d_1 <= 6d+187) then
        tmp = (d * (d * (t_0 * 0.25d0))) / (d_1 * d_1)
    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 = h * (M * M);
	double t_1 = (((D * D) * 0.25) / d) * (t_0 / d);
	double tmp;
	if (d <= 1.05e-166) {
		tmp = t_1;
	} else if (d <= 6e+187) {
		tmp = (D * (D * (t_0 * 0.25))) / (d * d);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = h * (M * M)
	t_1 = (((D * D) * 0.25) / d) * (t_0 / d)
	tmp = 0
	if d <= 1.05e-166:
		tmp = t_1
	elif d <= 6e+187:
		tmp = (D * (D * (t_0 * 0.25))) / (d * d)
	else:
		tmp = t_1
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(h * Float64(M * M))
	t_1 = Float64(Float64(Float64(Float64(D * D) * 0.25) / d) * Float64(t_0 / d))
	tmp = 0.0
	if (d <= 1.05e-166)
		tmp = t_1;
	elseif (d <= 6e+187)
		tmp = Float64(Float64(D * Float64(D * Float64(t_0 * 0.25))) / Float64(d * d));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = h * (M * M);
	t_1 = (((D * D) * 0.25) / d) * (t_0 / d);
	tmp = 0.0;
	if (d <= 1.05e-166)
		tmp = t_1;
	elseif (d <= 6e+187)
		tmp = (D * (D * (t_0 * 0.25))) / (d * d);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(D * D), $MachinePrecision] * 0.25), $MachinePrecision] / d), $MachinePrecision] * N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, 1.05e-166], t$95$1, If[LessEqual[d, 6e+187], N[(N[(D * N[(D * N[(t$95$0 * 0.25), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := h \cdot \left(M \cdot M\right)\\
t_1 := \frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{t\_0}{d}\\
\mathbf{if}\;d \leq 1.05 \cdot 10^{-166}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;d \leq 6 \cdot 10^{+187}:\\
\;\;\;\;\frac{D \cdot \left(D \cdot \left(t\_0 \cdot 0.25\right)\right)}{d \cdot d}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < 1.05e-166 or 5.9999999999999998e187 < d

    1. Initial program 25.2%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified23.4%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified15.8%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6430.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified30.1%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{\left(\frac{1}{4} \cdot \left(D \cdot D\right)\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{d} \cdot d} \]
      2. times-fracN/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left(D \cdot D\right)}{d} \cdot \color{blue}{\frac{h \cdot \left(M \cdot M\right)}{d}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(D \cdot D\right)}{d}\right), \color{blue}{\left(\frac{h \cdot \left(M \cdot M\right)}{d}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(D \cdot D\right)\right), d\right), \left(\frac{\color{blue}{h \cdot \left(M \cdot M\right)}}{d}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot D\right)\right), d\right), \left(\frac{\color{blue}{h} \cdot \left(M \cdot M\right)}{d}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \left(\frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \color{blue}{d}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), d\right)\right) \]
      9. *-lowering-*.f6436.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), d\right)\right) \]
    12. Applied egg-rr36.5%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(D \cdot D\right)}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}} \]

    if 1.05e-166 < d < 5.9999999999999998e187

    1. Initial program 24.0%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified22.8%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified13.5%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6434.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified34.6%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Taylor expanded in D 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. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right) \cdot \frac{1}{4}\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\left({D}^{2} \cdot {M}^{2}\right) \cdot h\right) \cdot \frac{1}{4}\right), \left({d}^{2}\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left({D}^{2} \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(\left(D \cdot D\right) \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({d}^{2}\right)\right) \]
      7. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(D \cdot \left(D \cdot {M}^{2}\right)\right) \cdot \left(h \cdot \frac{1}{4}\right)\right), \left({d}^{2}\right)\right) \]
      8. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(D \cdot \left(\left(D \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(D \cdot {M}^{2}\right) \cdot \left(h \cdot \frac{1}{4}\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot \left(h \cdot \frac{1}{4}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\left({M}^{2} \cdot h\right) \cdot \frac{1}{4}\right)\right)\right), \left({d}^{2}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(D \cdot \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(\frac{1}{4} \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \left(h \cdot {M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      17. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      18. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      19. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      20. *-lowering-*.f6442.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    13. Simplified42.2%

      \[\leadsto \color{blue}{\frac{D \cdot \left(D \cdot \left(0.25 \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification38.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 1.05 \cdot 10^{-166}:\\ \;\;\;\;\frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\\ \mathbf{elif}\;d \leq 6 \cdot 10^{+187}:\\ \;\;\;\;\frac{D \cdot \left(D \cdot \left(\left(h \cdot \left(M \cdot M\right)\right) \cdot 0.25\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 43.3% accurate, 6.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \cdot M \leq 4 \cdot 10^{-164}:\\ \;\;\;\;\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left(d \cdot \frac{\frac{\frac{c0 \cdot \frac{c0}{D \cdot D}}{w}}{w}}{h}\right)\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= (* M M) 4e-164)
   (/ (* (* h (* M M)) (/ D (/ d D))) (/ d 0.25))
   (* d (* d (/ (/ (/ (* c0 (/ c0 (* D D))) w) w) h)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((M * M) <= 4e-164) {
		tmp = ((h * (M * M)) * (D / (d / D))) / (d / 0.25);
	} else {
		tmp = d * (d * ((((c0 * (c0 / (D * D))) / w) / w) / h));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: tmp
    if ((m * m) <= 4d-164) then
        tmp = ((h * (m * m)) * (d / (d_1 / d))) / (d_1 / 0.25d0)
    else
        tmp = d_1 * (d_1 * ((((c0 * (c0 / (d * d))) / w) / w) / h))
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((M * M) <= 4e-164) {
		tmp = ((h * (M * M)) * (D / (d / D))) / (d / 0.25);
	} else {
		tmp = d * (d * ((((c0 * (c0 / (D * D))) / w) / w) / h));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if (M * M) <= 4e-164:
		tmp = ((h * (M * M)) * (D / (d / D))) / (d / 0.25)
	else:
		tmp = d * (d * ((((c0 * (c0 / (D * D))) / w) / w) / h))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (Float64(M * M) <= 4e-164)
		tmp = Float64(Float64(Float64(h * Float64(M * M)) * Float64(D / Float64(d / D))) / Float64(d / 0.25));
	else
		tmp = Float64(d * Float64(d * Float64(Float64(Float64(Float64(c0 * Float64(c0 / Float64(D * D))) / w) / w) / h)));
	end
	return tmp
end
function tmp_2 = code(c0, w, h, D, d, M)
	tmp = 0.0;
	if ((M * M) <= 4e-164)
		tmp = ((h * (M * M)) * (D / (d / D))) / (d / 0.25);
	else
		tmp = d * (d * ((((c0 * (c0 / (D * D))) / w) / w) / h));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[N[(M * M), $MachinePrecision], 4e-164], N[(N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] * N[(D / N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d / 0.25), $MachinePrecision]), $MachinePrecision], N[(d * N[(d * N[(N[(N[(N[(c0 * N[(c0 / N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / w), $MachinePrecision] / w), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;M \cdot M \leq 4 \cdot 10^{-164}:\\
\;\;\;\;\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\

\mathbf{else}:\\
\;\;\;\;d \cdot \left(d \cdot \frac{\frac{\frac{c0 \cdot \frac{c0}{D \cdot D}}{w}}{w}}{h}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 M M) < 3.99999999999999985e-164

    1. Initial program 28.6%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified25.1%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified23.7%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6441.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified41.6%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right) \cdot \frac{1}{4}}{\color{blue}{d} \cdot d} \]
      2. times-fracN/A

        \[\leadsto \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d} \cdot \color{blue}{\frac{\frac{1}{4}}{d}} \]
      3. clear-numN/A

        \[\leadsto \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d} \cdot \frac{1}{\color{blue}{\frac{d}{\frac{1}{4}}}} \]
      4. un-div-invN/A

        \[\leadsto \frac{\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}}{\color{blue}{\frac{d}{\frac{1}{4}}}} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d}\right), \color{blue}{\left(\frac{d}{\frac{1}{4}}\right)}\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(D \cdot D\right)}{d}\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D \cdot D}{d}\right), \left(\frac{\color{blue}{d}}{\frac{1}{4}}\right)\right) \]
      8. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\left(h \cdot \left(M \cdot M\right)\right) \cdot \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{\color{blue}{d}}{\frac{1}{4}}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \left(D \cdot \frac{D}{d}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      12. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \left(D \cdot \frac{1}{\frac{d}{D}}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      13. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \left(\frac{D}{\frac{d}{D}}\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \mathsf{/.f64}\left(D, \left(\frac{d}{D}\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, D\right)\right)\right), \left(\frac{d}{\frac{1}{4}}\right)\right) \]
      16. /-lowering-/.f6447.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, D\right)\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\frac{1}{4}}\right)\right) \]
    12. Applied egg-rr47.4%

      \[\leadsto \color{blue}{\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}} \]

    if 3.99999999999999985e-164 < (*.f64 M M)

    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. Add Preprocessing
    3. 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) \]
    4. 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. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(2 \cdot \left(c0 \cdot {d}^{2}\right)\right), \color{blue}{\left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \left(c0 \cdot {d}^{2}\right)\right), \left(\color{blue}{{D}^{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left({d}^{2}\right)\right)\right), \left({D}^{\color{blue}{2}} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \left(d \cdot d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \left({D}^{2} \cdot \left(h \cdot w\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(h \cdot w\right)}\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{h} \cdot w\right)\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(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{h} \cdot w\right)\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(w \cdot \color{blue}{h}\right)\right)\right)\right) \]
      11. *-lowering-*.f6435.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(w, \color{blue}{h}\right)\right)\right)\right) \]
    5. Simplified35.7%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}}\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\color{blue}{\left(D \cdot D\right)} \cdot \left(w \cdot h\right)}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \frac{\left(c0 \cdot d\right) \cdot d}{\left(w \cdot h\right) \cdot \color{blue}{\left(D \cdot D\right)}}\right)\right) \]
      4. frac-timesN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(2 \cdot \left(\frac{c0 \cdot d}{w \cdot h} \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\left(2 \cdot \frac{c0 \cdot d}{w \cdot h}\right) \cdot \color{blue}{\frac{d}{D \cdot D}}\right)\right) \]
      6. *-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}{w \cdot h}\right), \color{blue}{\left(\frac{d}{D \cdot D}\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{c0 \cdot d}{w \cdot h}\right)\right), \left(\frac{\color{blue}{d}}{D \cdot D}\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(\mathsf{*.f64}\left(2, \left(\frac{\frac{c0 \cdot d}{w}}{h}\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\left(\frac{c0 \cdot d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(c0 \cdot \frac{d}{w}\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\frac{d}{w}\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\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(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \left(\frac{d}{D \cdot D}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \color{blue}{\left(D \cdot D\right)}\right)\right)\right) \]
      14. *-lowering-*.f6444.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, w\right)\right), h\right)\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(D, \color{blue}{D}\right)\right)\right)\right) \]
    7. Applied egg-rr44.6%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D \cdot D}\right)} \]
    8. 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(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{\frac{d}{D}}{\color{blue}{D}}\right)\right) \]
      2. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \left(\frac{\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D}}{\color{blue}{D}}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{d}{D}\right), \color{blue}{D}\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right) \cdot \frac{1}{\frac{D}{d}}\right), D\right)\right) \]
      5. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\left(\frac{2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}}{\frac{D}{d}}\right), D\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(\left(2 \cdot \frac{c0 \cdot \frac{d}{w}}{h}\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      7. *-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(2, \left(\frac{c0 \cdot \frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(c0 \cdot \frac{\frac{d}{w}}{h}\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \left(\frac{\frac{d}{w}}{h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      10. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{h \cdot w}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      11. *-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(2, \mathsf{*.f64}\left(c0, \left(\frac{d}{w \cdot h}\right)\right)\right), \left(\frac{D}{d}\right)\right), D\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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \left(w \cdot h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      13. *-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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \left(\frac{D}{d}\right)\right), D\right)\right) \]
      14. /-lowering-/.f6454.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(2, \mathsf{*.f64}\left(c0, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(w, h\right)\right)\right)\right), \mathsf{/.f64}\left(D, d\right)\right), D\right)\right) \]
    9. Applied egg-rr54.4%

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\frac{\frac{2 \cdot \left(c0 \cdot \frac{d}{w \cdot h}\right)}{\frac{D}{d}}}{D}} \]
    10. Taylor expanded in c0 around 0

      \[\leadsto \color{blue}{\frac{{c0}^{2} \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)}} \]
    11. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{{d}^{2} \cdot {c0}^{2}}{\color{blue}{{D}^{2}} \cdot \left(h \cdot {w}^{2}\right)} \]
      2. associate-/l*N/A

        \[\leadsto {d}^{2} \cdot \color{blue}{\frac{{c0}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{{c0}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)} \cdot \color{blue}{{d}^{2}} \]
      4. unpow2N/A

        \[\leadsto \frac{{c0}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)} \cdot \left(d \cdot \color{blue}{d}\right) \]
      5. associate-*r*N/A

        \[\leadsto \left(\frac{{c0}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)} \cdot d\right) \cdot \color{blue}{d} \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{{c0}^{2}}{{D}^{2} \cdot \left(h \cdot {w}^{2}\right)} \cdot d\right), \color{blue}{d}\right) \]
    12. Simplified44.0%

      \[\leadsto \color{blue}{\left(\frac{\frac{\frac{c0 \cdot \frac{c0}{D \cdot D}}{w}}{w}}{h} \cdot d\right) \cdot d} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \cdot M \leq 4 \cdot 10^{-164}:\\ \;\;\;\;\frac{\left(h \cdot \left(M \cdot M\right)\right) \cdot \frac{D}{\frac{d}{D}}}{\frac{d}{0.25}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left(d \cdot \frac{\frac{\frac{c0 \cdot \frac{c0}{D \cdot D}}{w}}{w}}{h}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 36.6% accurate, 6.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \cdot D \leq 5 \cdot 10^{-321}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(D \cdot D\right) \cdot 0.25\right) \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= (* D D) 5e-321) 0.0 (* (* (* D D) 0.25) (/ (* h (* M M)) (* d d)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((D * D) <= 5e-321) {
		tmp = 0.0;
	} else {
		tmp = ((D * D) * 0.25) * ((h * (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) <= 5d-321) then
        tmp = 0.0d0
    else
        tmp = ((d * d) * 0.25d0) * ((h * (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) <= 5e-321) {
		tmp = 0.0;
	} else {
		tmp = ((D * D) * 0.25) * ((h * (M * M)) / (d * d));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if (D * D) <= 5e-321:
		tmp = 0.0
	else:
		tmp = ((D * D) * 0.25) * ((h * (M * M)) / (d * d))
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (Float64(D * D) <= 5e-321)
		tmp = 0.0;
	else
		tmp = Float64(Float64(Float64(D * D) * 0.25) * Float64(Float64(h * 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) <= 5e-321)
		tmp = 0.0;
	else
		tmp = ((D * D) * 0.25) * ((h * (M * M)) / (d * d));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[N[(D * D), $MachinePrecision], 5e-321], 0.0, N[(N[(N[(D * D), $MachinePrecision] * 0.25), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \cdot D \leq 5 \cdot 10^{-321}:\\
\;\;\;\;0\\

\mathbf{else}:\\
\;\;\;\;\left(\left(D \cdot D\right) \cdot 0.25\right) \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 D D) < 4.99994e-321

    1. Initial program 25.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. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified25.2%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(-1 \cdot c0\right) \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-lft1-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\left(-1 + 1\right) \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(0 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. mul0-lftN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 + 1\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\mathsf{neg}\left(c0 \cdot \left(-1 + 1\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot \left(\mathsf{neg}\left(\left(-1 + 1\right)\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot 0\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot \left(-1 + 1\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \left(-1 + 1\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      13. metadata-eval34.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, 0\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified34.1%

      \[\leadsto \frac{c0 \cdot \color{blue}{\left(c0 \cdot 0\right)}}{2 \cdot w} \]
    8. Step-by-step derivation
      1. mul0-rgtN/A

        \[\leadsto \frac{c0 \cdot 0}{2 \cdot w} \]
      2. mul0-rgtN/A

        \[\leadsto \frac{0}{\color{blue}{2} \cdot w} \]
      3. div034.1%

        \[\leadsto 0 \]
    9. Applied egg-rr34.1%

      \[\leadsto \color{blue}{0} \]

    if 4.99994e-321 < (*.f64 D D)

    1. Initial program 24.5%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified22.0%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified15.6%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6435.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified35.5%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{\left(\frac{1}{4} \cdot \left(D \cdot D\right)\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{d} \cdot d} \]
      2. associate-/l*N/A

        \[\leadsto \left(\frac{1}{4} \cdot \left(D \cdot D\right)\right) \cdot \color{blue}{\frac{h \cdot \left(M \cdot M\right)}{d \cdot d}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{1}{4} \cdot \left(D \cdot D\right)\right), \color{blue}{\left(\frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot D\right)\right), \left(\frac{\color{blue}{h \cdot \left(M \cdot M\right)}}{d \cdot d}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), \left(\frac{h \cdot \color{blue}{\left(M \cdot M\right)}}{d \cdot d}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \color{blue}{\left(d \cdot d\right)}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), \left(\color{blue}{d} \cdot d\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \left(d \cdot d\right)\right)\right) \]
      9. *-lowering-*.f6436.4%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right)\right) \]
    12. Applied egg-rr36.4%

      \[\leadsto \color{blue}{\left(0.25 \cdot \left(D \cdot D\right)\right) \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification35.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \cdot D \leq 5 \cdot 10^{-321}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(D \cdot D\right) \cdot 0.25\right) \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 37.2% accurate, 7.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 4.2 \cdot 10^{-160}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= D 4.2e-160) 0.0 (* (/ (* (* D D) 0.25) d) (/ (* h (* M M)) d))))
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if (D <= 4.2e-160) {
		tmp = 0.0;
	} else {
		tmp = (((D * D) * 0.25) / 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 <= 4.2d-160) then
        tmp = 0.0d0
    else
        tmp = (((d * d) * 0.25d0) / d_1) * ((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 <= 4.2e-160) {
		tmp = 0.0;
	} else {
		tmp = (((D * D) * 0.25) / d) * ((h * (M * M)) / d);
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	tmp = 0
	if D <= 4.2e-160:
		tmp = 0.0
	else:
		tmp = (((D * D) * 0.25) / d) * ((h * (M * M)) / d)
	return tmp
function code(c0, w, h, D, d, M)
	tmp = 0.0
	if (D <= 4.2e-160)
		tmp = 0.0;
	else
		tmp = Float64(Float64(Float64(Float64(D * D) * 0.25) / d) * Float64(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 <= 4.2e-160)
		tmp = 0.0;
	else
		tmp = (((D * D) * 0.25) / d) * ((h * (M * M)) / d);
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := If[LessEqual[D, 4.2e-160], 0.0, N[(N[(N[(N[(D * D), $MachinePrecision] * 0.25), $MachinePrecision] / d), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;D \leq 4.2 \cdot 10^{-160}:\\
\;\;\;\;0\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if D < 4.2000000000000001e-160

    1. Initial program 24.0%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified23.8%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(-1 \cdot c0\right) \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-lft1-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\left(-1 + 1\right) \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(0 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. mul0-lftN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      6. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 + 1\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      7. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\mathsf{neg}\left(c0 \cdot \left(-1 + 1\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      8. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot \left(\mathsf{neg}\left(\left(-1 + 1\right)\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      9. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      10. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot 0\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot \left(-1 + 1\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \left(-1 + 1\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      13. metadata-eval27.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, 0\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified27.2%

      \[\leadsto \frac{c0 \cdot \color{blue}{\left(c0 \cdot 0\right)}}{2 \cdot w} \]
    8. Step-by-step derivation
      1. mul0-rgtN/A

        \[\leadsto \frac{c0 \cdot 0}{2 \cdot w} \]
      2. mul0-rgtN/A

        \[\leadsto \frac{0}{\color{blue}{2} \cdot w} \]
      3. div027.2%

        \[\leadsto 0 \]
    9. Applied egg-rr27.2%

      \[\leadsto \color{blue}{0} \]

    if 4.2000000000000001e-160 < D

    1. Initial program 26.2%

      \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
    2. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
    3. Simplified22.2%

      \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around -inf

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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(\mathsf{neg}\left(c0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      4. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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 c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \left(-1 \cdot c0\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. Simplified19.6%

      \[\leadsto \frac{c0 \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)}}{2 \cdot w} \]
    8. 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}}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2}\right)}\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({\color{blue}{d}}^{2}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left({D}^{2}\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\left(D \cdot D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(h \cdot {M}^{2}\right)\right)\right), \left({d}^{2}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left({M}^{2}\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \left(M \cdot M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left({d}^{2}\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \left(d \cdot \color{blue}{d}\right)\right) \]
      12. *-lowering-*.f6437.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{d}\right)\right) \]
    10. Simplified37.2%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{d \cdot d}} \]
    11. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \frac{\left(\frac{1}{4} \cdot \left(D \cdot D\right)\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{\color{blue}{d} \cdot d} \]
      2. times-fracN/A

        \[\leadsto \frac{\frac{1}{4} \cdot \left(D \cdot D\right)}{d} \cdot \color{blue}{\frac{h \cdot \left(M \cdot M\right)}{d}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{1}{4} \cdot \left(D \cdot D\right)}{d}\right), \color{blue}{\left(\frac{h \cdot \left(M \cdot M\right)}{d}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{4} \cdot \left(D \cdot D\right)\right), d\right), \left(\frac{\color{blue}{h \cdot \left(M \cdot M\right)}}{d}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \left(D \cdot D\right)\right), d\right), \left(\frac{\color{blue}{h} \cdot \left(M \cdot M\right)}{d}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \left(\frac{h \cdot \left(M \cdot M\right)}{d}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot M\right)\right), \color{blue}{d}\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot M\right)\right), d\right)\right) \]
      9. *-lowering-*.f6446.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(D, D\right)\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, M\right)\right), d\right)\right) \]
    12. Applied egg-rr46.0%

      \[\leadsto \color{blue}{\frac{0.25 \cdot \left(D \cdot D\right)}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification34.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 4.2 \cdot 10^{-160}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(D \cdot D\right) \cdot 0.25}{d} \cdot \frac{h \cdot \left(M \cdot M\right)}{d}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 33.3% accurate, 151.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (c0 w h D d M) :precision binary64 0.0)
double code(double c0, double w, double h, double D, double d, double M) {
	return 0.0;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = 0.0d0
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return 0.0;
}
def code(c0, w, h, D, d, M):
	return 0.0
function code(c0, w, h, D, d, M)
	return 0.0
end
function tmp = code(c0, w, h, D, d, M)
	tmp = 0.0;
end
code[c0_, w_, h_, D_, d_, M_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 24.8%

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
  2. Step-by-step derivation
    1. associate-*l/N/A

      \[\leadsto \frac{c0 \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)}{\color{blue}{2 \cdot w}} \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(c0 \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)\right), \color{blue}{\left(2 \cdot w\right)}\right) \]
  3. Simplified23.2%

    \[\leadsto \color{blue}{\frac{c0 \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot \frac{\frac{\frac{d \cdot d}{w} \cdot c0}{h} \cdot c0}{D \cdot D}}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} - M \cdot M}\right)}{2 \cdot w}} \]
  4. Add Preprocessing
  5. Taylor expanded in c0 around -inf

    \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \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), \mathsf{*.f64}\left(2, w\right)\right) \]
  6. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(-1 \cdot c0\right) \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    2. mul-1-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    3. distribute-lft1-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\left(-1 + 1\right) \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(0 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    5. mul0-lftN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    6. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(-1 + 1\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    7. distribute-lft-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\mathsf{neg}\left(c0 \cdot \left(-1 + 1\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    8. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot \left(\mathsf{neg}\left(\left(-1 + 1\right)\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    9. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot \left(\mathsf{neg}\left(0\right)\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    10. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot 0\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    11. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(c0 \cdot \left(-1 + 1\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \left(-1 + 1\right)\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
    13. metadata-eval29.0%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, 0\right)\right), \mathsf{*.f64}\left(2, w\right)\right) \]
  7. Simplified29.0%

    \[\leadsto \frac{c0 \cdot \color{blue}{\left(c0 \cdot 0\right)}}{2 \cdot w} \]
  8. Step-by-step derivation
    1. mul0-rgtN/A

      \[\leadsto \frac{c0 \cdot 0}{2 \cdot w} \]
    2. mul0-rgtN/A

      \[\leadsto \frac{0}{\color{blue}{2} \cdot w} \]
    3. div029.0%

      \[\leadsto 0 \]
  9. Applied egg-rr29.0%

    \[\leadsto \color{blue}{0} \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2024192 
(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))))))