Average Error: 26.7 → 13.9
Time: 43.0s
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 := \sqrt{\frac{h}{d}}\\ t_1 := \left(\frac{D}{d} \cdot -0.125\right) \cdot \left(M \cdot \frac{M}{\ell}\right)\\ t_2 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_3 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ t_4 := \left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot t_2\\ t_5 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;t_3 \cdot \left(1 + h \cdot \frac{D \cdot t_1}{d}\right)\\ \mathbf{elif}\;t_4 \leq -2 \cdot 10^{-187}:\\ \;\;\;\;t_2 \cdot \left(\frac{1}{t_0} \cdot t_5\right)\\ \mathbf{elif}\;t_4 \leq 2 \cdot 10^{-188}:\\ \;\;\;\;t_3 \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot -0.5\right)\right)\\ \mathbf{elif}\;t_4 \leq 4 \cdot 10^{+281}:\\ \;\;\;\;\frac{t_5 \cdot \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{0.5 \cdot \left(M \cdot D\right)}{d}\right)}^{2}\right)\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \left(1 + h \cdot \frac{t_1}{\frac{d}{D}}\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 (sqrt (/ h d)))
        (t_1 (* (* (/ D d) -0.125) (* M (/ M l))))
        (t_2 (+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) -0.5))))
        (t_3 (fabs (/ d (sqrt (* h l)))))
        (t_4 (* (* (pow (/ d h) 0.5) (pow (/ d l) 0.5)) t_2))
        (t_5 (sqrt (/ d l))))
   (if (<= t_4 (- INFINITY))
     (* t_3 (+ 1.0 (* h (/ (* D t_1) d))))
     (if (<= t_4 -2e-187)
       (* t_2 (* (/ 1.0 t_0) t_5))
       (if (<= t_4 2e-188)
         (* t_3 (+ 1.0 (* (/ h l) (* (pow (* (/ M 2.0) (/ D d)) 2.0) -0.5))))
         (if (<= t_4 4e+281)
           (/
            (*
             t_5
             (+ 1.0 (* (/ h l) (* -0.5 (pow (/ (* 0.5 (* M D)) d) 2.0)))))
            t_0)
           (* t_3 (+ 1.0 (* h (/ t_1 (/ d D)))))))))))
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 = sqrt((h / d));
	double t_1 = ((D / d) * -0.125) * (M * (M / l));
	double t_2 = 1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * -0.5));
	double t_3 = fabs((d / sqrt((h * l))));
	double t_4 = (pow((d / h), 0.5) * pow((d / l), 0.5)) * t_2;
	double t_5 = sqrt((d / l));
	double tmp;
	if (t_4 <= -((double) INFINITY)) {
		tmp = t_3 * (1.0 + (h * ((D * t_1) / d)));
	} else if (t_4 <= -2e-187) {
		tmp = t_2 * ((1.0 / t_0) * t_5);
	} else if (t_4 <= 2e-188) {
		tmp = t_3 * (1.0 + ((h / l) * (pow(((M / 2.0) * (D / d)), 2.0) * -0.5)));
	} else if (t_4 <= 4e+281) {
		tmp = (t_5 * (1.0 + ((h / l) * (-0.5 * pow(((0.5 * (M * D)) / d), 2.0))))) / t_0;
	} else {
		tmp = t_3 * (1.0 + (h * (t_1 / (d / D))));
	}
	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 = Math.sqrt((h / d));
	double t_1 = ((D / d) * -0.125) * (M * (M / l));
	double t_2 = 1.0 + ((h / l) * (Math.pow(((M * D) / (d * 2.0)), 2.0) * -0.5));
	double t_3 = Math.abs((d / Math.sqrt((h * l))));
	double t_4 = (Math.pow((d / h), 0.5) * Math.pow((d / l), 0.5)) * t_2;
	double t_5 = Math.sqrt((d / l));
	double tmp;
	if (t_4 <= -Double.POSITIVE_INFINITY) {
		tmp = t_3 * (1.0 + (h * ((D * t_1) / d)));
	} else if (t_4 <= -2e-187) {
		tmp = t_2 * ((1.0 / t_0) * t_5);
	} else if (t_4 <= 2e-188) {
		tmp = t_3 * (1.0 + ((h / l) * (Math.pow(((M / 2.0) * (D / d)), 2.0) * -0.5)));
	} else if (t_4 <= 4e+281) {
		tmp = (t_5 * (1.0 + ((h / l) * (-0.5 * Math.pow(((0.5 * (M * D)) / d), 2.0))))) / t_0;
	} else {
		tmp = t_3 * (1.0 + (h * (t_1 / (d / D))));
	}
	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 = math.sqrt((h / d))
	t_1 = ((D / d) * -0.125) * (M * (M / l))
	t_2 = 1.0 + ((h / l) * (math.pow(((M * D) / (d * 2.0)), 2.0) * -0.5))
	t_3 = math.fabs((d / math.sqrt((h * l))))
	t_4 = (math.pow((d / h), 0.5) * math.pow((d / l), 0.5)) * t_2
	t_5 = math.sqrt((d / l))
	tmp = 0
	if t_4 <= -math.inf:
		tmp = t_3 * (1.0 + (h * ((D * t_1) / d)))
	elif t_4 <= -2e-187:
		tmp = t_2 * ((1.0 / t_0) * t_5)
	elif t_4 <= 2e-188:
		tmp = t_3 * (1.0 + ((h / l) * (math.pow(((M / 2.0) * (D / d)), 2.0) * -0.5)))
	elif t_4 <= 4e+281:
		tmp = (t_5 * (1.0 + ((h / l) * (-0.5 * math.pow(((0.5 * (M * D)) / d), 2.0))))) / t_0
	else:
		tmp = t_3 * (1.0 + (h * (t_1 / (d / D))))
	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 = sqrt(Float64(h / d))
	t_1 = Float64(Float64(Float64(D / d) * -0.125) * Float64(M * Float64(M / l)))
	t_2 = Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * -0.5)))
	t_3 = abs(Float64(d / sqrt(Float64(h * l))))
	t_4 = Float64(Float64((Float64(d / h) ^ 0.5) * (Float64(d / l) ^ 0.5)) * t_2)
	t_5 = sqrt(Float64(d / l))
	tmp = 0.0
	if (t_4 <= Float64(-Inf))
		tmp = Float64(t_3 * Float64(1.0 + Float64(h * Float64(Float64(D * t_1) / d))));
	elseif (t_4 <= -2e-187)
		tmp = Float64(t_2 * Float64(Float64(1.0 / t_0) * t_5));
	elseif (t_4 <= 2e-188)
		tmp = Float64(t_3 * Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * -0.5))));
	elseif (t_4 <= 4e+281)
		tmp = Float64(Float64(t_5 * Float64(1.0 + Float64(Float64(h / l) * Float64(-0.5 * (Float64(Float64(0.5 * Float64(M * D)) / d) ^ 2.0))))) / t_0);
	else
		tmp = Float64(t_3 * Float64(1.0 + Float64(h * Float64(t_1 / Float64(d / D)))));
	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 = sqrt((h / d));
	t_1 = ((D / d) * -0.125) * (M * (M / l));
	t_2 = 1.0 + ((h / l) * ((((M * D) / (d * 2.0)) ^ 2.0) * -0.5));
	t_3 = abs((d / sqrt((h * l))));
	t_4 = (((d / h) ^ 0.5) * ((d / l) ^ 0.5)) * t_2;
	t_5 = sqrt((d / l));
	tmp = 0.0;
	if (t_4 <= -Inf)
		tmp = t_3 * (1.0 + (h * ((D * t_1) / d)));
	elseif (t_4 <= -2e-187)
		tmp = t_2 * ((1.0 / t_0) * t_5);
	elseif (t_4 <= 2e-188)
		tmp = t_3 * (1.0 + ((h / l) * ((((M / 2.0) * (D / d)) ^ 2.0) * -0.5)));
	elseif (t_4 <= 4e+281)
		tmp = (t_5 * (1.0 + ((h / l) * (-0.5 * (((0.5 * (M * D)) / d) ^ 2.0))))) / t_0;
	else
		tmp = t_3 * (1.0 + (h * (t_1 / (d / D))));
	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[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(D / d), $MachinePrecision] * -0.125), $MachinePrecision] * N[(M * N[(M / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[Abs[N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(t$95$3 * N[(1.0 + N[(h * N[(N[(D * t$95$1), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, -2e-187], N[(t$95$2 * N[(N[(1.0 / t$95$0), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 2e-188], N[(t$95$3 * N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 4e+281], N[(N[(t$95$5 * N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(-0.5 * N[Power[N[(N[(0.5 * N[(M * D), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(t$95$3 * N[(1.0 + N[(h * N[(t$95$1 / N[(d / D), $MachinePrecision]), $MachinePrecision]), $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 := \sqrt{\frac{h}{d}}\\
t_1 := \left(\frac{D}{d} \cdot -0.125\right) \cdot \left(M \cdot \frac{M}{\ell}\right)\\
t_2 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\
t_3 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\
t_4 := \left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot t_2\\
t_5 := \sqrt{\frac{d}{\ell}}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;t_3 \cdot \left(1 + h \cdot \frac{D \cdot t_1}{d}\right)\\

\mathbf{elif}\;t_4 \leq -2 \cdot 10^{-187}:\\
\;\;\;\;t_2 \cdot \left(\frac{1}{t_0} \cdot t_5\right)\\

\mathbf{elif}\;t_4 \leq 2 \cdot 10^{-188}:\\
\;\;\;\;t_3 \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot -0.5\right)\right)\\

\mathbf{elif}\;t_4 \leq 4 \cdot 10^{+281}:\\
\;\;\;\;\frac{t_5 \cdot \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{0.5 \cdot \left(M \cdot D\right)}{d}\right)}^{2}\right)\right)}{t_0}\\

\mathbf{else}:\\
\;\;\;\;t_3 \cdot \left(1 + h \cdot \frac{t_1}{\frac{d}{D}}\right)\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 5 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)))) < -inf.0

    1. Initial program 64.0

      \[\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-rr62.1

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

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

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

      \[\leadsto {\left(\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + \color{blue}{h \cdot \left(\left(\frac{D}{d} \cdot \left(-0.125 \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{M}{\ell} \cdot M\right)\right)}\right)\right)}^{1} \]
      Proof
      (*.f64 h (*.f64 (*.f64 (/.f64 D d) (*.f64 -1/8 (/.f64 D d))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 -1/8 (/.f64 D d)) (/.f64 D d))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (Rewrite<= associate-*r*_binary64 (*.f64 -1/8 (*.f64 (/.f64 D d) (/.f64 D d)))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (*.f64 -1/8 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 D D) (*.f64 d d)))) (*.f64 (/.f64 M l) M))): 42 points increase in error, 12 points decrease in error
      (*.f64 h (*.f64 (*.f64 -1/8 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 D 2)) (*.f64 d d))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (*.f64 -1/8 (/.f64 (pow.f64 D 2) (Rewrite<= unpow2_binary64 (pow.f64 d 2)))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (pow.f64 d 2))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (pow.f64 d 2)) (Rewrite<= associate-/r/_binary64 (/.f64 M (/.f64 l M))))): 3 points increase in error, 6 points decrease in error
      (*.f64 h (*.f64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (pow.f64 d 2)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 M M) l)))): 22 points increase in error, 4 points decrease in error
      (*.f64 h (*.f64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (pow.f64 d 2)) (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 M 2)) l))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (Rewrite<= associate-/r/_binary64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (/.f64 (pow.f64 d 2) (/.f64 (pow.f64 M 2) l))))): 7 points increase in error, 10 points decrease in error
      (*.f64 h (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 d 2) l) (pow.f64 M 2))))): 12 points increase in error, 10 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (/.f64 (*.f64 (pow.f64 d 2) l) (pow.f64 M 2))) h)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r/_binary64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (/.f64 (/.f64 (*.f64 (pow.f64 d 2) l) (pow.f64 M 2)) h))): 7 points increase in error, 2 points decrease in error
      (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (Rewrite=> associate-/l/_binary64 (/.f64 (*.f64 (pow.f64 d 2) l) (*.f64 h (pow.f64 M 2))))): 10 points increase in error, 6 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 -1/8 (/.f64 (pow.f64 D 2) (/.f64 (*.f64 (pow.f64 d 2) l) (*.f64 h (pow.f64 M 2)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 -1/8 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l)))): 7 points increase in error, 4 points decrease in error
    6. Applied egg-rr51.4

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

    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)))) < -2e-187

    1. Initial program 1.2

      \[\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.8

      \[\leadsto \left(\color{blue}{\frac{1}{\sqrt{\frac{h}{d}}}} \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) \]
    3. Applied egg-rr1.8

      \[\leadsto \left(\frac{1}{\sqrt{\frac{h}{d}}} \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) \]

    if -2e-187 < (*.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.9999999999999999e-188

    1. Initial program 32.9

      \[\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-rr44.9

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

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

    if 1.9999999999999999e-188 < (*.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)))) < 4.0000000000000001e281

    1. Initial program 0.7

      \[\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-rr0.8

      \[\leadsto \left(\color{blue}{\frac{1}{\sqrt{\frac{h}{d}}}} \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) \]
    3. Applied egg-rr1.0

      \[\leadsto \color{blue}{\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2} \cdot -0.5\right)\right)}{\sqrt{\frac{h}{d}}}} \]
    4. Applied egg-rr0.7

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

    if 4.0000000000000001e281 < (*.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 63.4

      \[\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-rr63.9

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

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

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

      \[\leadsto {\left(\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + \color{blue}{h \cdot \left(\left(\frac{D}{d} \cdot \left(-0.125 \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{M}{\ell} \cdot M\right)\right)}\right)\right)}^{1} \]
      Proof
      (*.f64 h (*.f64 (*.f64 (/.f64 D d) (*.f64 -1/8 (/.f64 D d))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 -1/8 (/.f64 D d)) (/.f64 D d))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (Rewrite<= associate-*r*_binary64 (*.f64 -1/8 (*.f64 (/.f64 D d) (/.f64 D d)))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (*.f64 -1/8 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 D D) (*.f64 d d)))) (*.f64 (/.f64 M l) M))): 42 points increase in error, 12 points decrease in error
      (*.f64 h (*.f64 (*.f64 -1/8 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 D 2)) (*.f64 d d))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (*.f64 -1/8 (/.f64 (pow.f64 D 2) (Rewrite<= unpow2_binary64 (pow.f64 d 2)))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (pow.f64 d 2))) (*.f64 (/.f64 M l) M))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (*.f64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (pow.f64 d 2)) (Rewrite<= associate-/r/_binary64 (/.f64 M (/.f64 l M))))): 3 points increase in error, 6 points decrease in error
      (*.f64 h (*.f64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (pow.f64 d 2)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 M M) l)))): 22 points increase in error, 4 points decrease in error
      (*.f64 h (*.f64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (pow.f64 d 2)) (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 M 2)) l))): 0 points increase in error, 0 points decrease in error
      (*.f64 h (Rewrite<= associate-/r/_binary64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (/.f64 (pow.f64 d 2) (/.f64 (pow.f64 M 2) l))))): 7 points increase in error, 10 points decrease in error
      (*.f64 h (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 d 2) l) (pow.f64 M 2))))): 12 points increase in error, 10 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (/.f64 (*.f64 (pow.f64 d 2) l) (pow.f64 M 2))) h)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/r/_binary64 (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (/.f64 (/.f64 (*.f64 (pow.f64 d 2) l) (pow.f64 M 2)) h))): 7 points increase in error, 2 points decrease in error
      (/.f64 (*.f64 -1/8 (pow.f64 D 2)) (Rewrite=> associate-/l/_binary64 (/.f64 (*.f64 (pow.f64 d 2) l) (*.f64 h (pow.f64 M 2))))): 10 points increase in error, 6 points decrease in error
      (Rewrite<= associate-*r/_binary64 (*.f64 -1/8 (/.f64 (pow.f64 D 2) (/.f64 (*.f64 (pow.f64 d 2) l) (*.f64 h (pow.f64 M 2)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 -1/8 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 h (pow.f64 M 2))) (*.f64 (pow.f64 d 2) l)))): 7 points increase in error, 4 points decrease in error
    6. Applied egg-rr27.0

      \[\leadsto {\left(\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + h \cdot \color{blue}{\frac{\left(\frac{D}{d} \cdot -0.125\right) \cdot \left(M \cdot \frac{M}{\ell}\right)}{\frac{d}{D}}}\right)\right)}^{1} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification13.9

    \[\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 -\infty:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + h \cdot \frac{D \cdot \left(\left(\frac{D}{d} \cdot -0.125\right) \cdot \left(M \cdot \frac{M}{\ell}\right)\right)}{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 -2 \cdot 10^{-187}:\\ \;\;\;\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right) \cdot \left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot \sqrt{\frac{d}{\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 2 \cdot 10^{-188}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot -0.5\right)\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 4 \cdot 10^{+281}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{0.5 \cdot \left(M \cdot D\right)}{d}\right)}^{2}\right)\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + h \cdot \frac{\left(\frac{D}{d} \cdot -0.125\right) \cdot \left(M \cdot \frac{M}{\ell}\right)}{\frac{d}{D}}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error14.1
