Average Error: 26.6 → 17.8
Time: 56.4s
Precision: binary64
Cost: 40724
\[ \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 := \frac{M}{2} \cdot \frac{D}{d}\\ t_1 := {\left(\frac{d}{\ell}\right)}^{0.5}\\ t_2 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_3 := \sqrt{-d}\\ \mathbf{if}\;\ell \leq -1 \cdot 10^{-80}:\\ \;\;\;\;\left(\frac{t_3}{\sqrt{-h}} \cdot t_1\right) \cdot t_2\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-300}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot \frac{t_3}{\sqrt{-\ell}}\right) \cdot \left(1 - \frac{{t_0}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right)\\ \mathbf{elif}\;\ell \leq 10^{-90}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 100000000:\\ \;\;\;\;t_2 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\ \mathbf{elif}\;\ell \leq 10^{+190}:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(t_0 \cdot \sqrt{0.5}\right)\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \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 2.0) (/ D d)))
        (t_1 (pow (/ d l) 0.5))
        (t_2 (+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) -0.5))))
        (t_3 (sqrt (- d))))
   (if (<= l -1e-80)
     (* (* (/ t_3 (sqrt (- h))) t_1) t_2)
     (if (<= l -1e-300)
       (*
        (* (pow (/ d h) 0.5) (/ t_3 (sqrt (- l))))
        (- 1.0 (/ (* (pow t_0 2.0) (* h 0.5)) l)))
       (if (<= l 1e-90)
         (* (/ 1.0 (sqrt l)) (/ d (sqrt h)))
         (if (<= l 100000000.0)
           (* t_2 (* t_1 (/ (sqrt d) (sqrt h))))
           (if (<= l 1e+190)
             (*
              (* (/ 1.0 (sqrt (/ h d))) (/ (sqrt d) (sqrt l)))
              (- 1.0 (pow (* (sqrt (/ h l)) (* t_0 (sqrt 0.5))) 2.0)))
             (* d (/ (pow l -0.5) (sqrt h))))))))))
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 / 2.0) * (D / d);
	double t_1 = pow((d / l), 0.5);
	double t_2 = 1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * -0.5));
	double t_3 = sqrt(-d);
	double tmp;
	if (l <= -1e-80) {
		tmp = ((t_3 / sqrt(-h)) * t_1) * t_2;
	} else if (l <= -1e-300) {
		tmp = (pow((d / h), 0.5) * (t_3 / sqrt(-l))) * (1.0 - ((pow(t_0, 2.0) * (h * 0.5)) / l));
	} else if (l <= 1e-90) {
		tmp = (1.0 / sqrt(l)) * (d / sqrt(h));
	} else if (l <= 100000000.0) {
		tmp = t_2 * (t_1 * (sqrt(d) / sqrt(h)));
	} else if (l <= 1e+190) {
		tmp = ((1.0 / sqrt((h / d))) * (sqrt(d) / sqrt(l))) * (1.0 - pow((sqrt((h / l)) * (t_0 * sqrt(0.5))), 2.0));
	} else {
		tmp = d * (pow(l, -0.5) / sqrt(h));
	}
	return tmp;
}
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    code = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
end function
real(8) function code(d, h, l, m, d_1)
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: m
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = (m / 2.0d0) * (d_1 / d)
    t_1 = (d / l) ** 0.5d0
    t_2 = 1.0d0 + ((h / l) * ((((m * d_1) / (d * 2.0d0)) ** 2.0d0) * (-0.5d0)))
    t_3 = sqrt(-d)
    if (l <= (-1d-80)) then
        tmp = ((t_3 / sqrt(-h)) * t_1) * t_2
    else if (l <= (-1d-300)) then
        tmp = (((d / h) ** 0.5d0) * (t_3 / sqrt(-l))) * (1.0d0 - (((t_0 ** 2.0d0) * (h * 0.5d0)) / l))
    else if (l <= 1d-90) then
        tmp = (1.0d0 / sqrt(l)) * (d / sqrt(h))
    else if (l <= 100000000.0d0) then
        tmp = t_2 * (t_1 * (sqrt(d) / sqrt(h)))
    else if (l <= 1d+190) then
        tmp = ((1.0d0 / sqrt((h / d))) * (sqrt(d) / sqrt(l))) * (1.0d0 - ((sqrt((h / l)) * (t_0 * sqrt(0.5d0))) ** 2.0d0))
    else
        tmp = d * ((l ** (-0.5d0)) / sqrt(h))
    end if
    code = tmp
