?

Average Accuracy: 7.7% → 70.6%
Time: 37.3s
Precision: binary64
Cost: 13572

?

\[\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) \]
\[\begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ \mathbf{if}\;h \leq 1.5 \cdot 10^{-292}:\\ \;\;\;\;h \cdot \left(\left(t_0 \cdot t_0\right) \cdot 0.25\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{h} \cdot \left(t_0 \cdot 0.5\right)\right)}^{2}\\ \end{array} \]
(FPCore (c0 w h D d M)
 :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))))))
(FPCore (c0 w h D d M)
 :precision binary64
 (let* ((t_0 (/ (* M D) d)))
   (if (<= h 1.5e-292)
     (* h (* (* t_0 t_0) 0.25))
     (pow (* (sqrt h) (* t_0 0.5)) 2.0))))
double code(double c0, double w, double h, double D, double d, double M) {
	return (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))));
}
double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (M * D) / d;
	double tmp;
	if (h <= 1.5e-292) {
		tmp = h * ((t_0 * t_0) * 0.25);
	} else {
		tmp = pow((sqrt(h) * (t_0 * 0.5)), 2.0);
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = (c0 / (2.0d0 * w)) * (((c0 * (d_1 * d_1)) / ((w * h) * (d * d))) + sqrt(((((c0 * (d_1 * d_1)) / ((w * h) * (d * d))) * ((c0 * (d_1 * d_1)) / ((w * h) * (d * d)))) - (m * m))))
end function
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 = (m * d) / d_1
    if (h <= 1.5d-292) then
        tmp = h * ((t_0 * t_0) * 0.25d0)
    else
        tmp = (sqrt(h) * (t_0 * 0.5d0)) ** 2.0d0
    end if
    code = tmp
end function
public static double code(double c0, double w, double h, double D, double d, double M) {
	return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + Math.sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
}
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = (M * D) / d;
	double tmp;
	if (h <= 1.5e-292) {
		tmp = h * ((t_0 * t_0) * 0.25);
	} else {
		tmp = Math.pow((Math.sqrt(h) * (t_0 * 0.5)), 2.0);
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + math.sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))))
def code(c0, w, h, D, d, M):
	t_0 = (M * D) / d
	tmp = 0
	if h <= 1.5e-292:
		tmp = h * ((t_0 * t_0) * 0.25)
	else:
		tmp = math.pow((math.sqrt(h) * (t_0 * 0.5)), 2.0)
	return tmp
function code(c0, w, h, D, d, M)
	return Float64(Float64(c0 / Float64(2.0 * w)) * Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) + sqrt(Float64(Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) * Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))) - Float64(M * M)))))
end
function code(c0, w, h, D, d, M)
	t_0 = Float64(Float64(M * D) / d)
	tmp = 0.0
	if (h <= 1.5e-292)
		tmp = Float64(h * Float64(Float64(t_0 * t_0) * 0.25));
	else
		tmp = Float64(sqrt(h) * Float64(t_0 * 0.5)) ^ 2.0;
	end
	return tmp