Cost104464
\[\begin{array}{l} t_0 := \sqrt{\frac{h}{d}}\\ t_1 := \left(\frac{D}{d} \cdot -0.125\right) \cdot \left(M \cdot \frac{M}{\ell}\right)\\ t_2 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_3 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ t_4 := t_3 \cdot \left(1 + h \cdot \frac{D \cdot t_1}{d}\right)\\ t_5 := \left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot t_2\\ t_6 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;t_5 \leq -\infty:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_5 \leq -2 \cdot 10^{-241}:\\ \;\;\;\;t_2 \cdot \left(\frac{1}{t_0} \cdot t_6\right)\\ \mathbf{elif}\;t_5 \leq 2 \cdot 10^{-188}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_5 \leq 4 \cdot 10^{+281}:\\ \;\;\;\;\frac{t_6 \cdot \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{0.5 \cdot \left(M \cdot D\right)}{d}\right)}^{2}\right)\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \left(1 + h \cdot \frac{t_1}{\frac{d}{D}}\right)\\ \end{array} \]
Alternative 2
Error13.8
Cost83532
\[\begin{array}{l} t_0 := \sqrt{\frac{h}{d}}\\ t_1 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ t_2 := \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)\\ t_3 := \frac{M}{2} \cdot \frac{D}{d}\\ \mathbf{if}\;t_2 \leq -2 \cdot 10^{-187}:\\ \;\;\;\;\left(\frac{1}{t_0} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(t_3 \cdot \sqrt{0.5}\right)\right)}^{2}\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{-188}:\\ \;\;\;\;t_1 \cdot \left(1 + \frac{h}{\ell} \cdot \left({t_3}^{2} \cdot -0.5\right)\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{+281}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{0.5 \cdot \left(M \cdot D\right)}{d}\right)}^{2}\right)\right)}{t_0}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(1 + h \cdot \frac{\left(\frac{D}{d} \cdot -0.125\right) \cdot \left(M \cdot \frac{M}{\ell}\right)}{\frac{d}{D}}\right)\\ \end{array} \]
Alternative 3
Error21.8
Cost21136
\[\begin{array}{l} t_0 := d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\ \mathbf{if}\;d \leq -3.8 \cdot 10^{+142}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -7.8 \cdot 10^{-75}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(-0.125 \cdot \left(h \cdot \frac{\frac{M}{\frac{d}{M}}}{d}\right)\right)\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;d \leq 4 \cdot 10^{-290}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 10^{+140}:\\ \;\;\;\;\frac{1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}\right)}{\frac{\sqrt{h} \cdot \sqrt{\ell}}{d}}\\ \mathbf{elif}\;d \leq 1.12 \cdot 10^{+304}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(-0.125 \cdot \frac{\sqrt{h} \cdot \left(D \cdot \frac{D}{d}\right)}{{\ell}^{1.5}}\right)\\ \end{array} \]
Alternative 4
Error20.4
Cost21004
\[\begin{array}{l} t_0 := 1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}\right)\\ \mathbf{if}\;d \leq -3.8 \cdot 10^{+72}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\ \mathbf{elif}\;d \leq -9 \cdot 10^{-305}:\\ \;\;\;\;\frac{t_0 \cdot \sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}}\\ \mathbf{elif}\;d \leq 10^{+140}:\\ \;\;\;\;\frac{t_0}{\frac{\sqrt{h} \cdot \sqrt{\ell}}{d}}\\ \mathbf{elif}\;d \leq 1.12 \cdot 10^{+304}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(-0.125 \cdot \frac{\sqrt{h} \cdot \left(D \cdot \frac{D}{d}\right)}{{\ell}^{1.5}}\right)\\ \end{array} \]
Alternative 5
Error20.2
Cost21004
\[\begin{array}{l} \mathbf{if}\;d \leq -3.8 \cdot 10^{+72}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\ \mathbf{elif}\;d \leq -9 \cdot 10^{-305}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{0.5 \cdot \left(M \cdot D\right)}{d}\right)}^{2}\right)\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;d \leq 10^{+140}:\\ \;\;\;\;\frac{1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}\right)}{\frac{\sqrt{h} \cdot \sqrt{\ell}}{d}}\\ \mathbf{elif}\;d \leq 1.12 \cdot 10^{+304}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(-0.125 \cdot \frac{\sqrt{h} \cdot \left(D \cdot \frac{D}{d}\right)}{{\ell}^{1.5}}\right)\\ \end{array} \]
Alternative 6
Error20.1
Cost21004
\[\begin{array}{l} \mathbf{if}\;d \leq -3.8 \cdot 10^{+72}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\ \mathbf{elif}\;d \leq -9 \cdot 10^{-305}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + \frac{-0.5 \cdot {\left(\left(M \cdot D\right) \cdot \frac{0.5}{d}\right)}^{2}}{\frac{\ell}{h}}\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;d \leq 10^{+140}:\\ \;\;\;\;\frac{1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}\right)}{\frac{\sqrt{h} \cdot \sqrt{\ell}}{d}}\\ \mathbf{elif}\;d \leq 1.12 \cdot 10^{+304}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(-0.125 \cdot \frac{\sqrt{h} \cdot \left(D \cdot \frac{D}{d}\right)}{{\ell}^{1.5}}\right)\\ \end{array} \]
Alternative 7
Error20.5
Cost21004
\[\begin{array}{l} \mathbf{if}\;d \leq -3.8 \cdot 10^{+72}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \cdot \left(1 + h \cdot \frac{\left(\frac{D}{d} \cdot -0.125\right) \cdot \left(M \cdot \frac{M}{\ell}\right)}{\frac{d}{D}}\right)\\ \mathbf{elif}\;d \leq 10^{-300}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + \frac{-0.5 \cdot {\left(\left(M \cdot D\right) \cdot \frac{0.5}{d}\right)}^{2}}{\frac{\ell}{h}}\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;d \leq 10^{+140}:\\ \;\;\;\;\frac{1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}\right)}{\frac{\sqrt{h} \cdot \sqrt{\ell}}{d}}\\ \mathbf{elif}\;d \leq 1.12 \cdot 10^{+304}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(-0.125 \cdot \frac{\sqrt{h} \cdot \left(D \cdot \frac{D}{d}\right)}{{\ell}^{1.5}}\right)\\ \end{array} \]
Alternative 8
Error23.7
Cost15056
\[\begin{array}{l} t_0 := \frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + \left(D \cdot \frac{D}{\ell}\right) \cdot \left(-0.125 \cdot \left(h \cdot \frac{\frac{M}{\frac{d}{M}}}{d}\right)\right)\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{if}\;h \leq -5.1 \cdot 10^{+144}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;h \leq 0:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\ \mathbf{elif}\;h \leq 10^{-89}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{elif}\;h \leq 10000000000:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 9
Error22.6
Cost13512
\[\begin{array}{l} \mathbf{if}\;h \leq -3.3 \cdot 10^{+167}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;h \leq 0:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 10
Error23.2
Cost13380
\[\begin{array}{l} \mathbf{if}\;\ell \leq -3.6 \cdot 10^{-299}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 11
Error23.2
Cost13380
\[\begin{array}{l} \mathbf{if}\;\ell \leq -3.6 \cdot 10^{-299}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 12
Error23.2
Cost13252
\[\begin{array}{l} \mathbf{if}\;\ell \leq -3.6 \cdot 10^{-299}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 13
Error27.5
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq -4.2 \cdot 10^{-274}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 14
Error27.4
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq -4.2 \cdot 10^{-274}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 15
Error36.7
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq -4.2 \cdot 10^{-274}:\\ \;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 16
Error43.7
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce

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