Henrywood and Agarwal, Equation (13)

Percentage Accurate: 24.4% → 56.9%
Time: 23.1s
Alternatives: 10
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 10 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.4% 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: 56.9% accurate, 0.9× speedup?

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

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

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


\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 76.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      9. *-lowering-*.f6440.0%

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

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

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot 0 \]
      2. mul0-rgt44.4%

        \[\leadsto 0 \]
    9. Applied egg-rr44.4%

      \[\leadsto \color{blue}{0} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 41.9% accurate, 4.7× speedup?

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

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

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

\mathbf{elif}\;d \leq 3 \cdot 10^{+209}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < 4.00000000000000008e-169 or 2.90000000000000005e115 < d < 2.99999999999999985e209

    1. Initial program 27.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      15. *-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(\mathsf{*.f64}\left(D, \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      16. *-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(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot w\right)\right)\right), w\right)\right) \]
      17. *-lowering-*.f6436.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, w\right)\right)\right), w\right)\right) \]
    12. Simplified36.6%

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000008e-169 < d < 2.90000000000000005e115

    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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.99999999999999985e209 < d

    1. Initial program 12.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      9. *-lowering-*.f6452.8%

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

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

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot 0 \]
      2. mul0-rgt57.9%

        \[\leadsto 0 \]
    9. Applied egg-rr57.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 4 \cdot 10^{-169}:\\ \;\;\;\;\frac{\left(c0 \cdot d\right) \cdot \left(c0 \cdot d\right)}{w \cdot \left(D \cdot \left(\left(w \cdot h\right) \cdot D\right)\right)}\\ \mathbf{elif}\;d \leq 2.9 \cdot 10^{+115}:\\ \;\;\;\;\left(\frac{c0}{w \cdot \left(2 \cdot D\right)} \cdot \frac{c0}{h}\right) \cdot \frac{2 \cdot \left(d \cdot d\right)}{w \cdot D}\\ \mathbf{elif}\;d \leq 3 \cdot 10^{+209}:\\ \;\;\;\;\frac{\left(c0 \cdot d\right) \cdot \left(c0 \cdot d\right)}{w \cdot \left(D \cdot \left(\left(w \cdot h\right) \cdot D\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 40.7% accurate, 4.7× speedup?

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

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

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

\mathbf{elif}\;d \leq 2.7 \cdot 10^{+209}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < 2.55000000000000002e-89 or 4.00000000000000024e140 < d < 2.7e209

    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. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      15. *-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(\mathsf{*.f64}\left(D, \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      16. *-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(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot w\right)\right)\right), w\right)\right) \]
      17. *-lowering-*.f6435.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.55000000000000002e-89 < d < 4.00000000000000024e140

    1. Initial program 34.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      15. *-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(\mathsf{*.f64}\left(D, \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      16. *-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(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot w\right)\right)\right), w\right)\right) \]
      17. *-lowering-*.f6441.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, w\right)\right)\right), w\right)\right) \]
    12. Simplified41.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7e209 < d

    1. Initial program 12.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      9. *-lowering-*.f6452.8%

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

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

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot 0 \]
      2. mul0-rgt57.9%

        \[\leadsto 0 \]
    9. Applied egg-rr57.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 2.55 \cdot 10^{-89}:\\ \;\;\;\;\frac{\left(c0 \cdot d\right) \cdot \left(c0 \cdot d\right)}{w \cdot \left(D \cdot \left(\left(w \cdot h\right) \cdot D\right)\right)}\\ \mathbf{elif}\;d \leq 4 \cdot 10^{+140}:\\ \;\;\;\;\frac{c0 \cdot \left(d \cdot d\right)}{D} \cdot \frac{c0}{w \cdot \left(w \cdot \left(h \cdot D\right)\right)}\\ \mathbf{elif}\;d \leq 2.7 \cdot 10^{+209}:\\ \;\;\;\;\frac{\left(c0 \cdot d\right) \cdot \left(c0 \cdot d\right)}{w \cdot \left(D \cdot \left(\left(w \cdot h\right) \cdot D\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 36.3% accurate, 4.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;d \leq 6.8 \cdot 10^{-139}:\\
\;\;\;\;0\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if d < 6.79999999999999998e-139 or 2.7e209 < d

    1. Initial program 22.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      9. *-lowering-*.f6430.1%

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

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

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot 0 \]
      2. mul0-rgt32.8%

        \[\leadsto 0 \]
    9. Applied egg-rr32.8%

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

    if 6.79999999999999998e-139 < d < 2.00000000000000007e139

    1. Initial program 30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      15. *-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(\mathsf{*.f64}\left(D, \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      16. *-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(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot w\right)\right)\right), w\right)\right) \]
      17. *-lowering-*.f6441.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, w\right)\right)\right), w\right)\right) \]
    12. Simplified41.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000007e139 < d < 2.7e209

    1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      15. *-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(\mathsf{*.f64}\left(D, \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      16. *-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(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot w\right)\right)\right), w\right)\right) \]
      17. *-lowering-*.f6434.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, w\right)\right)\right), w\right)\right) \]
    12. Simplified34.5%

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

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

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

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

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

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

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

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

