Henrywood and Agarwal, Equation (12)

?

Percentage Accurate: 67.6% → 71.5%
Time: 23.9s
Precision: binary64
Cost: 33800

?

\[\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} [M, D] = \mathsf{sort}([M, D])\\ \\ \begin{array}{l} t_0 := D \cdot \frac{M}{d \cdot 2}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \left(1 - 0.5 \cdot {\left(t_0 \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}\right)\right)\\ \mathbf{elif}\;d \leq 1.05 \cdot 10^{-197}:\\ \;\;\;\;\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \left(1 - 0.5 \cdot {\left(t_0 \cdot \frac{\sqrt{h}}{\sqrt{\ell}}\right)}^{2}\right)\right)\\ \end{array} \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)))))
NOTE: M and D should be sorted in increasing order before calling this function.
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (* D (/ M (* d 2.0)))) (t_1 (sqrt (/ d h))) (t_2 (sqrt (/ d l))))
   (if (<= d -2e-310)
     (* t_1 (* t_2 (- 1.0 (* 0.5 (pow (* t_0 (sqrt (/ h l))) 2.0)))))
     (if (<= d 1.05e-197)
       (* (* D (* (* M M) (/ D d))) (* (/ (sqrt h) (pow l 1.5)) -0.125))
       (*
        t_1
        (* t_2 (- 1.0 (* 0.5 (pow (* t_0 (/ (sqrt h) (sqrt l))) 2.0)))))))))
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)));
}
assert(M < D);
double code(double d, double h, double l, double M, double D) {
	double t_0 = D * (M / (d * 2.0));
	double t_1 = sqrt((d / h));
	double t_2 = sqrt((d / l));
	double tmp;
	if (d <= -2e-310) {
		tmp = t_1 * (t_2 * (1.0 - (0.5 * pow((t_0 * sqrt((h / l))), 2.0))));
	} else if (d <= 1.05e-197) {
		tmp = (D * ((M * M) * (D / d))) * ((sqrt(h) / pow(l, 1.5)) * -0.125);
	} else {
		tmp = t_1 * (t_2 * (1.0 - (0.5 * pow((t_0 * (sqrt(h) / sqrt(l))), 2.0))));
	}
	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
NOTE: M and D should be sorted in increasing order before calling this 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) :: tmp
    t_0 = d_1 * (m / (d * 2.0d0))
    t_1 = sqrt((d / h))
    t_2 = sqrt((d / l))
    if (d <= (-2d-310)) then
        tmp = t_1 * (t_2 * (1.0d0 - (0.5d0 * ((t_0 * sqrt((h / l))) ** 2.0d0))))
    else if (d <= 1.05d-197) then
        tmp = (d_1 * ((m * m) * (d_1 / d))) * ((sqrt(h) / (l ** 1.5d0)) * (-0.125d0))
    else
        tmp = t_1 * (t_2 * (1.0d0 - (0.5d0 * ((t_0 * (sqrt(h) / sqrt(l))) ** 2.0d0))))
    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)));
}
assert M < D;
public static double code(double d, double h, double l, double M, double D) {
	double t_0 = D * (M / (d * 2.0));
	double t_1 = Math.sqrt((d / h));
	double t_2 = Math.sqrt((d / l));
	double tmp;
	if (d <= -2e-310) {
		tmp = t_1 * (t_2 * (1.0 - (0.5 * Math.pow((t_0 * Math.sqrt((h / l))), 2.0))));
	} else if (d <= 1.05e-197) {
		tmp = (D * ((M * M) * (D / d))) * ((Math.sqrt(h) / Math.pow(l, 1.5)) * -0.125);
	} else {
		tmp = t_1 * (t_2 * (1.0 - (0.5 * Math.pow((t_0 * (Math.sqrt(h) / Math.sqrt(l))), 2.0))));
	}
	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)))