end function
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 / 2.0) * (D / d);
	double t_1 = Math.pow((d / l), 0.5);
	double t_2 = 1.0 + ((h / l) * (Math.pow(((M * D) / (d * 2.0)), 2.0) * -0.5));
	double t_3 = Math.sqrt(-d);
	double tmp;
	if (l <= -1e-80) {
		tmp = ((t_3 / Math.sqrt(-h)) * t_1) * t_2;
	} else if (l <= -1e-300) {
		tmp = (Math.pow((d / h), 0.5) * (t_3 / Math.sqrt(-l))) * (1.0 - ((Math.pow(t_0, 2.0) * (h * 0.5)) / l));
	} else if (l <= 1e-90) {
		tmp = (1.0 / Math.sqrt(l)) * (d / Math.sqrt(h));
	} else if (l <= 100000000.0) {
		tmp = t_2 * (t_1 * (Math.sqrt(d) / Math.sqrt(h)));
	} else if (l <= 1e+190) {
		tmp = ((1.0 / Math.sqrt((h / d))) * (Math.sqrt(d) / Math.sqrt(l))) * (1.0 - Math.pow((Math.sqrt((h / l)) * (t_0 * Math.sqrt(0.5))), 2.0));
	} else {
		tmp = d * (Math.pow(l, -0.5) / Math.sqrt(h));
	}
	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 / 2.0) * (D / d)
	t_1 = math.pow((d / l), 0.5)
	t_2 = 1.0 + ((h / l) * (math.pow(((M * D) / (d * 2.0)), 2.0) * -0.5))
	t_3 = math.sqrt(-d)
	tmp = 0
	if l <= -1e-80:
		tmp = ((t_3 / math.sqrt(-h)) * t_1) * t_2
	elif l <= -1e-300:
		tmp = (math.pow((d / h), 0.5) * (t_3 / math.sqrt(-l))) * (1.0 - ((math.pow(t_0, 2.0) * (h * 0.5)) / l))
	elif l <= 1e-90:
		tmp = (1.0 / math.sqrt(l)) * (d / math.sqrt(h))
	elif l <= 100000000.0:
		tmp = t_2 * (t_1 * (math.sqrt(d) / math.sqrt(h)))
	elif l <= 1e+190:
		tmp = ((1.0 / math.sqrt((h / d))) * (math.sqrt(d) / math.sqrt(l))) * (1.0 - math.pow((math.sqrt((h / l)) * (t_0 * math.sqrt(0.5))), 2.0))
	else:
		tmp = d * (math.pow(l, -0.5) / math.sqrt(h))
	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(Float64(M / 2.0) * Float64(D / d))
	t_1 = Float64(d / l) ^ 0.5
	t_2 = Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * -0.5)))
	t_3 = sqrt(Float64(-d))
	tmp = 0.0
	if (l <= -1e-80)
		tmp = Float64(Float64(Float64(t_3 / sqrt(Float64(-h))) * t_1) * t_2);
	elseif (l <= -1e-300)
		tmp = Float64(Float64((Float64(d / h) ^ 0.5) * Float64(t_3 / sqrt(Float64(-l)))) * Float64(1.0 - Float64(Float64((t_0 ^ 2.0) * Float64(h * 0.5)) / l)));
	elseif (l <= 1e-90)
		tmp = Float64(Float64(1.0 / sqrt(l)) * Float64(d / sqrt(h)));
	elseif (l <= 100000000.0)
		tmp = Float64(t_2 * Float64(t_1 * Float64(sqrt(d) / sqrt(h))));
	elseif (l <= 1e+190)
		tmp = Float64(Float64(Float64(1.0 / sqrt(Float64(h / d))) * Float64(sqrt(d) / sqrt(l))) * Float64(1.0 - (Float64(sqrt(Float64(h / l)) * Float64(t_0 * sqrt(0.5))) ^ 2.0)));
	else
		tmp = Float64(d * Float64((l ^ -0.5) / sqrt(h)));
	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 / 2.0) * (D / d);
	t_1 = (d / l) ^ 0.5;
	t_2 = 1.0 + ((h / l) * ((((M * D) / (d * 2.0)) ^ 2.0) * -0.5));
	t_3 = sqrt(-d);
	tmp = 0.0;
	if (l <= -1e-80)
		tmp = ((t_3 / sqrt(-h)) * t_1) * t_2;
	elseif (l <= -1e-300)
		tmp = (((d / h) ^ 0.5) * (t_3 / sqrt(-l))) * (1.0 - (((t_0 ^ 2.0) * (h * 0.5)) / l));
	elseif (l <= 1e-90)
		tmp = (1.0 / sqrt(l)) * (d / sqrt(h));
	elseif (l <= 100000000.0)
		tmp = t_2 * (t_1 * (sqrt(d) / sqrt(h)));
	elseif (l <= 1e+190)
		tmp = ((1.0 / sqrt((h / d))) * (sqrt(d) / sqrt(l))) * (1.0 - ((sqrt((h / l)) * (t_0 * sqrt(0.5))) ^ 2.0));
	else
		tmp = d * ((l ^ -0.5) / sqrt(h));
	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[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(d / l), $MachinePrecision], 0.5], $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[Sqrt[(-d)], $MachinePrecision]}, If[LessEqual[l, -1e-80], N[(N[(N[(t$95$3 / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[l, -1e-300], N[(N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[(t$95$3 / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[Power[t$95$0, 2.0], $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1e-90], N[(N[(1.0 / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(d / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 100000000.0], N[(t$95$2 * N[(t$95$1 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1e+190], N[(N[(N[(1.0 / N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[Power[N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Power[l, -0.5], $MachinePrecision] / N[Sqrt[h], $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 := \frac{M}{2} \cdot \frac{D}{d}\\
t_1 := {\left(\frac{d}{\ell}\right)}^{0.5}\\
t_2 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\
t_3 := \sqrt{-d}\\
\mathbf{if}\;\ell \leq -1 \cdot 10^{-80}:\\
\;\;\;\;\left(\frac{t_3}{\sqrt{-h}} \cdot t_1\right) \cdot t_2\\

\mathbf{elif}\;\ell \leq -1 \cdot 10^{-300}:\\
\;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot \frac{t_3}{\sqrt{-\ell}}\right) \cdot \left(1 - \frac{{t_0}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right)\\

\mathbf{elif}\;\ell \leq 10^{-90}:\\
\;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\

\mathbf{elif}\;\ell \leq 100000000:\\
\;\;\;\;t_2 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\

\mathbf{elif}\;\ell \leq 10^{+190}:\\
\;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(t_0 \cdot \sqrt{0.5}\right)\right)}^{2}\right)\\

\mathbf{else}:\\
\;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 6 regimes
  2. if l < -9.99999999999999961e-81

    1. Initial program 25.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-rr17.6

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

    if -9.99999999999999961e-81 < l < -1.00000000000000003e-300

    1. Initial program 30.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-rr25.2

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

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

    if -1.00000000000000003e-300 < l < 9.99999999999999995e-91

    1. Initial program 31.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. Taylor expanded in d around inf 34.6

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    3. Applied egg-rr33.9

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
    4. Applied egg-rr23.9

      \[\leadsto \color{blue}{\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}} \]

    if 9.99999999999999995e-91 < l < 1e8

    1. Initial program 18.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-rr13.6

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

    if 1e8 < l < 1.0000000000000001e190

    1. Initial program 23.1

      \[\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-rr22.3

      \[\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}{{\left(\sqrt{\frac{h}{\ell}} \cdot \left(\left(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot \sqrt{0.5}\right)\right)}^{2}}\right) \]
    3. Applied egg-rr21.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(\sqrt{\frac{h}{\ell}} \cdot \left(\left(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot \sqrt{0.5}\right)\right)}^{2}\right) \]
    4. Applied egg-rr19.7

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

    if 1.0000000000000001e190 < l

    1. Initial program 31.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. Taylor expanded in d around inf 29.2

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    3. Applied egg-rr37.2

      \[\leadsto \color{blue}{{\left({\left(\frac{\frac{1}{\ell}}{h}\right)}^{1.5}\right)}^{0.3333333333333333}} \cdot d \]
    4. Applied egg-rr17.3

      \[\leadsto \color{blue}{\frac{{\ell}^{-0.5}}{\sqrt{h}}} \cdot d \]
  3. Recombined 6 regimes into one program.
  4. Final simplification17.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1 \cdot 10^{-80}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \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)\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-300}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right)\\ \mathbf{elif}\;\ell \leq 10^{-90}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 100000000:\\ \;\;\;\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{0.5} \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\ \mathbf{elif}\;\ell \leq 10^{+190}:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right) \cdot \left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\left(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot \sqrt{0.5}\right)\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \end{array} \]

Alternatives

Alternative 1
Error20.6
Cost104528
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_2 := {\left(\frac{d}{\ell}\right)}^{0.5}\\ t_3 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_4 := t_1 \cdot \left(t_2 \cdot t_3\right)\\ \mathbf{if}\;t_4 \leq -\infty:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_0 \cdot \left(\frac{-0.125}{d} \cdot \left(\frac{D}{\frac{\ell}{M}} \cdot \frac{D \cdot \left(h \cdot M\right)}{d}\right)\right)\right)\\ \mathbf{elif}\;t_4 \leq -2 \cdot 10^{-241}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \frac{1}{\sqrt{\frac{h}{d}}}\right)\\ \mathbf{elif}\;t_4 \leq 0:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(\frac{\sqrt{-h}}{\sqrt{-{\ell}^{3}}} \cdot \left(0.125 \cdot \left(D \cdot \frac{D}{d}\right)\right)\right) - d \cdot \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{elif}\;t_4 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;t_1 \cdot \left(t_3 \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 2
Error20.3
Cost104464
\[\begin{array}{l} t_0 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_1 := {\left(\frac{d}{\ell}\right)}^{0.5}\\ t_2 := t_0 \cdot \left(t_1 \cdot {\left(\frac{d}{h}\right)}^{0.5}\right)\\ t_3 := \sqrt{\frac{d}{\ell}}\\ t_4 := \sqrt{\frac{h}{d}}\\ \mathbf{if}\;t_2 \leq -\infty:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_3 \cdot \left(\frac{-0.125}{d} \cdot \left(\frac{D}{\frac{\ell}{M}} \cdot \frac{D \cdot \left(h \cdot M\right)}{d}\right)\right)\right)\\ \mathbf{elif}\;t_2 \leq -2 \cdot 10^{-241}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \frac{1}{t_4}\right)\\ \mathbf{elif}\;t_2 \leq 10^{-190}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+277}:\\ \;\;\;\;\frac{t_3 \cdot \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}\right)\right)}{t_4}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 3
Error18.2
Cost34324
\[\begin{array}{l} t_0 := \frac{M}{2} \cdot \frac{D}{d}\\ t_1 := {\left(\frac{d}{\ell}\right)}^{0.5}\\ t_2 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_3 := \sqrt{-d}\\ \mathbf{if}\;\ell \leq -1 \cdot 10^{-80}:\\ \;\;\;\;\left(\frac{t_3}{\sqrt{-h}} \cdot t_1\right) \cdot t_2\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-300}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot \frac{t_3}{\sqrt{-\ell}}\right) \cdot \left(1 - \frac{{t_0}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right)\\ \mathbf{elif}\;\ell \leq 10^{-90}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 100000000:\\ \;\;\;\;t_2 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\ \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+193}:\\ \;\;\;\;\left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(t_0 \cdot \sqrt{0.5}\right)\right)}^{2}\right) \cdot \left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \end{array} \]
Alternative 4
Error18.5
Cost27992
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \sqrt{-d}\\ t_2 := \sqrt{-h}\\ t_3 := \frac{t_1}{\sqrt{-\ell}}\\ t_4 := \sqrt{\frac{d}{h}}\\ \mathbf{if}\;d \leq -1 \cdot 10^{+35}:\\ \;\;\;\;\frac{t_1}{t_2} \cdot \left(t_0 \cdot \mathsf{fma}\left(-0.125, h \cdot \left(M \cdot \frac{D}{\frac{\ell}{M} \cdot \frac{d \cdot d}{D}}\right), 1\right)\right)\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-261}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot t_3\right) \cdot \left(1 - \frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-290}:\\ \;\;\;\;t_4 \cdot \left(t_3 \cdot \left(\left(\left(D \cdot \left(h \cdot D\right)\right) \cdot \left(M \cdot \frac{\frac{M}{\ell}}{d}\right)\right) \cdot \frac{-0.125}{d}\right)\right)\\ \mathbf{elif}\;d \leq -4.2 \cdot 10^{-308}:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(\frac{t_2}{\sqrt{-{\ell}^{3}}} \cdot \left(0.125 \cdot \left(D \cdot \frac{D}{d}\right)\right)\right) - d \cdot \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-195}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \mathbf{elif}\;d \leq 10^{-88}:\\ \;\;\;\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{0.5} \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\ \mathbf{elif}\;d \leq 10^{+92}:\\ \;\;\;\;t_4 \cdot \left(t_0 \cdot \mathsf{fma}\left(-0.125, h \cdot \left(M \cdot \frac{D}{\frac{\ell}{\frac{M \cdot D}{d \cdot d}}}\right), 1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 5
Error18.0
Cost27596
\[\begin{array}{l} t_0 := {\left(\frac{d}{\ell}\right)}^{0.5}\\ t_1 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_2 := \sqrt{-d}\\ \mathbf{if}\;\ell \leq -1 \cdot 10^{-80}:\\ \;\;\;\;\left(\frac{t_2}{\sqrt{-h}} \cdot t_0\right) \cdot t_1\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-300}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot \frac{t_2}{\sqrt{-\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right)\\ \mathbf{elif}\;\ell \leq 10^{-90}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(t_0 \cdot \frac{\sqrt{d}}{\sqrt{h}}\right)\\ \end{array} \]
Alternative 6
Error21.0
Cost21460
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{if}\;d \leq -8.5 \cdot 10^{+91}:\\ \;\;\;\;d \cdot \left(-t_1\right)\\ \mathbf{elif}\;d \leq -7.8 \cdot 10^{-255}:\\ \;\;\;\;\frac{t_0 \cdot \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}\right)\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;d \leq -4.2 \cdot 10^{-308}:\\ \;\;\;\;0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) - d \cdot t_1\\ \mathbf{elif}\;d \leq 6.8 \cdot 10^{-111}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;d \leq 10^{+92}:\\ \;\;\;\;\left(t_0 \cdot \mathsf{fma}\left(-0.125, h \cdot \left(M \cdot \frac{D}{\frac{\ell}{M} \cdot \frac{d \cdot d}{D}}\right), 1\right)\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 7
Error20.7
Cost21460
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \sqrt{\frac{1}{\ell \cdot h}}\\ \mathbf{if}\;d \leq -8.5 \cdot 10^{+91}:\\ \;\;\;\;d \cdot \left(-t_1\right)\\ \mathbf{elif}\;d \leq -7.8 \cdot 10^{-255}:\\ \;\;\;\;\frac{t_0 \cdot \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}\right)\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;d \leq -4.2 \cdot 10^{-308}:\\ \;\;\;\;0.125 \cdot \left(\left(D \cdot D\right) \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(M \cdot \frac{M}{d}\right)\right)\right) - d \cdot t_1\\ \mathbf{elif}\;d \leq 6.8 \cdot 10^{-111}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;d \leq 10^{+92}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_0 \cdot \mathsf{fma}\left(-0.125, h \cdot \left(M \cdot \frac{D}{\frac{\ell}{\frac{M \cdot D}{d \cdot d}}}\right), 1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 8
Error23.3
Cost21140
\[\begin{array}{l} \mathbf{if}\;\ell \leq -6.8 \cdot 10^{+95}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{elif}\;\ell \leq -3.15 \cdot 10^{-25}:\\ \;\;\;\;\left(M \cdot M\right) \cdot \left(\left(0.125 \cdot \left(D \cdot \frac{D}{d}\right)\right) \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right) - d \cdot {\left(\ell \cdot h\right)}^{-0.5}\\ \mathbf{elif}\;\ell \leq 0:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;\ell \leq 1.72 \cdot 10^{-106}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 10^{+50}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{h}{\ell}, -0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 9
Error21.5
Cost21128
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.7 \cdot 10^{+154}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{elif}\;\ell \leq 8.5 \cdot 10^{-276}:\\ \;\;\;\;\left(1 - \frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right) \cdot \left({\left(\frac{d}{\ell}\right)}^{0.5} \cdot {\left(\frac{d}{h}\right)}^{0.5}\right)\\ \mathbf{elif}\;\ell \leq 1.72 \cdot 10^{-106}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 10^{+50}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{h}{\ell}, -0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 10
Error22.1
Cost21064
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.7 \cdot 10^{+154}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{elif}\;\ell \leq 8.5 \cdot 10^{-276}:\\ \;\;\;\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right) \cdot \left({\left(\frac{d}{h}\right)}^{0.5} \cdot \sqrt{\frac{d}{\ell}}\right)\\ \mathbf{elif}\;\ell \leq 1.72 \cdot 10^{-106}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 10^{+50}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{h}{\ell}, -0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 11
Error24.0
Cost21008
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.08 \cdot 10^{+138}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{elif}\;\ell \leq 0:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;\ell \leq 1.72 \cdot 10^{-106}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 10^{+50}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{h}{\ell}, -0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 12
Error22.3
Cost21008
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.7 \cdot 10^{+154}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{elif}\;\ell \leq 8.5 \cdot 10^{-276}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 + {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)\\ \mathbf{elif}\;\ell \leq 1.72 \cdot 10^{-106}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 10^{+50}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{h}{\ell}, -0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 13
Error22.1
Cost21008
\[\begin{array}{l} t_0 := -0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}\\ \mathbf{if}\;\ell \leq -1.7 \cdot 10^{+154}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{elif}\;\ell \leq 8.5 \cdot 10^{-276}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + \frac{h}{\ell} \cdot t_0\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;\ell \leq 1.72 \cdot 10^{-106}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 10^{+50}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}} \cdot \mathsf{fma}\left(\frac{h}{\ell}, t_0, 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 14
Error23.5
Cost13512
\[\begin{array}{l} \mathbf{if}\;d \leq -4.2 \cdot 10^{+101}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{elif}\;d \leq 1.65 \cdot 10^{-296}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 15
Error23.3
Cost13380
\[\begin{array}{l} \mathbf{if}\;h \leq 0:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\ \end{array} \]
Alternative 16
Error23.3
Cost13316
\[\begin{array}{l} \mathbf{if}\;h \leq 0:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \end{array} \]
Alternative 17
Error23.3
Cost13252
\[\begin{array}{l} \mathbf{if}\;h \leq 0:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 18
Error27.2
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.32 \cdot 10^{-272}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
Alternative 19
Error36.4
Cost6980
\[\begin{array}{l} \mathbf{if}\;d \leq -6.6 \cdot 10^{-162}:\\ \;\;\;\;\sqrt{\frac{d \cdot d}{\ell \cdot h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\ \end{array} \]
Alternative 20
Error43.8
Cost6720
\[\frac{d}{\sqrt{\ell \cdot h}} \]

Error

Reproduce

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