Alternative 5: 35.9% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;d \leq 2.9 \cdot 10^{-140}:\\
\;\;\;\;0\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if d < 2.89999999999999997e-140 or 3.4999999999999998e187 < d

    1. Initial program 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      9. *-lowering-*.f6430.3%

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

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

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot 0 \]
      2. mul0-rgt32.9%

        \[\leadsto 0 \]
    9. Applied egg-rr32.9%

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

    if 2.89999999999999997e-140 < d < 3.4999999999999998e187

    1. Initial program 31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      15. *-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(\mathsf{*.f64}\left(D, \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      16. *-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(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot w\right)\right)\right), w\right)\right) \]
      17. *-lowering-*.f6440.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 2.9 \cdot 10^{-140}:\\ \;\;\;\;0\\ \mathbf{elif}\;d \leq 3.5 \cdot 10^{+187}:\\ \;\;\;\;\frac{c0 \cdot \left(d \cdot d\right)}{D} \cdot \frac{c0}{w \cdot \left(w \cdot \left(h \cdot D\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 39.1% accurate, 5.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c0 < -2.15e-119

    1. Initial program 26.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      15. *-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(\mathsf{*.f64}\left(D, \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      16. *-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(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot w\right)\right)\right), w\right)\right) \]
      17. *-lowering-*.f6437.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, w\right)\right)\right), w\right)\right) \]
    12. Simplified37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.15e-119 < c0 < 7.50000000000000006e-52

    1. Initial program 21.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      9. *-lowering-*.f6450.5%

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

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

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot 0 \]
      2. mul0-rgt50.5%

        \[\leadsto 0 \]
    9. Applied egg-rr50.5%

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

    if 7.50000000000000006e-52 < c0

    1. Initial program 26.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      15. *-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(\mathsf{*.f64}\left(D, \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      16. *-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(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot w\right)\right)\right), w\right)\right) \]
      17. *-lowering-*.f6444.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, w\right)\right)\right), w\right)\right) \]
    12. Simplified44.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 38.9% accurate, 5.6× speedup?

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

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