[M, D] = sort([M, D])
def code(d, h, l, M, D):
	t_0 = D * (M / (d * 2.0))
	t_1 = math.sqrt((d / h))
	t_2 = math.sqrt((d / l))
	tmp = 0
	if d <= -2e-310:
		tmp = t_1 * (t_2 * (1.0 - (0.5 * math.pow((t_0 * math.sqrt((h / l))), 2.0))))
	elif d <= 1.05e-197:
		tmp = (D * ((M * M) * (D / d))) * ((math.sqrt(h) / math.pow(l, 1.5)) * -0.125)
	else:
		tmp = t_1 * (t_2 * (1.0 - (0.5 * math.pow((t_0 * (math.sqrt(h) / math.sqrt(l))), 2.0))))
	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
M, D = sort([M, D])
function code(d, h, l, M, D)
	t_0 = Float64(D * Float64(M / Float64(d * 2.0)))
	t_1 = sqrt(Float64(d / h))
	t_2 = sqrt(Float64(d / l))
	tmp = 0.0
	if (d <= -2e-310)
		tmp = Float64(t_1 * Float64(t_2 * Float64(1.0 - Float64(0.5 * (Float64(t_0 * sqrt(Float64(h / l))) ^ 2.0)))));
	elseif (d <= 1.05e-197)
		tmp = Float64(Float64(D * Float64(Float64(M * M) * Float64(D / d))) * Float64(Float64(sqrt(h) / (l ^ 1.5)) * -0.125));
	else
		tmp = Float64(t_1 * Float64(t_2 * Float64(1.0 - Float64(0.5 * (Float64(t_0 * Float64(sqrt(h) / sqrt(l))) ^ 2.0)))));
	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
M, D = num2cell(sort([M, D])){:}
function tmp_2 = code(d, h, l, M, D)
	t_0 = D * (M / (d * 2.0));
	t_1 = sqrt((d / h));
	t_2 = sqrt((d / l));
	tmp = 0.0;
	if (d <= -2e-310)
		tmp = t_1 * (t_2 * (1.0 - (0.5 * ((t_0 * sqrt((h / l))) ^ 2.0))));
	elseif (d <= 1.05e-197)
		tmp = (D * ((M * M) * (D / d))) * ((sqrt(h) / (l ^ 1.5)) * -0.125);
	else
		tmp = t_1 * (t_2 * (1.0 - (0.5 * ((t_0 * (sqrt(h) / sqrt(l))) ^ 2.0))));
	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]
