?

Average Error: 42.07% → 25.52%
Time: 49.6s
Precision: binary64
Cost: 104464

?

\[ \begin{array}{c}[M, D] = \mathsf{sort}([M, D])\\ \end{array} \]
\[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\\ t_2 := t_1 \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right)\\ t_3 := \frac{M \cdot D}{d}\\ t_4 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{t_3}^{2}}}\right)\\ \mathbf{if}\;t_2 \leq -2 \cdot 10^{+40}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\ell}{t_0} \cdot \frac{\frac{1}{h}}{t_0}}\right)\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_2 \leq 10^{+302}:\\ \;\;\;\;t_1 \cdot \left(1 + \frac{\left(h \cdot {\left(0.5 \cdot t_3\right)}^{2}\right) \cdot -0.5}{\ell}\right)\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;t_4\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot \left(1 + \frac{0.25}{\left(\frac{d}{h} \cdot \ell\right) \cdot \frac{d}{{\left(M \cdot D\right)}^{2}}} \cdot -0.5\right)\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (*
  (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
  (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* M (/ D d)))
        (t_1 (* (pow (/ d h) 0.5) (pow (/ d l) 0.5)))
        (t_2
         (* t_1 (+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) -0.5)))))
        (t_3 (/ (* M D) d))
        (t_4
         (*
          (fabs (/ d (sqrt (* h l))))
          (+ 1.0 (/ -0.125 (/ (/ l h) (pow t_3 2.0)))))))
   (if (<= t_2 -2e+40)
     (*
      (sqrt (* (/ d h) (/ d l)))
      (+ 1.0 (/ -0.125 (* (/ l t_0) (/ (/ 1.0 h) t_0)))))
     (if (<= t_2 0.0)
       t_4
       (if (<= t_2 1e+302)
         (* t_1 (+ 1.0 (/ (* (* h (pow (* 0.5 t_3) 2.0)) -0.5) l)))
         (if (<= t_2 INFINITY)
           t_4
           (*
            (/ (/ d (sqrt h)) (sqrt l))
            (+
             1.0
             (*
              (/ 0.25 (* (* (/ d h) l) (/ d (pow (* M D) 2.0))))
              -0.5)))))))))