\mathbf{elif}\;c0 \leq 8.6 \cdot 10^{-51}:\\
\;\;\;\;0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c0 < -4.59999999999999989e-117 or 8.5999999999999995e-51 < c0

    1. Initial program 26.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\left(D \cdot \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      15. *-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(\mathsf{*.f64}\left(D, \left(D \cdot \left(h \cdot w\right)\right)\right), w\right)\right) \]
      16. *-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(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left(h \cdot w\right)\right)\right), w\right)\right) \]
      17. *-lowering-*.f6440.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(h, w\right)\right)\right), w\right)\right) \]
    12. Simplified40.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.59999999999999989e-117 < c0 < 8.5999999999999995e-51

    1. Initial program 22.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      9. *-lowering-*.f6449.9%

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

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

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot 0 \]
      2. mul0-rgt49.9%

        \[\leadsto 0 \]
    9. Applied egg-rr49.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;c0 \leq -4.6 \cdot 10^{-117}:\\ \;\;\;\;\frac{c0 \cdot c0}{D} \cdot \frac{d \cdot d}{w \cdot \left(w \cdot \left(h \cdot D\right)\right)}\\ \mathbf{elif}\;c0 \leq 8.6 \cdot 10^{-51}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot c0}{D} \cdot \frac{d \cdot d}{w \cdot \left(w \cdot \left(h \cdot D\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 40.9% accurate, 5.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if D < 1.9000000000000001e-239

    1. Initial program 22.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      9. *-lowering-*.f6431.9%

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

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

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot 0 \]
      2. mul0-rgt36.0%

        \[\leadsto 0 \]
    9. Applied egg-rr36.0%

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

    if 1.9000000000000001e-239 < D

    1. Initial program 28.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{d}{D} \cdot \frac{\frac{\frac{d}{D}}{\frac{h}{2 \cdot \frac{c0}{w}}}}{\frac{2}{\frac{c0}{w}}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 39.7% accurate, 5.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if D < 2.1000000000000002e-239

    1. Initial program 22.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
      9. *-lowering-*.f6431.9%

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

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

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot 0 \]
      2. mul0-rgt36.0%

        \[\leadsto 0 \]
    9. Applied egg-rr36.0%

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

    if 2.1000000000000002e-239 < D

    1. Initial program 28.8%

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

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

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0}{2}\right), w\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{c0 \cdot \left(d \cdot d\right)}}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
    3. Simplified26.0%

      \[\leadsto \color{blue}{\frac{\frac{c0}{2}}{w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\frac{c0}{w \cdot h} \cdot \left(\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}\right)}{D \cdot D} - M \cdot M}\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in c0 around inf

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \color{blue}{\left(2 \cdot \frac{c0 \cdot {d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right) \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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(\mathsf{/.f64}\left(c0, 2\right), w\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.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\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) \]
    7. Simplified38.5%

      \[\leadsto \frac{\frac{c0}{2}}{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)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\frac{c0}{2}}{w} \cdot \left(2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)\right)}{\color{blue}{\left(D \cdot D\right) \cdot \left(w \cdot h\right)}} \]
      2. associate-*l*N/A

        \[\leadsto \frac{\frac{\frac{c0}{2}}{w} \cdot \left(2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)\right)}{D \cdot \color{blue}{\left(D \cdot \left(w \cdot h\right)\right)}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\frac{\frac{c0}{2}}{w} \cdot \left(2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot \color{blue}{D}\right)} \]
      4. times-fracN/A

        \[\leadsto \frac{\frac{\frac{c0}{2}}{w}}{D} \cdot \color{blue}{\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(w \cdot h\right) \cdot D}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\frac{c0}{2}}{w}}{D}\right), \color{blue}{\left(\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(w \cdot h\right) \cdot D}\right)}\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{c0}{2}}{w}\right), D\right), \left(\frac{\color{blue}{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}}{\left(w \cdot h\right) \cdot D}\right)\right) \]
      7. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0}{w \cdot 2}\right), D\right), \left(\frac{\color{blue}{2} \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(w \cdot h\right) \cdot D}\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{c0}{w}}{2}\right), D\right), \left(\frac{\color{blue}{2} \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(w \cdot h\right) \cdot D}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0}{w}\right), 2\right), D\right), \left(\frac{\color{blue}{2} \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(w \cdot h\right) \cdot D}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \left(\frac{2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)}{\left(w \cdot h\right) \cdot D}\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \mathsf{/.f64}\left(\left(2 \cdot \left(c0 \cdot \left(d \cdot d\right)\right)\right), \color{blue}{\left(\left(w \cdot h\right) \cdot D\right)}\right)\right) \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \mathsf{/.f64}\left(\left(\left(c0 \cdot \left(d \cdot d\right)\right) \cdot 2\right), \left(\color{blue}{\left(w \cdot h\right)} \cdot D\right)\right)\right) \]
      13. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \mathsf{/.f64}\left(\left(c0 \cdot \left(\left(d \cdot d\right) \cdot 2\right)\right), \left(\color{blue}{\left(w \cdot h\right)} \cdot D\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \left(\left(d \cdot d\right) \cdot 2\right)\right), \left(\color{blue}{\left(w \cdot h\right)} \cdot D\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\left(d \cdot d\right), 2\right)\right), \left(\left(w \cdot \color{blue}{h}\right) \cdot D\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), 2\right)\right), \left(\left(w \cdot h\right) \cdot D\right)\right)\right) \]
      17. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), 2\right)\right), \left(\left(h \cdot w\right) \cdot D\right)\right)\right) \]
      18. associate-*l*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), 2\right)\right), \left(h \cdot \color{blue}{\left(w \cdot D\right)}\right)\right)\right) \]
      19. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), 2\right)\right), \mathsf{*.f64}\left(h, \color{blue}{\left(w \cdot D\right)}\right)\right)\right) \]
      20. *-lowering-*.f6442.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, w\right), 2\right), D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), 2\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(w, \color{blue}{D}\right)\right)\right)\right) \]
    9. Applied egg-rr42.5%

      \[\leadsto \color{blue}{\frac{\frac{\frac{c0}{w}}{2}}{D} \cdot \frac{c0 \cdot \left(\left(d \cdot d\right) \cdot 2\right)}{h \cdot \left(w \cdot D\right)}} \]
    10. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{\frac{\frac{c0}{w}}{2} \cdot \frac{c0 \cdot \left(\left(d \cdot d\right) \cdot 2\right)}{h \cdot \left(w \cdot D\right)}}{\color{blue}{D}} \]
      2. associate-/l*N/A

        \[\leadsto \frac{\frac{c0}{w}}{2} \cdot \color{blue}{\frac{\frac{c0 \cdot \left(\left(d \cdot d\right) \cdot 2\right)}{h \cdot \left(w \cdot D\right)}}{D}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{c0}{w \cdot 2} \cdot \frac{\color{blue}{\frac{c0 \cdot \left(\left(d \cdot d\right) \cdot 2\right)}{h \cdot \left(w \cdot D\right)}}}{D} \]
      4. associate-/l/N/A

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \frac{\color{blue}{\frac{c0 \cdot \left(\left(d \cdot d\right) \cdot 2\right)}{h \cdot \left(w \cdot D\right)}}}{D} \]
      5. associate-*r*N/A

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \frac{\frac{c0 \cdot \left(\left(d \cdot d\right) \cdot 2\right)}{\left(h \cdot w\right) \cdot D}}{D} \]
      6. *-commutativeN/A

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \frac{\frac{c0 \cdot \left(\left(d \cdot d\right) \cdot 2\right)}{\left(w \cdot h\right) \cdot D}}{D} \]
      7. associate-/r*N/A

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \frac{\frac{\frac{c0 \cdot \left(\left(d \cdot d\right) \cdot 2\right)}{w \cdot h}}{D}}{D} \]
      8. *-commutativeN/A

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \frac{\frac{\frac{c0 \cdot \left(2 \cdot \left(d \cdot d\right)\right)}{w \cdot h}}{D}}{D} \]
      9. associate-*r*N/A

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \frac{\frac{\frac{\left(c0 \cdot 2\right) \cdot \left(d \cdot d\right)}{w \cdot h}}{D}}{D} \]
      10. associate-*l/N/A

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \frac{\frac{\frac{c0 \cdot 2}{w \cdot h} \cdot \left(d \cdot d\right)}{D}}{D} \]
      11. associate-/r*N/A

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \frac{\frac{c0 \cdot 2}{w \cdot h} \cdot \left(d \cdot d\right)}{\color{blue}{D \cdot D}} \]
      12. associate-*r/N/A

        \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \left(\frac{c0 \cdot 2}{w \cdot h} \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}}\right) \]
      13. associate-*r*N/A

        \[\leadsto \left(\frac{\frac{c0}{2}}{w} \cdot \frac{c0 \cdot 2}{w \cdot h}\right) \cdot \color{blue}{\frac{d \cdot d}{D \cdot D}} \]
      14. times-fracN/A

        \[\leadsto \left(\frac{\frac{c0}{2}}{w} \cdot \frac{c0 \cdot 2}{w \cdot h}\right) \cdot \left(\frac{d}{D} \cdot \color{blue}{\frac{d}{D}}\right) \]
    11. Applied egg-rr50.3%

      \[\leadsto \color{blue}{\left(\frac{\frac{c0}{w \cdot 2}}{\frac{w \cdot h}{c0 \cdot 2}} \cdot \frac{d}{D}\right) \cdot \frac{d}{D}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification41.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 2.1 \cdot 10^{-239}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{D} \cdot \left(\frac{d}{D} \cdot \frac{\frac{c0}{2 \cdot w}}{\frac{w \cdot h}{c0 \cdot 2}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 33.1% 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.9%

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]
  2. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{c0}{2 \cdot w}\right), \color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right) \]
    2. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{c0}{2}}{w}\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{c0}{2}\right), w\right), \left(\color{blue}{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\frac{\color{blue}{c0 \cdot \left(d \cdot d\right)}}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \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) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{+.f64}\left(\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\right), \color{blue}{\left(\sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)}\right)\right) \]
  3. Simplified22.5%

    \[\leadsto \color{blue}{\frac{\frac{c0}{2}}{w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\frac{\frac{c0}{w \cdot h} \cdot \left(\left(d \cdot d\right) \cdot \frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}\right)}{D \cdot D} - M \cdot M}\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in c0 around -inf

    \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \color{blue}{\left(-1 \cdot \left(c0 \cdot \left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right)}\right) \]
  6. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(-1 \cdot c0\right) \cdot \color{blue}{\left(-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)}\right)\right) \]
    2. mul-1-negN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\color{blue}{-1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}} + \frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
    3. distribute-lft1-inN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(\left(-1 + 1\right) \cdot \color{blue}{\frac{{d}^{2}}{{D}^{2} \cdot \left(h \cdot w\right)}}\right)\right)\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot \left(0 \cdot \frac{\color{blue}{{d}^{2}}}{{D}^{2} \cdot \left(h \cdot w\right)}\right)\right)\right) \]
    5. mul0-lftN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\left(\mathsf{neg}\left(c0\right)\right) \cdot 0\right)\right) \]
    6. distribute-lft-neg-inN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(\mathsf{neg}\left(c0 \cdot 0\right)\right)\right) \]
    7. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot \color{blue}{\left(\mathsf{neg}\left(0\right)\right)}\right)\right) \]
    8. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \left(c0 \cdot 0\right)\right) \]
    9. *-lowering-*.f6430.4%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(c0, 2\right), w\right), \mathsf{*.f64}\left(c0, \color{blue}{0}\right)\right) \]
  7. Simplified30.4%

    \[\leadsto \frac{\frac{c0}{2}}{w} \cdot \color{blue}{\left(c0 \cdot 0\right)} \]
  8. Step-by-step derivation
    1. mul0-rgtN/A

      \[\leadsto \frac{\frac{c0}{2}}{w} \cdot 0 \]
    2. mul0-rgt33.8%

      \[\leadsto 0 \]
  9. Applied egg-rr33.8%

    \[\leadsto \color{blue}{0} \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2024161 
(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))))))