end
function tmp = code(c0, w, h, D, d, M)
	tmp = (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))));
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = (M * D) / d;
	tmp = 0.0;
	if (h <= 1.5e-292)
		tmp = h * ((t_0 * t_0) * 0.25);
	else
		tmp = (sqrt(h) * (t_0 * 0.5)) ^ 2.0;
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(N[(N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, If[LessEqual[h, 1.5e-292], N[(h * N[(N[(t$95$0 * t$95$0), $MachinePrecision] * 0.25), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Sqrt[h], $MachinePrecision] * N[(t$95$0 * 0.5), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]
\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)
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
\mathbf{if}\;h \leq 1.5 \cdot 10^{-292}:\\
\;\;\;\;h \cdot \left(\left(t_0 \cdot t_0\right) \cdot 0.25\right)\\

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{h} \cdot \left(t_0 \cdot 0.5\right)\right)}^{2}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if h < 1.50000000000000008e-292

    1. Initial program 7.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. Simplified7.1%

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

      [Start]7.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) \]

      associate-*l* [=>]5.7

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

      difference-of-squares [=>]5.7

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

      associate-*l* [=>]5.9

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

      associate-*l* [=>]7.1

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{c0}{w}, \frac{d}{h \cdot D} \cdot \frac{d}{D}, \sqrt{{\left(\frac{c0}{w} \cdot \left(\frac{d}{h \cdot D} \cdot \frac{d}{D}\right)\right)}^{2} - M \cdot M}\right)}{2 \cdot \frac{w}{c0}}} \]
      Proof

      [Start]7.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} - M\right)}\right) \]

      *-commutative [=>]7.1

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

      clear-num [=>]7.1

      \[ \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} - M\right)}\right) \cdot \color{blue}{\frac{1}{\frac{2 \cdot w}{c0}}} \]

      un-div-inv [=>]7.1

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.25, \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}, \frac{c0 \cdot \left(c0 \cdot 0\right)}{w}\right)} \]
      Proof

      [Start]5.6

      \[ -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w} + 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}} \]

      +-commutative [=>]5.6

      \[ \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}} + -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}} \]

      fma-def [=>]5.6

      \[ \color{blue}{\mathsf{fma}\left(0.25, \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right)} \]

      unpow2 [=>]5.6

      \[ \mathsf{fma}\left(0.25, \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\color{blue}{d \cdot d}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right) \]

      associate-/l* [=>]5.5

      \[ \mathsf{fma}\left(0.25, \color{blue}{\frac{{D}^{2}}{\frac{d \cdot d}{{M}^{2} \cdot h}}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right) \]

      unpow2 [=>]5.5

      \[ \mathsf{fma}\left(0.25, \frac{\color{blue}{D \cdot D}}{\frac{d \cdot d}{{M}^{2} \cdot h}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right) \]

      *-commutative [<=]5.5

      \[ \mathsf{fma}\left(0.25, \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot {M}^{2}}}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right) \]

      unpow2 [=>]5.5

      \[ \mathsf{fma}\left(0.25, \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right) \]

      associate-/l* [=>]5.1

      \[ \mathsf{fma}\left(0.25, \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}, -0.5 \cdot \color{blue}{\frac{\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}}{\frac{w}{{c0}^{2}}}}\right) \]
    6. Taylor expanded in D around 0 43.3%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    7. Simplified43.8%

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

      [Start]43.3

      \[ 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}} \]

      *-commutative [=>]43.3

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

      unpow2 [=>]43.3

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

      unpow2 [=>]43.3

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

      *-commutative [=>]43.3

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

      unpow2 [=>]43.3

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

      *-commutative [<=]43.3

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

      associate-*r/ [<=]43.4

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

      associate-*l* [=>]44.1

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

      *-commutative [<=]44.1

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

      associate-*l* [=>]44.1

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

      *-commutative [=>]44.1

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

      associate-*r/ [=>]43.8

      \[ h \cdot \left(\color{blue}{\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d}} \cdot 0.25\right) \]
    8. Applied egg-rr68.1%

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

      [Start]43.8

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

      add-sqr-sqrt [=>]43.8

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

      sqrt-div [=>]43.8

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

      sqrt-prod [=>]43.8

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

      sqrt-prod [=>]21.8

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

      add-sqr-sqrt [<=]41.7

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

      sqrt-prod [=>]20.4

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

      add-sqr-sqrt [<=]42.0

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

      sqrt-prod [=>]21.1

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

      add-sqr-sqrt [<=]41.8

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

      sqrt-div [=>]41.8

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

      sqrt-prod [=>]42.4

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

      sqrt-prod [=>]23.6

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

      add-sqr-sqrt [<=]47.1

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

      sqrt-prod [=>]26.5

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

      add-sqr-sqrt [<=]52.6

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

      sqrt-prod [=>]34.3

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

      add-sqr-sqrt [<=]68.1

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

    if 1.50000000000000008e-292 < h

    1. Initial program 8.3%

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

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

      [Start]8.3

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right) \]

      associate-*l* [=>]6.7

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

      difference-of-squares [=>]6.7

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

      associate-*l* [=>]6.8

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

      associate-*l* [=>]8.0

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\frac{c0}{w}, \frac{d}{h \cdot D} \cdot \frac{d}{D}, \sqrt{{\left(\frac{c0}{w} \cdot \left(\frac{d}{h \cdot D} \cdot \frac{d}{D}\right)\right)}^{2} - M \cdot M}\right)}{2 \cdot \frac{w}{c0}}} \]
      Proof

      [Start]8.0

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} - M\right)}\right) \]

      *-commutative [=>]8.0

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

      clear-num [=>]8.0

      \[ \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + \sqrt{\left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)} - M\right)}\right) \cdot \color{blue}{\frac{1}{\frac{2 \cdot w}{c0}}} \]

      un-div-inv [=>]8.0

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w} + 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    5. Simplified45.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.25, \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}, \frac{c0 \cdot \left(c0 \cdot 0\right)}{w}\right)} \]
      Proof

      [Start]6.1

      \[ -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w} + 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}} \]

      +-commutative [=>]6.1

      \[ \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}} + -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}} \]

      fma-def [=>]6.1

      \[ \color{blue}{\mathsf{fma}\left(0.25, \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right)} \]

      unpow2 [=>]6.1

      \[ \mathsf{fma}\left(0.25, \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{\color{blue}{d \cdot d}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right) \]

      associate-/l* [=>]6.0

      \[ \mathsf{fma}\left(0.25, \color{blue}{\frac{{D}^{2}}{\frac{d \cdot d}{{M}^{2} \cdot h}}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right) \]

      unpow2 [=>]6.0

      \[ \mathsf{fma}\left(0.25, \frac{\color{blue}{D \cdot D}}{\frac{d \cdot d}{{M}^{2} \cdot h}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right) \]

      *-commutative [<=]6.0

      \[ \mathsf{fma}\left(0.25, \frac{D \cdot D}{\frac{d \cdot d}{\color{blue}{h \cdot {M}^{2}}}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right) \]

      unpow2 [=>]6.0

      \[ \mathsf{fma}\left(0.25, \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \color{blue}{\left(M \cdot M\right)}}}, -0.5 \cdot \frac{\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot {c0}^{2}}{w}\right) \]

      associate-/l* [=>]5.7

      \[ \mathsf{fma}\left(0.25, \frac{D \cdot D}{\frac{d \cdot d}{h \cdot \left(M \cdot M\right)}}, -0.5 \cdot \color{blue}{\frac{\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}}{\frac{w}{{c0}^{2}}}}\right) \]
    6. Taylor expanded in D around 0 45.3%

      \[\leadsto \color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    7. Simplified45.7%

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

      [Start]45.3

      \[ 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}} \]

      *-commutative [=>]45.3

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

      unpow2 [=>]45.3

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

      unpow2 [=>]45.3

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

      *-commutative [=>]45.3

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

      unpow2 [=>]45.3

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

      *-commutative [<=]45.3

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

      associate-*r/ [<=]45.2

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

      associate-*l* [=>]45.8

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

      *-commutative [<=]45.8

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

      associate-*l* [=>]45.8

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

      *-commutative [=>]45.8

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

      associate-*r/ [=>]45.7

      \[ h \cdot \left(\color{blue}{\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d}} \cdot 0.25\right) \]
    8. Applied egg-rr73.3%

      \[\leadsto \color{blue}{{\left(\sqrt{h} \cdot \left(0.5 \cdot \frac{M \cdot D}{d}\right)\right)}^{2}} \]
      Proof

      [Start]45.7

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

      add-sqr-sqrt [=>]45.7

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

      pow2 [=>]45.7

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

      sqrt-prod [=>]45.7

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

      *-commutative [=>]45.7

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

      sqrt-prod [=>]45.7

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

      metadata-eval [=>]45.7

      \[ {\left(\sqrt{h} \cdot \left(\color{blue}{0.5} \cdot \sqrt{\frac{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}{d \cdot d}}\right)\right)}^{2} \]

      sqrt-div [=>]46.3

      \[ {\left(\sqrt{h} \cdot \left(0.5 \cdot \color{blue}{\frac{\sqrt{\left(M \cdot M\right) \cdot \left(D \cdot D\right)}}{\sqrt{d \cdot d}}}\right)\right)}^{2} \]

      sqrt-prod [=>]47.3

      \[ {\left(\sqrt{h} \cdot \left(0.5 \cdot \frac{\color{blue}{\sqrt{M \cdot M} \cdot \sqrt{D \cdot D}}}{\sqrt{d \cdot d}}\right)\right)}^{2} \]

      sqrt-prod [=>]27.1

      \[ {\left(\sqrt{h} \cdot \left(0.5 \cdot \frac{\color{blue}{\left(\sqrt{M} \cdot \sqrt{M}\right)} \cdot \sqrt{D \cdot D}}{\sqrt{d \cdot d}}\right)\right)}^{2} \]

      add-sqr-sqrt [<=]53.5

      \[ {\left(\sqrt{h} \cdot \left(0.5 \cdot \frac{\color{blue}{M} \cdot \sqrt{D \cdot D}}{\sqrt{d \cdot d}}\right)\right)}^{2} \]

      sqrt-prod [=>]29.5

      \[ {\left(\sqrt{h} \cdot \left(0.5 \cdot \frac{M \cdot \color{blue}{\left(\sqrt{D} \cdot \sqrt{D}\right)}}{\sqrt{d \cdot d}}\right)\right)}^{2} \]

      add-sqr-sqrt [<=]61.9

      \[ {\left(\sqrt{h} \cdot \left(0.5 \cdot \frac{M \cdot \color{blue}{D}}{\sqrt{d \cdot d}}\right)\right)}^{2} \]

      sqrt-prod [=>]35.6

      \[ {\left(\sqrt{h} \cdot \left(0.5 \cdot \frac{M \cdot D}{\color{blue}{\sqrt{d} \cdot \sqrt{d}}}\right)\right)}^{2} \]

      add-sqr-sqrt [<=]73.3

      \[ {\left(\sqrt{h} \cdot \left(0.5 \cdot \frac{M \cdot D}{\color{blue}{d}}\right)\right)}^{2} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq 1.5 \cdot 10^{-292}:\\ \;\;\;\;h \cdot \left(\left(\frac{M \cdot D}{d} \cdot \frac{M \cdot D}{d}\right) \cdot 0.25\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{h} \cdot \left(\frac{M \cdot D}{d} \cdot 0.5\right)\right)}^{2}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy67.2%