double code(double d, double h, double l, double M, double D) {
	return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
double code(double d, double h, double l, double M, double D) {
	double t_0 = M * (D / d);
	double t_1 = pow((d / h), 0.5) * pow((d / l), 0.5);
	double t_2 = t_1 * (1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * -0.5)));
	double t_3 = (M * D) / d;
	double t_4 = fabs((d / sqrt((h * l)))) * (1.0 + (-0.125 / ((l / h) / pow(t_3, 2.0))));
	double tmp;
	if (t_2 <= -2e+40) {
		tmp = sqrt(((d / h) * (d / l))) * (1.0 + (-0.125 / ((l / t_0) * ((1.0 / h) / t_0))));
	} else if (t_2 <= 0.0) {
		tmp = t_4;
	} else if (t_2 <= 1e+302) {
		tmp = t_1 * (1.0 + (((h * pow((0.5 * t_3), 2.0)) * -0.5) / l));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = t_4;
	} else {
		tmp = ((d / sqrt(h)) / sqrt(l)) * (1.0 + ((0.25 / (((d / h) * l) * (d / pow((M * D), 2.0)))) * -0.5));
	}
	return tmp;
}
public static double code(double d, double h, double l, double M, double D) {
	return (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = M * (D / d);
	double t_1 = Math.pow((d / h), 0.5) * Math.pow((d / l), 0.5);
	double t_2 = t_1 * (1.0 + ((h / l) * (Math.pow(((M * D) / (d * 2.0)), 2.0) * -0.5)));
	double t_3 = (M * D) / d;
	double t_4 = Math.abs((d / Math.sqrt((h * l)))) * (1.0 + (-0.125 / ((l / h) / Math.pow(t_3, 2.0))));
	double tmp;
	if (t_2 <= -2e+40) {
		tmp = Math.sqrt(((d / h) * (d / l))) * (1.0 + (-0.125 / ((l / t_0) * ((1.0 / h) / t_0))));
	} else if (t_2 <= 0.0) {
		tmp = t_4;
	} else if (t_2 <= 1e+302) {
		tmp = t_1 * (1.0 + (((h * Math.pow((0.5 * t_3), 2.0)) * -0.5) / l));
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = t_4;
	} else {
		tmp = ((d / Math.sqrt(h)) / Math.sqrt(l)) * (1.0 + ((0.25 / (((d / h) * l) * (d / Math.pow((M * D), 2.0)))) * -0.5));
	}
	return tmp;
}
def code(d, h, l, M, D):
	return (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
def code(d, h, l, M, D):
	t_0 = M * (D / d)
	t_1 = math.pow((d / h), 0.5) * math.pow((d / l), 0.5)
	t_2 = t_1 * (1.0 + ((h / l) * (math.pow(((M * D) / (d * 2.0)), 2.0) * -0.5)))
	t_3 = (M * D) / d
	t_4 = math.fabs((d / math.sqrt((h * l)))) * (1.0 + (-0.125 / ((l / h) / math.pow(t_3, 2.0))))
	tmp = 0
	if t_2 <= -2e+40:
		tmp = math.sqrt(((d / h) * (d / l))) * (1.0 + (-0.125 / ((l / t_0) * ((1.0 / h) / t_0))))
	elif t_2 <= 0.0:
		tmp = t_4
	elif t_2 <= 1e+302:
		tmp = t_1 * (1.0 + (((h * math.pow((0.5 * t_3), 2.0)) * -0.5) / l))
	elif t_2 <= math.inf:
		tmp = t_4
	else:
		tmp = ((d / math.sqrt(h)) / math.sqrt(l)) * (1.0 + ((0.25 / (((d / h) * l) * (d / math.pow((M * D), 2.0)))) * -0.5))
	return tmp
function code(d, h, l, M, D)
	return Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
end
function code(d, h, l, M, D)
	t_0 = Float64(M * Float64(D / d))
	t_1 = Float64((Float64(d / h) ^ 0.5) * (Float64(d / l) ^ 0.5))
	t_2 = Float64(t_1 * Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * -0.5))))
	t_3 = Float64(Float64(M * D) / d)
	t_4 = Float64(abs(Float64(d / sqrt(Float64(h * l)))) * Float64(1.0 + Float64(-0.125 / Float64(Float64(l / h) / (t_3 ^ 2.0)))))
	tmp = 0.0
	if (t_2 <= -2e+40)
		tmp = Float64(sqrt(Float64(Float64(d / h) * Float64(d / l))) * Float64(1.0 + Float64(-0.125 / Float64(Float64(l / t_0) * Float64(Float64(1.0 / h) / t_0)))));
	elseif (t_2 <= 0.0)
		tmp = t_4;
	elseif (t_2 <= 1e+302)
		tmp = Float64(t_1 * Float64(1.0 + Float64(Float64(Float64(h * (Float64(0.5 * t_3) ^ 2.0)) * -0.5) / l)));
	elseif (t_2 <= Inf)
		tmp = t_4;
	else
		tmp = Float64(Float64(Float64(d / sqrt(h)) / sqrt(l)) * Float64(1.0 + Float64(Float64(0.25 / Float64(Float64(Float64(d / h) * l) * Float64(d / (Float64(M * D) ^ 2.0)))) * -0.5)));
	end
	return tmp
end
function tmp = code(d, h, l, M, D)
	tmp = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l)));
end
function tmp_2 = code(d, h, l, M, D)
	t_0 = M * (D / d);
	t_1 = ((d / h) ^ 0.5) * ((d / l) ^ 0.5);
	t_2 = t_1 * (1.0 + ((h / l) * ((((M * D) / (d * 2.0)) ^ 2.0) * -0.5)));
	t_3 = (M * D) / d;
	t_4 = abs((d / sqrt((h * l)))) * (1.0 + (-0.125 / ((l / h) / (t_3 ^ 2.0))));
	tmp = 0.0;
	if (t_2 <= -2e+40)
		tmp = sqrt(((d / h) * (d / l))) * (1.0 + (-0.125 / ((l / t_0) * ((1.0 / h) / t_0))));
	elseif (t_2 <= 0.0)
		tmp = t_4;
	elseif (t_2 <= 1e+302)
		tmp = t_1 * (1.0 + (((h * ((0.5 * t_3) ^ 2.0)) * -0.5) / l));
	elseif (t_2 <= Inf)
		tmp = t_4;
	else
		tmp = ((d / sqrt(h)) / sqrt(l)) * (1.0 + ((0.25 / (((d / h) * l) * (d / ((M * D) ^ 2.0)))) * -0.5));
	end
	tmp_2 = tmp;