NOTE: M and D should be sorted in increasing order before calling this function.
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(D * N[(M / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -2e-310], N[(t$95$1 * N[(t$95$2 * N[(1.0 - N[(0.5 * N[Power[N[(t$95$0 * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.05e-197], N[(N[(D * N[(N[(M * M), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[h], $MachinePrecision] / N[Power[l, 1.5], $MachinePrecision]), $MachinePrecision] * -0.125), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$2 * N[(1.0 - N[(0.5 * N[Power[N[(t$95$0 * N[(N[Sqrt[h], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $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}
[M, D] = \mathsf{sort}([M, D])\\
\\
\begin{array}{l}
t_0 := D \cdot \frac{M}{d \cdot 2}\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := \sqrt{\frac{d}{\ell}}\\
\mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_1 \cdot \left(t_2 \cdot \left(1 - 0.5 \cdot {\left(t_0 \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}\right)\right)\\

\mathbf{elif}\;d \leq 1.05 \cdot 10^{-197}:\\
\;\;\;\;\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(t_2 \cdot \left(1 - 0.5 \cdot {\left(t_0 \cdot \frac{\sqrt{h}}{\sqrt{\ell}}\right)}^{2}\right)\right)\\


\end{array}
\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Herbie found 21 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

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

Bogosity?

Bogosity

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 3 regimes
  2. if d < -1.999999999999994e-310

    1. Initial program 71.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. Simplified71.3%

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

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

      associate-*l* [=>]71.4%

      \[ \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\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)\right)} \]

      metadata-eval [=>]71.4%

      \[ {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\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)\right) \]

      unpow1/2 [=>]71.4%

      \[ \color{blue}{\sqrt{\frac{d}{h}}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\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)\right) \]

      metadata-eval [=>]71.4%

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

      unpow1/2 [=>]71.4%

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

      associate-*l* [=>]71.4%

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

      metadata-eval [=>]71.4%

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

      times-frac [=>]71.3%

      \[ \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Applied egg-rr69.6%

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

      [Start]71.3%

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

      associate-*r/ [=>]69.5%

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

      frac-times [=>]70.3%

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

      *-commutative [=>]70.3%

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

      *-commutative [=>]70.3%

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

      associate-*r/ [<=]69.6%

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

      associate-/r* [=>]69.6%

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

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

      [Start]69.6%

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

      *-commutative [=>]69.6%

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

      associate-/l/ [=>]69.6%

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

      associate-*l/ [<=]71.4%

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

      add-sqr-sqrt [=>]71.4%

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

      pow2 [=>]71.4%

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

    if -1.999999999999994e-310 < d < 1.05e-197

    1. Initial program 27.8%

      \[\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 0 43.2%

      \[\leadsto \color{blue}{-0.125 \cdot \left(\frac{{D}^{2} \cdot {M}^{2}}{d} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)} \]
    3. Simplified37.5%

      \[\leadsto \color{blue}{\left(\frac{D}{\frac{d}{D}} \cdot \left(M \cdot M\right)\right) \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right)} \]
      Step-by-step derivation

      [Start]43.2%

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

      *-commutative [=>]43.2%

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

      associate-*l* [=>]43.2%

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

      associate-/l* [=>]38.2%

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

      associate-/r/ [=>]37.4%

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

      unpow2 [=>]37.4%

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

      associate-/l* [=>]37.5%

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

      unpow2 [=>]37.5%

      \[ \left(\frac{D}{\frac{d}{D}} \cdot \color{blue}{\left(M \cdot M\right)}\right) \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right) \]
    4. Taylor expanded in D around 0 43.2%

      \[\leadsto \color{blue}{\frac{{D}^{2} \cdot {M}^{2}}{d}} \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right) \]
    5. Simplified38.2%

      \[\leadsto \color{blue}{\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right)} \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right) \]
      Step-by-step derivation

      [Start]43.2%

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

      unpow2 [=>]43.2%

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

      associate-*l/ [<=]37.4%

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

      unpow2 [=>]37.4%

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

      associate-*r/ [<=]37.5%

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

      associate-*l* [=>]38.2%

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

      *-commutative [=>]38.2%

      \[ \left(D \cdot \color{blue}{\left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)}\right) \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot -0.125\right) \]
    6. Applied egg-rr48.4%

      \[\leadsto \left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\color{blue}{\frac{\sqrt{h}}{\sqrt{{\ell}^{3}}}} \cdot -0.125\right) \]
      Step-by-step derivation

      [Start]38.2%

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

      sqrt-div [=>]48.4%

      \[ \left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\color{blue}{\frac{\sqrt{h}}{\sqrt{{\ell}^{3}}}} \cdot -0.125\right) \]
    7. Simplified64.0%

      \[\leadsto \left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\color{blue}{\frac{\sqrt{h}}{{\ell}^{1.5}}} \cdot -0.125\right) \]
      Step-by-step derivation

      [Start]48.4%

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

      sqr-pow [=>]48.4%

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

      rem-sqrt-square [=>]64.0%

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

      sqr-pow [=>]64.0%

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

      fabs-sqr [=>]64.0%

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

      sqr-pow [<=]64.0%

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

      metadata-eval [=>]64.0%

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

    if 1.05e-197 < d

    1. Initial program 79.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. Simplified78.0%

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

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

      associate-*l* [=>]78.9%

      \[ \color{blue}{{\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\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)\right)} \]

      metadata-eval [=>]78.9%

      \[ {\left(\frac{d}{h}\right)}^{\color{blue}{0.5}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\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)\right) \]

      unpow1/2 [=>]78.9%

      \[ \color{blue}{\sqrt{\frac{d}{h}}} \cdot \left({\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\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)\right) \]

      metadata-eval [=>]78.9%

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

      unpow1/2 [=>]78.9%

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

      associate-*l* [=>]78.9%

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

      metadata-eval [=>]78.9%

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

      times-frac [=>]78.0%

      \[ \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \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)\right) \]
    3. Applied egg-rr81.4%

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

      [Start]78.0%

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

      associate-*r/ [=>]80.6%

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

      frac-times [=>]81.5%

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

      *-commutative [=>]81.5%

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

      *-commutative [=>]81.5%

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

      associate-*r/ [<=]81.4%

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

      associate-/r* [=>]81.4%

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

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

      [Start]81.4%

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

      *-commutative [=>]81.4%

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

      associate-/l/ [=>]81.4%

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

      associate-*l/ [<=]78.7%

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

      add-sqr-sqrt [=>]78.7%

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

      pow2 [=>]78.7%

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

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

      [Start]81.4%

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

      sqrt-div [=>]85.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot {\left(\left(D \cdot \frac{M}{d \cdot 2}\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}\right)\right)\\ \mathbf{elif}\;d \leq 1.05 \cdot 10^{-197}:\\ \;\;\;\;\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot {\left(\left(D \cdot \frac{M}{d \cdot 2}\right) \cdot \frac{\sqrt{h}}{\sqrt{\ell}}\right)}^{2}\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy71.5%
Cost33800
\[\begin{array}{l} t_0 := D \cdot \frac{M}{d \cdot 2}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \left(1 - 0.5 \cdot {\left(t_0 \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}\right)\right)\\ \mathbf{elif}\;d \leq 1.05 \cdot 10^{-197}:\\ \;\;\;\;\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \left(1 - 0.5 \cdot {\left(t_0 \cdot \frac{\sqrt{h}}{\sqrt{\ell}}\right)}^{2}\right)\right)\\ \end{array} \]
Alternative 2
Accuracy71.5%
Cost48068
\[\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(0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\right) \leq \infty:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot {\left(\left(D \cdot \frac{M}{d \cdot 2}\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \end{array} \]
Alternative 3
Accuracy71.0%
Cost41796
\[\begin{array}{l} t_0 := \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(0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\right)\\ \mathbf{if}\;t_0 \leq \infty:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \end{array} \]
Alternative 4
Accuracy69.6%
Cost21128
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right)\right)\\ \mathbf{elif}\;d \leq 5.1 \cdot 10^{-197}:\\ \;\;\;\;\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(1 + 0.5 \cdot \left(\left(h \cdot {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2}\right) \cdot \frac{-1}{\ell}\right)\right)\right)\\ \end{array} \]
Alternative 5
Accuracy68.8%
Cost21000
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right)\right)\\ \mathbf{elif}\;d \leq 3 \cdot 10^{-197}:\\ \;\;\;\;\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(1 + {\left(D \cdot \frac{\frac{M}{d}}{2}\right)}^{2} \cdot \left(h \cdot \frac{-0.5}{\ell}\right)\right)\right)\\ \end{array} \]
Alternative 6
Accuracy69.6%
Cost21000
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right)\right)\\ \mathbf{elif}\;d \leq 5.1 \cdot 10^{-197}:\\ \;\;\;\;\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(1 - 0.5 \cdot \frac{h \cdot {\left(D \cdot \frac{\frac{M}{d}}{2}\right)}^{2}}{\ell}\right)\right)\\ \end{array} \]
Alternative 7
Accuracy67.0%
Cost20736
\[\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 + {\left(D \cdot \frac{\frac{M}{d}}{2}\right)}^{2} \cdot \left(h \cdot \frac{-0.5}{\ell}\right)\right)\right) \]
Alternative 8
Accuracy68.4%
Cost15052
\[\begin{array}{l} t_0 := {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2}\\ t_1 := -0.5 \cdot \left(\frac{h}{\ell} \cdot t_0\right)\\ t_2 := d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{if}\;\ell \leq -1.55 \cdot 10^{-170}:\\ \;\;\;\;t_2 \cdot \left(-1 - t_1\right)\\ \mathbf{elif}\;\ell \leq 2.4 \cdot 10^{-92}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + -0.5 \cdot \frac{h \cdot t_0}{\ell}\right)\\ \mathbf{elif}\;\ell \leq 3.9 \cdot 10^{+206}:\\ \;\;\;\;\left(1 + t_1\right) \cdot t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left(\left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{h \cdot M}{\frac{\ell}{M}}\right) \cdot 0.25\right)\right)\right)\\ \end{array} \]
Alternative 9
Accuracy70.5%
Cost14668
\[\begin{array}{l} t_0 := {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2}\\ t_1 := -0.5 \cdot \left(\frac{h}{\ell} \cdot t_0\right)\\ t_2 := d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{if}\;\ell \leq -9 \cdot 10^{-173}:\\ \;\;\;\;t_2 \cdot \left(-1 - t_1\right)\\ \mathbf{elif}\;\ell \leq 3.3 \cdot 10^{-93}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 + -0.5 \cdot \frac{h \cdot t_0}{\ell}\right)\\ \mathbf{elif}\;\ell \leq 9 \cdot 10^{+99}:\\ \;\;\;\;\left(1 + t_1\right) \cdot t_2\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\ \end{array} \]
Alternative 10
Accuracy57.1%
Cost14536
\[\begin{array}{l} \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+100}:\\ \;\;\;\;\left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2}\right)\right) \cdot \left(d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\ \end{array} \]
Alternative 11
Accuracy62.2%
Cost14536
\[\begin{array}{l} \mathbf{if}\;\ell \leq 2.35 \cdot 10^{-301}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}} \cdot \left(1 - {\left(\frac{D}{d}\right)}^{2} \cdot \left(0.125 \cdot \left(M \cdot \frac{h}{\frac{\ell}{M}}\right)\right)\right)\\ \mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+100}:\\ \;\;\;\;\left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2}\right)\right) \cdot \left(d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\ \end{array} \]
Alternative 12
Accuracy64.4%
Cost14536
\[\begin{array}{l} t_0 := 1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2}\right)\\ \mathbf{if}\;\ell \leq 1.6 \cdot 10^{-214}:\\ \;\;\;\;t_0 \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{elif}\;\ell \leq 8.4 \cdot 10^{+99}:\\ \;\;\;\;t_0 \cdot \left(d \cdot {\left(h \cdot \ell\right)}^{-0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\ \end{array} \]
Alternative 13
Accuracy47.0%
Cost14088
\[\begin{array}{l} \mathbf{if}\;d \leq 9.5 \cdot 10^{-285}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 2.4 \cdot 10^{+27}:\\ \;\;\;\;-0.125 \cdot \left(D \cdot \left(\frac{D}{\frac{d}{M \cdot M}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 14
Accuracy49.9%
Cost14088
\[\begin{array}{l} \mathbf{if}\;d \leq -2 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;d \leq 5.2 \cdot 10^{+30}:\\ \;\;\;\;\left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{D}{d}\right)\right) \cdot \left(\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot -0.125\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 15
Accuracy32.1%
Cost13444
\[\begin{array}{l} \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;d \cdot \sqrt[3]{{\left(\frac{1}{h \cdot \ell}\right)}^{1.5}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\ \end{array} \]
Alternative 16
Accuracy31.9%
Cost13444
\[\begin{array}{l} \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;d \cdot \frac{1}{\sqrt[3]{{\left(h \cdot \ell\right)}^{1.5}}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\ \end{array} \]
Alternative 17
Accuracy30.1%
Cost13380
\[\begin{array}{l} \mathbf{if}\;\ell \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\ \end{array} \]
Alternative 18
Accuracy45.8%
Cost13380
\[\begin{array}{l} \mathbf{if}\;d \leq 1.6 \cdot 10^{-246}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\ \end{array} \]
Alternative 19
Accuracy26.4%
Cost6848
\[d \cdot \sqrt{\frac{1}{h \cdot \ell}} \]
Alternative 20
Accuracy26.2%
Cost6784
\[d \cdot {\left(h \cdot \ell\right)}^{-0.5} \]
Alternative 21
Accuracy26.2%
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Reproduce?

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