Cost8264
\[\begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ \mathbf{if}\;d \cdot d \leq 2 \cdot 10^{-149}:\\ \;\;\;\;h \cdot \left(\left(t_0 \cdot t_0\right) \cdot 0.25\right)\\ \mathbf{elif}\;d \cdot d \leq 5 \cdot 10^{+252}:\\ \;\;\;\;\frac{h \cdot \left(0.25 \cdot {\left(M \cdot D\right)}^{2}\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.25, D \cdot \left(h \cdot \frac{D}{\frac{d}{M} \cdot \frac{d}{M}}\right), \frac{c0 \cdot \left(c0 \cdot 0\right)}{w}\right)\\ \end{array} \]
Alternative 2
Accuracy68.6%
Cost8264
\[\begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ \mathbf{if}\;D \cdot D \leq 2 \cdot 10^{-164}:\\ \;\;\;\;h \cdot \left(\left(t_0 \cdot t_0\right) \cdot 0.25\right)\\ \mathbf{elif}\;D \cdot D \leq 2 \cdot 10^{+117}:\\ \;\;\;\;\mathsf{fma}\left(0.25, \frac{D \cdot D}{\frac{d}{h \cdot M} \cdot \frac{d}{M}}, \frac{c0 \cdot \left(c0 \cdot 0\right)}{w}\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(D \cdot \frac{M}{d}\right)}^{2} \cdot \left(h \cdot 0.25\right)\\ \end{array} \]
Alternative 3
Accuracy68.2%
Cost7752
\[\begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ \mathbf{if}\;d \cdot d \leq 2 \cdot 10^{-149}:\\ \;\;\;\;h \cdot \left(\left(t_0 \cdot t_0\right) \cdot 0.25\right)\\ \mathbf{elif}\;d \cdot d \leq 2 \cdot 10^{+231}:\\ \;\;\;\;\frac{h \cdot \left(0.25 \cdot {\left(M \cdot D\right)}^{2}\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;h \cdot \left(0.25 \cdot \frac{-1}{-{\left(D \cdot \frac{M}{d}\right)}^{-2}}\right)\\ \end{array} \]
Alternative 4
Accuracy68.3%
Cost7688
\[\begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ \mathbf{if}\;d \cdot d \leq 2 \cdot 10^{-149}:\\ \;\;\;\;h \cdot \left(\left(t_0 \cdot t_0\right) \cdot 0.25\right)\\ \mathbf{elif}\;d \cdot d \leq 2 \cdot 10^{+231}:\\ \;\;\;\;\frac{h \cdot \left(0.25 \cdot {\left(M \cdot D\right)}^{2}\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;{\left(D \cdot \frac{M}{d}\right)}^{2} \cdot \left(h \cdot 0.25\right)\\ \end{array} \]
Alternative 5
Accuracy68.2%
Cost7432
\[\begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ \mathbf{if}\;M \leq 6.5 \cdot 10^{+149}:\\ \;\;\;\;{\left(D \cdot \frac{M}{d}\right)}^{2} \cdot \left(h \cdot 0.25\right)\\ \mathbf{elif}\;M \leq 1.82 \cdot 10^{+264}:\\ \;\;\;\;0.25 \cdot \left(\frac{{\left(M \cdot D\right)}^{2}}{d} \cdot \frac{h}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;h \cdot \left(\left(t_0 \cdot t_0\right) \cdot 0.25\right)\\ \end{array} \]
Alternative 6
Accuracy52.3%
Cost1489
\[\begin{array}{l} \mathbf{if}\;d \leq -8 \cdot 10^{+125}:\\ \;\;\;\;0\\ \mathbf{elif}\;d \leq -1.32 \cdot 10^{-96} \lor \neg \left(d \leq 3.5 \cdot 10^{-162}\right) \land d \leq 1.22 \cdot 10^{+114}:\\ \;\;\;\;0.25 \cdot \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 7
Accuracy52.3%
Cost1488
\[\begin{array}{l} \mathbf{if}\;M \leq -3.9 \cdot 10^{+126}:\\ \;\;\;\;0\\ \mathbf{elif}\;M \leq -6.8 \cdot 10^{-140}:\\ \;\;\;\;h \cdot \left(0.25 \cdot \left(\left(M \cdot M\right) \cdot \frac{D \cdot D}{d \cdot d}\right)\right)\\ \mathbf{elif}\;M \leq 2.6 \cdot 10^{-93}:\\ \;\;\;\;0\\ \mathbf{elif}\;M \leq 8.2 \cdot 10^{+105}:\\ \;\;\;\;0.25 \cdot \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot d}\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 8
Accuracy61.4%
Cost960
\[h \cdot \left(0.25 \cdot \left(\frac{M}{d} \cdot \frac{D \cdot \left(M \cdot D\right)}{d}\right)\right) \]
Alternative 9
Accuracy68.5%
Cost960
\[\begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ h \cdot \left(\left(t_0 \cdot t_0\right) \cdot 0.25\right) \end{array} \]
Alternative 10
Accuracy49.8%
Cost64
\[0 \]

Error

Reproduce?

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