end
code[d_, h_, l_, M_, D_] := N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(M * N[(D / d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, Block[{t$95$4 = N[(N[Abs[N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(-0.125 / N[(N[(l / h), $MachinePrecision] / N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+40], N[(N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(-0.125 / N[(N[(l / t$95$0), $MachinePrecision] * N[(N[(1.0 / h), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], t$95$4, If[LessEqual[t$95$2, 1e+302], N[(t$95$1 * N[(1.0 + N[(N[(N[(h * N[Power[N[(0.5 * t$95$3), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$4, N[(N[(N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(0.25 / N[(N[(N[(d / h), $MachinePrecision] * l), $MachinePrecision] * N[(d / N[Power[N[(M * D), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\begin{array}{l}
t_0 := M \cdot \frac{D}{d}\\
t_1 := {\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\\
t_2 := t_1 \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right)\\
t_3 := \frac{M \cdot D}{d}\\
t_4 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{t_3}^{2}}}\right)\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+40}:\\
\;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\ell}{t_0} \cdot \frac{\frac{1}{h}}{t_0}}\right)\\

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;t_4\\

\mathbf{elif}\;t_2 \leq 10^{+302}:\\
\;\;\;\;t_1 \cdot \left(1 + \frac{\left(h \cdot {\left(0.5 \cdot t_3\right)}^{2}\right) \cdot -0.5}{\ell}\right)\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_4\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot \left(1 + \frac{0.25}{\left(\frac{d}{h} \cdot \ell\right) \cdot \frac{d}{{\left(M \cdot D\right)}^{2}}} \cdot -0.5\right)\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < -2.00000000000000006e40

    1. Initial program 53.62

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr52.11

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5 \cdot \left({\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2} \cdot h\right)}{\ell}}\right) \]
    3. Applied egg-rr59.67

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} + \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \frac{\left(0.125 \cdot {\left(\frac{M}{d} \cdot D\right)}^{2}\right) \cdot \left(-h\right)}{\ell}} \]
    4. Simplified60.04

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{D \cdot M}{d}\right)}^{2}}}\right)} \]
      Proof

      [Start]59.67

      \[ \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} + \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \frac{\left(0.125 \cdot {\left(\frac{M}{d} \cdot D\right)}^{2}\right) \cdot \left(-h\right)}{\ell} \]

      *-rgt-identity [<=]59.67

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

      associate-*l/ [<=]59.07

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

      distribute-rgt-neg-in [<=]59.07

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

      associate-/r/ [<=]59.95

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

      distribute-lft-in [<=]59.95

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

      sub-neg [<=]59.95

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

      sub-neg [=>]59.95

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

      associate-/l* [=>]59.95

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

      distribute-neg-frac [=>]59.95

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

      metadata-eval [=>]59.95

      \[ \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{\color{blue}{-0.125}}{\frac{\frac{\ell}{h}}{{\left(\frac{M}{d} \cdot D\right)}^{2}}}\right) \]
    5. Applied egg-rr46.38

      \[\leadsto \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\color{blue}{\frac{\ell}{\frac{D}{d} \cdot M} \cdot \frac{\frac{1}{h}}{\frac{D}{d} \cdot M}}}\right) \]

    if -2.00000000000000006e40 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < 0.0 or 1.0000000000000001e302 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < +inf.0

    1. Initial program 70.87

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr74.2

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \color{blue}{\frac{0.5 \cdot \left({\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2} \cdot h\right)}{\ell}}\right) \]
    3. Applied egg-rr80.26

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} + \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \frac{\left(0.125 \cdot {\left(\frac{M}{d} \cdot D\right)}^{2}\right) \cdot \left(-h\right)}{\ell}} \]
    4. Simplified78.08

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{D \cdot M}{d}\right)}^{2}}}\right)} \]
      Proof

      [Start]80.26

      \[ \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} + \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \frac{\left(0.125 \cdot {\left(\frac{M}{d} \cdot D\right)}^{2}\right) \cdot \left(-h\right)}{\ell} \]

      *-rgt-identity [<=]80.26

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

      associate-*l/ [<=]79.3

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

      distribute-rgt-neg-in [<=]79.3

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

      associate-/r/ [<=]79.14

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

      distribute-lft-in [<=]79.14

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

      sub-neg [<=]79.14

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

      sub-neg [=>]79.14

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

      associate-/l* [=>]79.14

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

      distribute-neg-frac [=>]79.14

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

      metadata-eval [=>]79.14

      \[ \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{\color{blue}{-0.125}}{\frac{\frac{\ell}{h}}{{\left(\frac{M}{d} \cdot D\right)}^{2}}}\right) \]
    5. Applied egg-rr17.43

      \[\leadsto \color{blue}{\left|\frac{d}{\sqrt{h \cdot \ell}}\right|} \cdot \left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{D \cdot M}{d}\right)}^{2}}}\right) \]

    if 0.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < 1.0000000000000001e302

    1. Initial program 1.65

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Applied egg-rr1.65

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

    if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l))))

    1. Initial program 100

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Simplified100

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

      [Start]100

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

      metadata-eval [=>]100

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

      unpow1/2 [=>]100

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

      metadata-eval [=>]100

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

      unpow1/2 [=>]100

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

      associate-*l* [=>]100

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

      metadata-eval [=>]100

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

      times-frac [=>]100

      \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left({\color{blue}{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}}^{2} \cdot \frac{h}{\ell}\right)\right) \]
    3. Applied egg-rr87.89

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \color{blue}{\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot h}{\ell}}\right) \]
    4. Taylor expanded in M around 0 88.25

      \[\leadsto \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \frac{\color{blue}{0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}}}{\ell}\right) \]
    5. Simplified87.12

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

      [Start]88.25

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

      associate-/l* [=>]88.2

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

      associate-*r/ [=>]88.2

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

      unpow2 [=>]88.2

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

      times-frac [=>]87.2

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

      *-commutative [<=]87.2

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

      times-frac [=>]88.07

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

      unpow2 [=>]88.07

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

      associate-/l* [=>]87.45

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

      unpow2 [=>]87.45

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

      associate-/r* [=>]87.37

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

      associate-/l/ [=>]87.12

      \[ \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \frac{\frac{D}{\color{blue}{\frac{\frac{d}{M}}{D \cdot M}}} \cdot \frac{0.25}{\frac{d}{h}}}{\ell}\right) \]
    6. Applied egg-rr84.52

      \[\leadsto \color{blue}{\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} + \frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(\frac{\frac{0.25}{\frac{d}{{\left(D \cdot M\right)}^{2}}}}{\ell \cdot \frac{d}{h}} \cdot -0.5\right)} \]
    7. Simplified84.5

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

      [Start]84.52

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

      *-commutative [=>]84.52

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

      *-lft-identity [<=]84.52

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

      distribute-rgt-in [<=]84.52

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

      associate-/r* [=>]84.52

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

      associate-/l/ [=>]84.5

      \[ \frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot \left(1 + \color{blue}{\frac{0.25}{\left(\ell \cdot \frac{d}{h}\right) \cdot \frac{d}{{\left(D \cdot M\right)}^{2}}}} \cdot -0.5\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification25.52

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right) \leq -2 \cdot 10^{+40}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\ell}{M \cdot \frac{D}{d}} \cdot \frac{\frac{1}{h}}{M \cdot \frac{D}{d}}}\right)\\ \mathbf{elif}\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right) \leq 0:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}}\right)\\ \mathbf{elif}\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right) \leq 10^{+302}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + \frac{\left(h \cdot {\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2}\right) \cdot -0.5}{\ell}\right)\\ \mathbf{elif}\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right) \leq \infty:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{d}{\sqrt{h}}}{\sqrt{\ell}} \cdot \left(1 + \frac{0.25}{\left(\frac{d}{h} \cdot \ell\right) \cdot \frac{d}{{\left(M \cdot D\right)}^{2}}} \cdot -0.5\right)\\ \end{array} \]

