Henrywood and Agarwal, Equation (13)

Percentage Accurate: 25.0% → 61.5%
Time: 21.6s
Alternatives: 8
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 8 alternatives:

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

Initial Program: 25.0% accurate, 1.0× speedup?

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

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

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

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

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


\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 69.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. Add Preprocessing
    3. Taylor expanded in c0 around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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. Add Preprocessing
    3. Taylor expanded in c0 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 46.2% accurate, 4.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c0}{D} \cdot \left(\frac{c0 \cdot d}{D} \cdot \frac{\frac{d}{w}}{w \cdot h}\right)\\ \mathbf{if}\;w \leq -2 \cdot 10^{+110}:\\ \;\;\;\;0\\ \mathbf{elif}\;w \leq -7.2 \cdot 10^{+25}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;w \leq -6 \cdot 10^{-130}:\\ \;\;\;\;\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;w \leq 5.5 \cdot 10^{+126}:\\ \;\;\;\;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) D) (/ (/ d w) (* w h))))))
   (if (<= w -2e+110)
     0.0
     (if (<= w -7.2e+25)
       t_0
       (if (<= w -6e-130)
         (/ (* 0.25 (* D (* D (* h (* M M))))) (* d d))
         (if (<= w 5.5e+126) 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) / D) * ((d / w) / (w * h)));
	double tmp;
	if (w <= -2e+110) {
		tmp = 0.0;
	} else if (w <= -7.2e+25) {
		tmp = t_0;
	} else if (w <= -6e-130) {
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d);
	} else if (w <= 5.5e+126) {
		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) * (((c0 * d_1) / d) * ((d_1 / w) / (w * h)))
    if (w <= (-2d+110)) then
        tmp = 0.0d0
    else if (w <= (-7.2d+25)) then
        tmp = t_0
    else if (w <= (-6d-130)) then
        tmp = (0.25d0 * (d * (d * (h * (m * m))))) / (d_1 * d_1)
    else if (w <= 5.5d+126) 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) / D) * ((d / w) / (w * h)));
	double tmp;
	if (w <= -2e+110) {
		tmp = 0.0;
	} else if (w <= -7.2e+25) {
		tmp = t_0;
	} else if (w <= -6e-130) {
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d);
	} else if (w <= 5.5e+126) {
		tmp = t_0;
	} else {
		tmp = 0.0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (c0 / D) * (((c0 * d) / D) * ((d / w) / (w * h)))
	tmp = 0
	if w <= -2e+110:
		tmp = 0.0
	elif w <= -7.2e+25:
		tmp = t_0
	elif w <= -6e-130:
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d)
	elif w <= 5.5e+126:
		tmp = t_0
	else:
		tmp = 0.0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 / D) * Float64(Float64(Float64(c0 * d) / D) * Float64(Float64(d / w) / Float64(w * h))))
	tmp = 0.0
	if (w <= -2e+110)
		tmp = 0.0;
	elseif (w <= -7.2e+25)
		tmp = t_0;
	elseif (w <= -6e-130)
		tmp = Float64(Float64(0.25 * Float64(D * Float64(D * Float64(h * Float64(M * M))))) / Float64(d * d));
	elseif (w <= 5.5e+126)
		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) / D) * ((d / w) / (w * h)));
	tmp = 0.0;
	if (w <= -2e+110)
		tmp = 0.0;
	elseif (w <= -7.2e+25)
		tmp = t_0;
	elseif (w <= -6e-130)
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d);
	elseif (w <= 5.5e+126)
		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[(c0 / D), $MachinePrecision] * N[(N[(N[(c0 * d), $MachinePrecision] / D), $MachinePrecision] * N[(N[(d / w), $MachinePrecision] / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[w, -2e+110], 0.0, If[LessEqual[w, -7.2e+25], t$95$0, If[LessEqual[w, -6e-130], N[(N[(0.25 * N[(D * N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], If[LessEqual[w, 5.5e+126], t$95$0, 0.0]]]]]
\begin{array}{l}

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

\mathbf{elif}\;w \leq -7.2 \cdot 10^{+25}:\\
\;\;\;\;t\_0\\

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

\mathbf{elif}\;w \leq 5.5 \cdot 10^{+126}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if w < -2e110 or 5.5000000000000004e126 < w

    1. Initial program 9.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0 \cdot 0}{2 \cdot w} \]
      2. mul0-rgtN/A

        \[\leadsto \frac{0}{\color{blue}{2} \cdot w} \]
      3. div056.1%

        \[\leadsto 0 \]
    9. Applied egg-rr56.1%

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

    if -2e110 < w < -7.20000000000000031e25 or -5.99999999999999972e-130 < w < 5.5000000000000004e126

    1. Initial program 27.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.20000000000000031e25 < w < -5.99999999999999972e-130

    1. Initial program 9.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;w \leq -2 \cdot 10^{+110}:\\ \;\;\;\;0\\ \mathbf{elif}\;w \leq -7.2 \cdot 10^{+25}:\\ \;\;\;\;\frac{c0}{D} \cdot \left(\frac{c0 \cdot d}{D} \cdot \frac{\frac{d}{w}}{w \cdot h}\right)\\ \mathbf{elif}\;w \leq -6 \cdot 10^{-130}:\\ \;\;\;\;\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;w \leq 5.5 \cdot 10^{+126}:\\ \;\;\;\;\frac{c0}{D} \cdot \left(\frac{c0 \cdot d}{D} \cdot \frac{\frac{d}{w}}{w \cdot h}\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 46.4% accurate, 4.7× speedup?

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

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

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

\mathbf{elif}\;d \leq 1.62 \cdot 10^{+299}:\\
\;\;\;\;t\_0 \cdot \frac{c0 \cdot d}{w \cdot \left(h \cdot \left(w \cdot D\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < 5.49999999999999977e-21

    1. Initial program 19.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.49999999999999977e-21 < d < 2.5999999999999999e183

    1. Initial program 27.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5999999999999999e183 < d < 1.62000000000000009e299

    1. Initial program 22.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.62000000000000009e299 < d

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0 \cdot 0}{2 \cdot w} \]
      2. mul0-rgtN/A

        \[\leadsto \frac{0}{\color{blue}{2} \cdot w} \]
      3. div0100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 5.5 \cdot 10^{-21}:\\ \;\;\;\;\frac{c0 \cdot d}{D} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D}}{w \cdot h}\right)\\ \mathbf{elif}\;d \leq 2.6 \cdot 10^{+183}:\\ \;\;\;\;\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 1.62 \cdot 10^{+299}:\\ \;\;\;\;\frac{c0 \cdot d}{D} \cdot \frac{c0 \cdot d}{w \cdot \left(h \cdot \left(w \cdot D\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 45.5% accurate, 4.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c0 \cdot d}{D}\\ \mathbf{if}\;d \leq 5.2 \cdot 10^{-21}:\\ \;\;\;\;t\_0 \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D}}{w \cdot h}\right)\\ \mathbf{elif}\;d \leq 8.4 \cdot 10^{+219}:\\ \;\;\;\;\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 2.35 \cdot 10^{+299}:\\ \;\;\;\;t\_0 \cdot \frac{c0 \cdot d}{D \cdot \left(w \cdot \left(w \cdot h\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (* c0 d) D)))
   (if (<= d 5.2e-21)
     (* t_0 (* (/ c0 w) (/ (/ d D) (* w h))))
     (if (<= d 8.4e+219)
       (/ (* 0.25 (* D (* D (* h (* M M))))) (* d d))
       (if (<= d 2.35e+299) (* t_0 (/ (* c0 d) (* D (* w (* w h))))) 0.0)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * d) / D;
	double tmp;
	if (d <= 5.2e-21) {
		tmp = t_0 * ((c0 / w) * ((d / D) / (w * h)));
	} else if (d <= 8.4e+219) {
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d);
	} else if (d <= 2.35e+299) {
		tmp = t_0 * ((c0 * d) / (D * (w * (w * h))));
	} else {
		tmp = 0.0;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (c0 * d_1) / d
    if (d_1 <= 5.2d-21) then
        tmp = t_0 * ((c0 / w) * ((d_1 / d) / (w * h)))
    else if (d_1 <= 8.4d+219) then
        tmp = (0.25d0 * (d * (d * (h * (m * m))))) / (d_1 * d_1)
    else if (d_1 <= 2.35d+299) then
        tmp = t_0 * ((c0 * d_1) / (d * (w * (w * h))))
    else
        tmp = 0.0d0
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * d) / D;
	double tmp;
	if (d <= 5.2e-21) {
		tmp = t_0 * ((c0 / w) * ((d / D) / (w * h)));
	} else if (d <= 8.4e+219) {
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d);
	} else if (d <= 2.35e+299) {
		tmp = t_0 * ((c0 * d) / (D * (w * (w * h))));
	} else {
		tmp = 0.0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (c0 * d) / D
	tmp = 0
	if d <= 5.2e-21:
		tmp = t_0 * ((c0 / w) * ((d / D) / (w * h)))
	elif d <= 8.4e+219:
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d)
	elif d <= 2.35e+299:
		tmp = t_0 * ((c0 * d) / (D * (w * (w * h))))
	else:
		tmp = 0.0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 * d) / D)
	tmp = 0.0
	if (d <= 5.2e-21)
		tmp = Float64(t_0 * Float64(Float64(c0 / w) * Float64(Float64(d / D) / Float64(w * h))));
	elseif (d <= 8.4e+219)
		tmp = Float64(Float64(0.25 * Float64(D * Float64(D * Float64(h * Float64(M * M))))) / Float64(d * d));
	elseif (d <= 2.35e+299)
		tmp = Float64(t_0 * Float64(Float64(c0 * d) / Float64(D * Float64(w * Float64(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;
	tmp = 0.0;
	if (d <= 5.2e-21)
		tmp = t_0 * ((c0 / w) * ((d / D) / (w * h)));
	elseif (d <= 8.4e+219)
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d);
	elseif (d <= 2.35e+299)
		tmp = t_0 * ((c0 * d) / (D * (w * (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 * d), $MachinePrecision] / D), $MachinePrecision]}, If[LessEqual[d, 5.2e-21], N[(t$95$0 * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / D), $MachinePrecision] / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8.4e+219], N[(N[(0.25 * N[(D * N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.35e+299], N[(t$95$0 * N[(N[(c0 * d), $MachinePrecision] / N[(D * N[(w * N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;d \leq 2.35 \cdot 10^{+299}:\\
\;\;\;\;t\_0 \cdot \frac{c0 \cdot d}{D \cdot \left(w \cdot \left(w \cdot h\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < 5.20000000000000035e-21

    1. Initial program 19.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.20000000000000035e-21 < d < 8.39999999999999952e219

    1. Initial program 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.39999999999999952e219 < d < 2.35e299

    1. Initial program 21.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.35e299 < d

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0 \cdot 0}{2 \cdot w} \]
      2. mul0-rgtN/A

        \[\leadsto \frac{0}{\color{blue}{2} \cdot w} \]
      3. div0100.0%

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

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

Alternative 5: 45.7% accurate, 4.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{c0 \cdot d}{D}\\ \mathbf{if}\;d \leq 1.1 \cdot 10^{-20}:\\ \;\;\;\;t\_0 \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D}}{w \cdot h}\right)\\ \mathbf{elif}\;d \leq 7.5 \cdot 10^{+219}:\\ \;\;\;\;\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 1.46 \cdot 10^{+299}:\\ \;\;\;\;\frac{c0}{D} \cdot \left(t\_0 \cdot \frac{\frac{d}{w}}{w \cdot h}\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \end{array} \]
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (* c0 d) D)))
   (if (<= d 1.1e-20)
     (* t_0 (* (/ c0 w) (/ (/ d D) (* w h))))
     (if (<= d 7.5e+219)
       (/ (* 0.25 (* D (* D (* h (* M M))))) (* d d))
       (if (<= d 1.46e+299) (* (/ c0 D) (* t_0 (/ (/ d w) (* w h)))) 0.0)))))
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * d) / D;
	double tmp;
	if (d <= 1.1e-20) {
		tmp = t_0 * ((c0 / w) * ((d / D) / (w * h)));
	} else if (d <= 7.5e+219) {
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d);
	} else if (d <= 1.46e+299) {
		tmp = (c0 / D) * (t_0 * ((d / w) / (w * h)));
	} else {
		tmp = 0.0;
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (c0 * d_1) / d
    if (d_1 <= 1.1d-20) then
        tmp = t_0 * ((c0 / w) * ((d_1 / d) / (w * h)))
    else if (d_1 <= 7.5d+219) then
        tmp = (0.25d0 * (d * (d * (h * (m * m))))) / (d_1 * d_1)
    else if (d_1 <= 1.46d+299) then
        tmp = (c0 / d) * (t_0 * ((d_1 / w) / (w * h)))
    else
        tmp = 0.0d0
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (c0 * d) / D;
	double tmp;
	if (d <= 1.1e-20) {
		tmp = t_0 * ((c0 / w) * ((d / D) / (w * h)));
	} else if (d <= 7.5e+219) {
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d);
	} else if (d <= 1.46e+299) {
		tmp = (c0 / D) * (t_0 * ((d / w) / (w * h)));
	} else {
		tmp = 0.0;
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	t_0 = (c0 * d) / D
	tmp = 0
	if d <= 1.1e-20:
		tmp = t_0 * ((c0 / w) * ((d / D) / (w * h)))
	elif d <= 7.5e+219:
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d)
	elif d <= 1.46e+299:
		tmp = (c0 / D) * (t_0 * ((d / w) / (w * h)))
	else:
		tmp = 0.0
	return tmp
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(c0 * d) / D)
	tmp = 0.0
	if (d <= 1.1e-20)
		tmp = Float64(t_0 * Float64(Float64(c0 / w) * Float64(Float64(d / D) / Float64(w * h))));
	elseif (d <= 7.5e+219)
		tmp = Float64(Float64(0.25 * Float64(D * Float64(D * Float64(h * Float64(M * M))))) / Float64(d * d));
	elseif (d <= 1.46e+299)
		tmp = Float64(Float64(c0 / D) * Float64(t_0 * Float64(Float64(d / w) / Float64(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;
	tmp = 0.0;
	if (d <= 1.1e-20)
		tmp = t_0 * ((c0 / w) * ((d / D) / (w * h)));
	elseif (d <= 7.5e+219)
		tmp = (0.25 * (D * (D * (h * (M * M))))) / (d * d);
	elseif (d <= 1.46e+299)
		tmp = (c0 / D) * (t_0 * ((d / w) / (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 * d), $MachinePrecision] / D), $MachinePrecision]}, If[LessEqual[d, 1.1e-20], N[(t$95$0 * N[(N[(c0 / w), $MachinePrecision] * N[(N[(d / D), $MachinePrecision] / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7.5e+219], N[(N[(0.25 * N[(D * N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.46e+299], N[(N[(c0 / D), $MachinePrecision] * N[(t$95$0 * N[(N[(d / w), $MachinePrecision] / N[(w * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;d \leq 1.46 \cdot 10^{+299}:\\
\;\;\;\;\frac{c0}{D} \cdot \left(t\_0 \cdot \frac{\frac{d}{w}}{w \cdot h}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if d < 1.09999999999999995e-20

    1. Initial program 19.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.09999999999999995e-20 < d < 7.5000000000000006e219

    1. Initial program 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.5000000000000006e219 < d < 1.45999999999999995e299

    1. Initial program 21.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.45999999999999995e299 < d

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0 \cdot 0}{2 \cdot w} \]
      2. mul0-rgtN/A

        \[\leadsto \frac{0}{\color{blue}{2} \cdot w} \]
      3. div0100.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 1.1 \cdot 10^{-20}:\\ \;\;\;\;\frac{c0 \cdot d}{D} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{d}{D}}{w \cdot h}\right)\\ \mathbf{elif}\;d \leq 7.5 \cdot 10^{+219}:\\ \;\;\;\;\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 1.46 \cdot 10^{+299}:\\ \;\;\;\;\frac{c0}{D} \cdot \left(\frac{c0 \cdot d}{D} \cdot \frac{\frac{d}{w}}{w \cdot h}\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 43.2% accurate, 6.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;M \cdot M \leq 4.8 \cdot 10^{+232}:\\
\;\;\;\;\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 M M) < 4.8000000000000003e232

    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. Add Preprocessing
    3. Taylor expanded in c0 around -inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.8000000000000003e232 < (*.f64 M M)

    1. Initial program 16.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;M \cdot M \leq 4.8 \cdot 10^{+232}:\\ \;\;\;\;\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\left(c0 \cdot d\right) \cdot \frac{c0 \cdot d}{\left(w \cdot h\right) \cdot \left(D \cdot \left(w \cdot D\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 41.1% accurate, 6.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;d \cdot d \leq 2.65 \cdot 10^{+302}:\\
\;\;\;\;\frac{0.25 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot d}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 d d) < 2.65e302

    1. Initial program 19.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.65e302 < (*.f64 d d)

    1. Initial program 21.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{c0 \cdot 0}{2 \cdot w} \]
      2. mul0-rgtN/A

        \[\leadsto \frac{0}{\color{blue}{2} \cdot w} \]
      3. div049.6%

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

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

Alternative 8: 33.5% 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 20.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{c0 \cdot 0}{2 \cdot w} \]
    2. mul0-rgtN/A

      \[\leadsto \frac{0}{\color{blue}{2} \cdot w} \]
    3. div036.1%

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

    \[\leadsto \color{blue}{0} \]
  10. Add Preprocessing

Reproduce

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