Alternatives

Alternative 1
Error32.72%
Cost21268
\[\begin{array}{l} t_0 := \frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 + -0.5 \cdot \left(h \cdot \frac{{\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}}{\ell}\right)\right)\\ \mathbf{if}\;h \leq -5.8 \cdot 10^{-168}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + 0.5 \cdot \frac{\frac{D}{\frac{\frac{d}{M}}{M \cdot D}} \cdot \frac{-0.25}{\frac{d}{h}}}{\ell}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \left(-d\right)\\ \mathbf{elif}\;h \leq 1.9 \cdot 10^{-147}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq 2 \cdot 10^{+64}:\\ \;\;\;\;\left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}}\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;h \leq 1.4 \cdot 10^{+141}:\\ \;\;\;\;\frac{d \cdot \sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error32.13%
Cost21136
\[\begin{array}{l} t_0 := \frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \mathbf{if}\;h \leq -1.55 \cdot 10^{-168}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 + 0.5 \cdot \frac{\frac{D}{\frac{\frac{d}{M}}{M \cdot D}} \cdot \frac{-0.25}{\frac{d}{h}}}{\ell}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \left(-d\right)\\ \mathbf{elif}\;h \leq 4.5 \cdot 10^{-145}:\\ \;\;\;\;\left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot t_0\\ \mathbf{elif}\;h \leq 2.65 \cdot 10^{+118}:\\ \;\;\;\;\left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}}\right) \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(1 + -0.5 \cdot \left(h \cdot \frac{{\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}}{\ell}\right)\right)\\ \end{array} \]
Alternative 3
Error27.97%
Cost21136
\[\begin{array}{l} t_0 := 1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}}\\ t_1 := 1 + -0.5 \cdot \left(h \cdot \frac{{\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}}{\ell}\right)\\ t_2 := \frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \mathbf{if}\;h \leq -1.65 \cdot 10^{+142}:\\ \;\;\;\;t_1 \cdot \left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot t_0\\ \mathbf{elif}\;h \leq 8.5 \cdot 10^{-147}:\\ \;\;\;\;\left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot t_2\\ \mathbf{elif}\;h \leq 2.65 \cdot 10^{+118}:\\ \;\;\;\;t_0 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot t_1\\ \end{array} \]
Alternative 4
Error30.46%
Cost21136
\[\begin{array}{l} t_0 := \frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ t_1 := {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\\ \mathbf{if}\;h \leq -5.2 \cdot 10^{-170}:\\ \;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 - 0.5 \cdot \frac{h \cdot t_1}{\ell}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \left(-d\right)\\ \mathbf{elif}\;h \leq 2.9 \cdot 10^{-148}:\\ \;\;\;\;\left(1 + t_1 \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right) \cdot t_0\\ \mathbf{elif}\;h \leq 2.65 \cdot 10^{+118}:\\ \;\;\;\;\left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}}\right) \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(1 + -0.5 \cdot \left(h \cdot \frac{{\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}}{\ell}\right)\right)\\ \end{array} \]
Alternative 5
Error35.61%
Cost20612
\[\begin{array}{l} t_0 := 1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -2.3 \cdot 10^{+95}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot t_0\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-308}:\\ \;\;\;\;\left(t_1 \cdot t_2\right) \cdot \left(1 + 0.5 \cdot \frac{\frac{D}{\frac{\frac{d}{M}}{M \cdot D}} \cdot \frac{-0.25}{\frac{d}{h}}}{\ell}\right)\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-27}:\\ \;\;\;\;t_0 \cdot \left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;d \leq 4.5 \cdot 10^{+88}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \left(1 + \frac{M \cdot \left(D \cdot \frac{M}{\frac{\ell}{D}}\right)}{-\frac{d \cdot d}{h}} \cdot 0.125\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 6
Error35.76%
Cost15252
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 + \frac{M \cdot \left(D \cdot \frac{M}{\frac{\ell}{D}}\right)}{-\frac{d \cdot d}{h}} \cdot 0.125\right)\right)\\ t_1 := \frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}\\ t_2 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_3 := M \cdot \frac{D}{d}\\ \mathbf{if}\;d \leq -3.3 \cdot 10^{+96}:\\ \;\;\;\;t_2 \cdot \left(-1 + \frac{0.125}{t_1}\right)\\ \mathbf{elif}\;d \leq -4.9 \cdot 10^{-120}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -3.4 \cdot 10^{-308}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\ell}{t_3} \cdot \frac{\frac{1}{h}}{t_3}}\right)\\ \mathbf{elif}\;d \leq 6.8 \cdot 10^{-27}:\\ \;\;\;\;\left(1 + \frac{-0.125}{t_1}\right) \cdot t_2\\ \mathbf{elif}\;d \leq 5.5 \cdot 10^{+87}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 7
Error35.83%
Cost15120
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}\\ t_3 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{if}\;d \leq -2.695 \cdot 10^{+70}:\\ \;\;\;\;t_3 \cdot \left(-1 + \frac{0.125}{t_2}\right)\\ \mathbf{elif}\;d \leq 1.1 \cdot 10^{-308}:\\ \;\;\;\;\left(t_0 \cdot t_1\right) \cdot \left(1 + 0.5 \cdot \frac{\frac{D}{\frac{\frac{d}{M}}{M \cdot D}} \cdot \frac{-0.25}{\frac{d}{h}}}{\ell}\right)\\ \mathbf{elif}\;d \leq 6.8 \cdot 10^{-27}:\\ \;\;\;\;\left(1 + \frac{-0.125}{t_2}\right) \cdot t_3\\ \mathbf{elif}\;d \leq 4.5 \cdot 10^{+88}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(1 + \frac{M \cdot \left(D \cdot \frac{M}{\frac{\ell}{D}}\right)}{-\frac{d \cdot d}{h}} \cdot 0.125\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 8
Error35.61%
Cost14868
\[\begin{array}{l} t_0 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_1 := \frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}\\ \mathbf{if}\;\ell \leq -2.15 \cdot 10^{+155}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - -0.125 \cdot \left(D \cdot \left(\frac{D}{\ell} \cdot \left(h \cdot \frac{M}{d \cdot \frac{-d}{M}}\right)\right)\right)\right)\right)\\ \mathbf{elif}\;\ell \leq -7.8 \cdot 10^{-178}:\\ \;\;\;\;t_0 \cdot \left(-1 + \frac{0.125}{t_1}\right)\\ \mathbf{elif}\;\ell \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{{\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}}{\ell} \cdot \left(h \cdot -0.5\right)\right)\\ \mathbf{elif}\;\ell \leq 8.2 \cdot 10^{-98}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot \frac{1}{\sqrt{h}}\right)\\ \mathbf{elif}\;\ell \leq 2.8 \cdot 10^{+135}:\\ \;\;\;\;\left(1 + \frac{-0.125}{t_1}\right) \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 9
Error35.02%
Cost14868
\[\begin{array}{l} t_0 := d \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ t_1 := \frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}\\ \mathbf{if}\;\ell \leq -1.35 \cdot 10^{+155}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 + \left(\frac{M}{\frac{\ell}{D} \cdot \frac{d}{D}} \cdot \frac{h \cdot M}{-d}\right) \cdot 0.125\right)\right)\\ \mathbf{elif}\;\ell \leq -2.3 \cdot 10^{-184}:\\ \;\;\;\;t_0 \cdot \left(-1 + \frac{0.125}{t_1}\right)\\ \mathbf{elif}\;\ell \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{{\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}}{\ell} \cdot \left(h \cdot -0.5\right)\right)\\ \mathbf{elif}\;\ell \leq 2 \cdot 10^{-102}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot \frac{1}{\sqrt{h}}\right)\\ \mathbf{elif}\;\ell \leq 3.5 \cdot 10^{+135}:\\ \;\;\;\;\left(1 + \frac{-0.125}{t_1}\right) \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 10
Error34.5%
Cost14608
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ t_1 := \sqrt{h} \cdot \sqrt{\ell}\\ \mathbf{if}\;h \leq -2.9 \cdot 10^{+130}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\ell}{t_0} \cdot \frac{\frac{1}{h}}{t_0}}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \left(-d\right)\\ \mathbf{elif}\;h \leq 2.5 \cdot 10^{-145}:\\ \;\;\;\;\frac{d}{t_1}\\ \mathbf{elif}\;h \leq 1.95 \cdot 10^{+64}:\\ \;\;\;\;\left(1 + \frac{-0.125}{\frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}}\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{t_1}\\ \end{array} \]
Alternative 11
Error32.28%
Cost14608
\[\begin{array}{l} t_0 := \sqrt{h} \cdot \sqrt{\ell}\\ t_1 := M \cdot \frac{D}{d}\\ t_2 := \frac{\frac{\ell}{h}}{{\left(\frac{M \cdot D}{d}\right)}^{2}}\\ \mathbf{if}\;h \leq -1.1 \cdot 10^{+184}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\ell}{t_1} \cdot \frac{\frac{1}{h}}{t_1}}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{1}{h \cdot \ell}}\right) \cdot \left(-1 + \frac{0.125}{t_2}\right)\\ \mathbf{elif}\;h \leq 1.12 \cdot 10^{-147}:\\ \;\;\;\;\frac{d}{t_0}\\ \mathbf{elif}\;h \leq 4.8 \cdot 10^{+63}:\\ \;\;\;\;\left(1 + \frac{-0.125}{t_2}\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{t_0}\\ \end{array} \]
Alternative 12
Error35.75%
Cost13512
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ \mathbf{if}\;h \leq -3.75 \cdot 10^{+124}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\ell}{t_0} \cdot \frac{\frac{1}{h}}{t_0}}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 13
Error35.61%
Cost13384
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ \mathbf{if}\;h \leq -4.6 \cdot 10^{+132}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\ell}{t_0} \cdot \frac{\frac{1}{h}}{t_0}}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-309}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 14
Error43.64%
Cost8785
\[\begin{array}{l} t_0 := M \cdot \frac{D}{d}\\ \mathbf{if}\;d \leq -5 \cdot 10^{+144}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \left(-d\right)\\ \mathbf{elif}\;d \leq -2.5 \cdot 10^{-308} \lor \neg \left(d \leq 1.02 \cdot 10^{+183}\right) \land d \leq 3.2 \cdot 10^{+215}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{\ell}{t_0} \cdot \frac{\frac{1}{h}}{t_0}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]
Alternative 15
Error46.17%
Cost8657
\[\begin{array}{l} \mathbf{if}\;d \leq -1.62 \cdot 10^{+133}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \left(-d\right)\\ \mathbf{elif}\;d \leq -6 \cdot 10^{-237} \lor \neg \left(d \leq 1.02 \cdot 10^{+183}\right) \land d \leq 2.9 \cdot 10^{+215}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + \frac{-0.125}{\frac{d}{D} \cdot \frac{\frac{\frac{\frac{\ell}{h}}{\frac{D}{d}}}{M}}{M}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]
Alternative 16
Error44.78%
Cost8657
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{if}\;d \leq -3.6 \cdot 10^{+133}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \left(-d\right)\\ \mathbf{elif}\;d \leq -6.2 \cdot 10^{-237}:\\ \;\;\;\;t_0 \cdot \left(1 + \frac{-0.125}{\frac{d}{M \cdot D} \cdot \frac{\ell}{\frac{D}{d} \cdot \left(h \cdot M\right)}}\right)\\ \mathbf{elif}\;d \leq 1.02 \cdot 10^{+183} \lor \neg \left(d \leq 2.9 \cdot 10^{+215}\right):\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(1 + \frac{-0.125}{\frac{d}{D} \cdot \frac{\frac{\frac{\frac{\ell}{h}}{\frac{D}{d}}}{M}}{M}}\right)\\ \end{array} \]
Alternative 17
Error44.15%
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.05 \cdot 10^{-260}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]
Alternative 18
Error43.84%
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.05 \cdot 10^{-260}:\\ \;\;\;\;\sqrt{\frac{\frac{1}{\ell}}{h}} \cdot \left(-d\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]
Alternative 19
Error55.48%
Cost6980
\[\begin{array}{l} \mathbf{if}\;d \leq -7.2 \cdot 10^{-180}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]
Alternative 20
Error52.92%
Cost6980
\[\begin{array}{l} \mathbf{if}\;d \leq 8.5 \cdot 10^{-289}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]
Alternative 21
Error69.05%
Cost6784
\[d \cdot {\left(h \cdot \ell\right)}^{-0.5} \]
Alternative 22
Error69.04%
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce?

herbie shell --seed 2023101 
(FPCore (d h l M D)
  :name "Henrywood and Agarwal, Equation (12)"
  :precision binary64
  (* (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))) (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))