Average Error: 26.5 → 16.5
Time: 53.2s
Precision: binary64
Cost: 40456
\[\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{-d}\\ t_1 := 1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\left(\left(D \cdot M\right) \cdot \frac{0.5}{d}\right) \cdot \sqrt{0.5}\right)\right)}^{2}\\ \mathbf{if}\;d \leq -1 \cdot 10^{+194}:\\ \;\;\;\;\frac{t_0}{\sqrt{-h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left({\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right) + 1\right)\right)\\ \mathbf{elif}\;d \leq 0:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot \frac{t_0}{\sqrt{-\ell}}\right) \cdot t_1\\ \mathbf{elif}\;d \leq 10^{+155}:\\ \;\;\;\;t_1 \cdot \left({\left(\frac{d}{h}\right)}^{0.5} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \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 (sqrt (- d)))
        (t_1
         (-
          1.0
          (pow (* (sqrt (/ h l)) (* (* (* D M) (/ 0.5 d)) (sqrt 0.5))) 2.0))))
   (if (<= d -1e+194)
     (*
      (/ t_0 (sqrt (- h)))
      (*
       (sqrt (/ d l))
       (+ (* (pow (* (/ D d) (* M 0.5)) 2.0) (* (/ h l) -0.5)) 1.0)))
     (if (<= d 0.0)
       (* (* (/ 1.0 (sqrt (/ h d))) (/ t_0 (sqrt (- l)))) t_1)
       (if (<= d 1e+155)
         (* t_1 (* (pow (/ d h) 0.5) (/ (sqrt d) (sqrt l))))
         (/ d (* (sqrt l) (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 = sqrt(-d);
	double t_1 = 1.0 - pow((sqrt((h / l)) * (((D * M) * (0.5 / d)) * sqrt(0.5))), 2.0);
	double tmp;
	if (d <= -1e+194) {
		tmp = (t_0 / sqrt(-h)) * (sqrt((d / l)) * ((pow(((D / d) * (M * 0.5)), 2.0) * ((h / l) * -0.5)) + 1.0));
	} else if (d <= 0.0) {
		tmp = ((1.0 / sqrt((h / d))) * (t_0 / sqrt(-l))) * t_1;
	} else if (d <= 1e+155) {
		tmp = t_1 * (pow((d / h), 0.5) * (sqrt(d) / sqrt(l)));
	} else {
		tmp = d / (sqrt(l) * 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) :: tmp
    t_0 = sqrt(-d)
    t_1 = 1.0d0 - ((sqrt((h / l)) * (((d_1 * m) * (0.5d0 / d)) * sqrt(0.5d0))) ** 2.0d0)
    if (d <= (-1d+194)) then
        tmp = (t_0 / sqrt(-h)) * (sqrt((d / l)) * (((((d_1 / d) * (m * 0.5d0)) ** 2.0d0) * ((h / l) * (-0.5d0))) + 1.0d0))
    else if (d <= 0.0d0) then
        tmp = ((1.0d0 / sqrt((h / d))) * (t_0 / sqrt(-l))) * t_1
    else if (d <= 1d+155) then
        tmp = t_1 * (((d / h) ** 0.5d0) * (sqrt(d) / sqrt(l)))
    else
        tmp = d / (sqrt(l) * 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 = Math.sqrt(-d);
	double t_1 = 1.0 - Math.pow((Math.sqrt((h / l)) * (((D * M) * (0.5 / d)) * Math.sqrt(0.5))), 2.0);
	double tmp;
	if (d <= -1e+194) {
		tmp = (t_0 / Math.sqrt(-h)) * (Math.sqrt((d / l)) * ((Math.pow(((D / d) * (M * 0.5)), 2.0) * ((h / l) * -0.5)) + 1.0));
	} else if (d <= 0.0) {
		tmp = ((1.0 / Math.sqrt((h / d))) * (t_0 / Math.sqrt(-l))) * t_1;
	} else if (d <= 1e+155) {
		tmp = t_1 * (Math.pow((d / h), 0.5) * (Math.sqrt(d) / Math.sqrt(l)));
	} else {
		tmp = d / (Math.sqrt(l) * 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 = math.sqrt(-d)
	t_1 = 1.0 - math.pow((math.sqrt((h / l)) * (((D * M) * (0.5 / d)) * math.sqrt(0.5))), 2.0)
	tmp = 0
	if d <= -1e+194:
		tmp = (t_0 / math.sqrt(-h)) * (math.sqrt((d / l)) * ((math.pow(((D / d) * (M * 0.5)), 2.0) * ((h / l) * -0.5)) + 1.0))
	elif d <= 0.0:
		tmp = ((1.0 / math.sqrt((h / d))) * (t_0 / math.sqrt(-l))) * t_1
	elif d <= 1e+155:
		tmp = t_1 * (math.pow((d / h), 0.5) * (math.sqrt(d) / math.sqrt(l)))
	else:
		tmp = d / (math.sqrt(l) * 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 = sqrt(Float64(-d))
	t_1 = Float64(1.0 - (Float64(sqrt(Float64(h / l)) * Float64(Float64(Float64(D * M) * Float64(0.5 / d)) * sqrt(0.5))) ^ 2.0))
	tmp = 0.0
	if (d <= -1e+194)
		tmp = Float64(Float64(t_0 / sqrt(Float64(-h))) * Float64(sqrt(Float64(d / l)) * Float64(Float64((Float64(Float64(D / d) * Float64(M * 0.5)) ^ 2.0) * Float64(Float64(h / l) * -0.5)) + 1.0)));
	elseif (d <= 0.0)
		tmp = Float64(Float64(Float64(1.0 / sqrt(Float64(h / d))) * Float64(t_0 / sqrt(Float64(-l)))) * t_1);
	elseif (d <= 1e+155)
		tmp = Float64(t_1 * Float64((Float64(d / h) ^ 0.5) * Float64(sqrt(d) / sqrt(l))));
	else
		tmp = Float64(d / Float64(sqrt(l) * 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 = sqrt(-d);
	t_1 = 1.0 - ((sqrt((h / l)) * (((D * M) * (0.5 / d)) * sqrt(0.5))) ^ 2.0);
	tmp = 0.0;
	if (d <= -1e+194)
		tmp = (t_0 / sqrt(-h)) * (sqrt((d / l)) * (((((D / d) * (M * 0.5)) ^ 2.0) * ((h / l) * -0.5)) + 1.0));
	elseif (d <= 0.0)
		tmp = ((1.0 / sqrt((h / d))) * (t_0 / sqrt(-l))) * t_1;
	elseif (d <= 1e+155)
		tmp = t_1 * (((d / h) ^ 0.5) * (sqrt(d) / sqrt(l)));
	else
		tmp = d / (sqrt(l) * 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[Sqrt[(-d)], $MachinePrecision]}, Block[{t$95$1 = N[(1.0 - N[Power[N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(D * M), $MachinePrecision] * N[(0.5 / d), $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1e+194], N[(N[(t$95$0 / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Power[N[(N[(D / d), $MachinePrecision] * N[(M * 0.5), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 0.0], N[(N[(N[(1.0 / N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[d, 1e+155], N[(t$95$1 * N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[(N[Sqrt[l], $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 := \sqrt{-d}\\
t_1 := 1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\left(\left(D \cdot M\right) \cdot \frac{0.5}{d}\right) \cdot \sqrt{0.5}\right)\right)}^{2}\\
\mathbf{if}\;d \leq -1 \cdot 10^{+194}:\\
\;\;\;\;\frac{t_0}{\sqrt{-h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left({\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right) + 1\right)\right)\\

\mathbf{elif}\;d \leq 0:\\
\;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot \frac{t_0}{\sqrt{-\ell}}\right) \cdot t_1\\

\mathbf{elif}\;d \leq 10^{+155}:\\
\;\;\;\;t_1 \cdot \left({\left(\frac{d}{h}\right)}^{0.5} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\

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


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 4 regimes
  2. if d < -9.99999999999999945e193

    1. Initial program 31.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. Simplified30.4

      \[\leadsto \color{blue}{\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(\frac{\frac{D}{d}}{\frac{2}{M}}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\right)} \]
      Proof
      (*.f64 (sqrt.f64 (/.f64 d h)) (*.f64 (sqrt.f64 (/.f64 d l)) (fma.f64 (pow.f64 (/.f64 (/.f64 D d) (/.f64 2 M)) 2) (*.f64 (/.f64 h l) -1/2) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= unpow1/2_binary64 (pow.f64 (/.f64 d h) 1/2)) (*.f64 (sqrt.f64 (/.f64 d l)) (fma.f64 (pow.f64 (/.f64 (/.f64 D d) (/.f64 2 M)) 2) (*.f64 (/.f64 h l) -1/2) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (Rewrite<= metadata-eval (/.f64 1 2))) (*.f64 (sqrt.f64 (/.f64 d l)) (fma.f64 (pow.f64 (/.f64 (/.f64 D d) (/.f64 2 M)) 2) (*.f64 (/.f64 h l) -1/2) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (Rewrite<= unpow1/2_binary64 (pow.f64 (/.f64 d l) 1/2)) (fma.f64 (pow.f64 (/.f64 (/.f64 D d) (/.f64 2 M)) 2) (*.f64 (/.f64 h l) -1/2) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (Rewrite<= metadata-eval (/.f64 1 2))) (fma.f64 (pow.f64 (/.f64 (/.f64 D d) (/.f64 2 M)) 2) (*.f64 (/.f64 h l) -1/2) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (fma.f64 (pow.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (/.f64 D d) M) 2)) 2) (*.f64 (/.f64 h l) -1/2) 1))): 5 points increase in error, 3 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (fma.f64 (pow.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 M (/.f64 D d))) 2) 2) (*.f64 (/.f64 h l) -1/2) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (fma.f64 (pow.f64 (/.f64 (Rewrite=> associate-*r/_binary64 (/.f64 (*.f64 M D) d)) 2) 2) (*.f64 (/.f64 h l) -1/2) 1))): 5 points increase in error, 4 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (fma.f64 (pow.f64 (Rewrite=> associate-/l/_binary64 (/.f64 (*.f64 M D) (*.f64 2 d))) 2) (*.f64 (/.f64 h l) -1/2) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (fma.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (*.f64 (/.f64 h l) (Rewrite<= metadata-eval (neg.f64 1/2))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (fma.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (*.f64 (/.f64 h l) (neg.f64 (Rewrite<= metadata-eval (/.f64 1 2)))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (fma.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (/.f64 h l) (/.f64 1 2)))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (fma.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 1 2) (/.f64 h l)))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (neg.f64 (*.f64 (/.f64 1 2) (/.f64 h l)))) 1)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (+.f64 (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (*.f64 (/.f64 1 2) (/.f64 h l))))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (+.f64 (neg.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2) (/.f64 1 2)) (/.f64 h l)))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (+.f64 (neg.f64 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2))) (/.f64 h l))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (+.f64 (Rewrite<= distribute-lft-neg-out_binary64 (*.f64 (neg.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2))) (/.f64 h l))) 1))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (Rewrite<= +-commutative_binary64 (+.f64 1 (*.f64 (neg.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2))) (/.f64 h l)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (*.f64 (pow.f64 (/.f64 d l) (/.f64 1 2)) (Rewrite<= cancel-sign-sub-inv_binary64 (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-*l*_binary64 (*.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))))): 6 points increase in error, 5 points decrease in error
    3. Applied egg-rr30.5

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

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

    if -9.99999999999999945e193 < d < 0.0

    1. Initial program 25.3

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

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

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

      \[\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(\left(M \cdot D\right) \cdot \frac{0.5}{d}\right) \cdot \sqrt{0.5}\right)\right)}^{2}\right) \]

    if 0.0 < d < 1.00000000000000001e155

    1. Initial program 25.5

      \[\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-rr23.6

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

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

    if 1.00000000000000001e155 < d

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

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

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

      \[\leadsto \frac{d}{\color{blue}{\sqrt{\ell} \cdot \sqrt{h}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification16.5

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

Alternatives

Alternative 1
Error21.2
Cost68872
\[\begin{array}{l} t_0 := {\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\\ t_1 := \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\right) \cdot t_0\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+297}:\\ \;\;\;\;t_0 \cdot \left(1 + \left(M \cdot \left(M \cdot \frac{\frac{D}{\frac{d}{D}}}{\frac{\ell}{\frac{h}{d}}}\right)\right) \cdot -0.125\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+276}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \mathsf{fma}\left({\left(\frac{\frac{D}{d}}{\frac{2}{M}}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 2
Error21.2
Cost62600
\[\begin{array}{l} t_0 := {\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\\ t_1 := \left(1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\right) \cdot t_0\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+297}:\\ \;\;\;\;t_0 \cdot \left(1 + \left(M \cdot \left(M \cdot \frac{\frac{D}{\frac{d}{D}}}{\frac{\ell}{\frac{h}{d}}}\right)\right) \cdot -0.125\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+276}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \left({\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right) + 1\right)\right) \cdot \sqrt{\frac{d}{h}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 3
Error18.4
Cost40856
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \left(D \cdot M\right) \cdot \frac{0.5}{d}\\ t_2 := 1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(t_1 \cdot \sqrt{0.5}\right)\right)}^{2}\\ t_3 := \frac{1}{\sqrt{\frac{h}{d}}}\\ \mathbf{if}\;h \leq -1 \cdot 10^{+60}:\\ \;\;\;\;t_2 \cdot \left(t_0 \cdot {\left(\frac{d}{h}\right)}^{0.5}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-82}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \left(-1 + \frac{h}{\ell} \cdot \left(0.5 \cdot {t_1}^{2}\right)\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-150}:\\ \;\;\;\;t_2 \cdot \left(t_0 \cdot t_3\right)\\ \mathbf{elif}\;h \leq 0:\\ \;\;\;\;\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \left(t_0 \cdot \left({\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right) + 1\right)\right)\\ \mathbf{elif}\;h \leq 10^{-158}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{elif}\;h \leq 5.2 \cdot 10^{+175}:\\ \;\;\;\;t_2 \cdot \left(t_3 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 4
Error18.9
Cost34060
\[\begin{array}{l} t_0 := \left(D \cdot M\right) \cdot \frac{0.5}{d}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(t_0 \cdot \sqrt{0.5}\right)\right)}^{2}\right) \cdot \left(t_1 \cdot \frac{1}{\sqrt{\frac{h}{d}}}\right)\\ \mathbf{if}\;h \leq -1 \cdot 10^{+60}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-82}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \left(-1 + \frac{h}{\ell} \cdot \left(0.5 \cdot {t_0}^{2}\right)\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;h \leq 0:\\ \;\;\;\;\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \left(t_1 \cdot \left({\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right) + 1\right)\right)\\ \mathbf{elif}\;h \leq 10^{-91}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{elif}\;h \leq 5.2 \cdot 10^{+175}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\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{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 5
Error18.8
Cost34060
\[\begin{array}{l} t_0 := \left(D \cdot M\right) \cdot \frac{0.5}{d}\\ t_1 := 1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(t_0 \cdot \sqrt{0.5}\right)\right)}^{2}\\ t_2 := \sqrt{\frac{d}{\ell}}\\ t_3 := {\left(\frac{d}{h}\right)}^{0.5}\\ \mathbf{if}\;h \leq -1 \cdot 10^{+60}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot t_3\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-82}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \left(-1 + \frac{h}{\ell} \cdot \left(0.5 \cdot {t_0}^{2}\right)\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-150}:\\ \;\;\;\;t_1 \cdot \left(t_2 \cdot \frac{1}{\sqrt{\frac{h}{d}}}\right)\\ \mathbf{elif}\;h \leq 0:\\ \;\;\;\;\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \left(t_2 \cdot \left({\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right) + 1\right)\right)\\ \mathbf{elif}\;h \leq 10^{-91}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{elif}\;h \leq 5.2 \cdot 10^{+175}:\\ \;\;\;\;\left(t_3 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\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{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 6
Error18.6
Cost27860
\[\begin{array}{l} t_0 := {\left(\left(D \cdot M\right) \cdot \frac{0.5}{d}\right)}^{2}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\ \mathbf{if}\;h \leq -1 \cdot 10^{+62}:\\ \;\;\;\;\left(t_1 \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + \frac{-0.5 \cdot t_0}{\frac{\ell}{h}}\right)\\ \mathbf{elif}\;h \leq -1.85 \cdot 10^{-132}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \left(-1 + \frac{h}{\ell} \cdot \left(0.5 \cdot t_0\right)\right)\\ \mathbf{elif}\;h \leq 0:\\ \;\;\;\;\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left({\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right) + 1\right)\right)\\ \mathbf{elif}\;h \leq 10^{-91}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{elif}\;h \leq 5.2 \cdot 10^{+175}:\\ \;\;\;\;\left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\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{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 7
Error18.8
Cost27796
\[\begin{array}{l} t_0 := {\left(\left(D \cdot M\right) \cdot \frac{0.5}{d}\right)}^{2}\\ t_1 := {\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right) + 1\\ \mathbf{if}\;h \leq -1 \cdot 10^{+62}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + \frac{-0.5 \cdot t_0}{\frac{\ell}{h}}\right)\\ \mathbf{elif}\;h \leq -1.85 \cdot 10^{-132}:\\ \;\;\;\;\left(d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\right) \cdot \left(-1 + \frac{h}{\ell} \cdot \left(0.5 \cdot t_0\right)\right)\\ \mathbf{elif}\;h \leq 0:\\ \;\;\;\;\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot t_1\right)\\ \mathbf{elif}\;h \leq 10^{-91}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{elif}\;h \leq 1.75 \cdot 10^{+123}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 8
Error20.0
Cost27728
\[\begin{array}{l} t_0 := 1 + \frac{h}{\ell} \cdot \left(-0.5 \cdot {\left(\frac{D \cdot M}{d \cdot 2}\right)}^{2}\right)\\ t_1 := \sqrt{-d}\\ \mathbf{if}\;d \leq -1 \cdot 10^{+194}:\\ \;\;\;\;\frac{t_1}{\sqrt{-h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left({\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right) + 1\right)\right)\\ \mathbf{elif}\;d \leq -1.7 \cdot 10^{-306}:\\ \;\;\;\;t_0 \cdot \left(\frac{t_1}{\sqrt{-\ell}} \cdot {\left(\frac{d}{h}\right)}^{0.5}\right)\\ \mathbf{elif}\;d \leq 3.8 \cdot 10^{+28}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;d \leq 10^{+155}:\\ \;\;\;\;t_0 \cdot \left(\frac{\sqrt{d}}{\sqrt{h}} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 9
Error21.7
Cost21000
\[\begin{array}{l} \mathbf{if}\;d \leq -2.15 \cdot 10^{+155}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq 1.65 \cdot 10^{-285}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 + \frac{\left({\left(\frac{D}{d} \cdot M\right)}^{2} \cdot 0.25\right) \cdot \left(h \cdot -0.5\right)}{\ell}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 10
Error21.6
Cost21000
\[\begin{array}{l} \mathbf{if}\;d \leq -5.7 \cdot 10^{+168}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;d \leq -1.7 \cdot 10^{-306}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 - \frac{h}{\ell} \cdot \left(0.5 \cdot {\left(\frac{0.5 \cdot \left(D \cdot M\right)}{d}\right)}^{2}\right)\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 11
Error27.0
Cost14924
\[\begin{array}{l} t_0 := \frac{D}{\frac{d}{D}}\\ \mathbf{if}\;\ell \leq -1.56 \cdot 10^{-149}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + \left(M \cdot \left(M \cdot \frac{t_0}{\frac{\ell}{\frac{h}{d}}}\right)\right) \cdot -0.125\right)\\ \mathbf{elif}\;\ell \leq -8.8 \cdot 10^{-256}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{elif}\;\ell \leq 0:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 + -0.125 \cdot \left(M \cdot \frac{\frac{t_0}{d}}{\frac{\frac{\ell}{h}}{M}}\right)\right)\right)\\ \mathbf{elif}\;\ell \leq 4.4 \cdot 10^{-73}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 1.1 \cdot 10^{-22}:\\ \;\;\;\;\frac{\sqrt{h} \cdot \left(-0.125 \cdot \left(M \cdot \left(D \cdot \frac{M}{\frac{d}{D}}\right)\right)\right)}{{\ell}^{1.5}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 12
Error26.0
Cost13516
\[\begin{array}{l} t_0 := \frac{\frac{d}{\sqrt{\ell}}}{\sqrt{h}}\\ \mathbf{if}\;\ell \leq -6.1 \cdot 10^{-279}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq 4.4 \cdot 10^{-73}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\ell \leq 1.1 \cdot 10^{-22}:\\ \;\;\;\;\sqrt{\frac{h}{\ell} \cdot \frac{1}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \left(D \cdot \frac{D \cdot M}{\frac{d}{M}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 13
Error25.1
Cost13516
\[\begin{array}{l} t_0 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{if}\;\ell \leq -6.1 \cdot 10^{-279}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq 4.4 \cdot 10^{-73}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\ell \leq 1.1 \cdot 10^{-22}:\\ \;\;\;\;\sqrt{\frac{h}{\ell} \cdot \frac{1}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \left(D \cdot \frac{D \cdot M}{\frac{d}{M}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 14
Error25.1
Cost13516
\[\begin{array}{l} \mathbf{if}\;\ell \leq -6.1 \cdot 10^{-279}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq 4.4 \cdot 10^{-73}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \mathbf{elif}\;\ell \leq 1.1 \cdot 10^{-22}:\\ \;\;\;\;\sqrt{\frac{h}{\ell} \cdot \frac{1}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \left(D \cdot \frac{D \cdot M}{\frac{d}{M}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 15
Error25.1
Cost13516
\[\begin{array}{l} \mathbf{if}\;\ell \leq -6.1 \cdot 10^{-279}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{elif}\;\ell \leq 4.4 \cdot 10^{-73}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;\ell \leq 1.1 \cdot 10^{-22}:\\ \;\;\;\;\sqrt{\frac{h}{\ell} \cdot \frac{1}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \left(D \cdot \frac{D \cdot M}{\frac{d}{M}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 16
Error23.0
Cost13384
\[\begin{array}{l} \mathbf{if}\;h \leq -1.82 \cdot 10^{+62}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;h \leq 0:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 17
Error28.7
Cost8140
\[\begin{array}{l} t_0 := \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{if}\;\ell \leq -8.8 \cdot 10^{-256}:\\ \;\;\;\;\left(-d\right) \cdot t_0\\ \mathbf{elif}\;\ell \leq 4.4 \cdot 10^{-73}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \mathbf{elif}\;\ell \leq 1.1 \cdot 10^{-22}:\\ \;\;\;\;\sqrt{\frac{h}{\ell} \cdot \frac{1}{\ell \cdot \ell}} \cdot \left(-0.125 \cdot \left(D \cdot \frac{D \cdot M}{\frac{d}{M}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot t_0\\ \end{array} \]
Alternative 18
Error27.8
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq -8.8 \cdot 10^{-256}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{1}{h \cdot \ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \end{array} \]
Alternative 19
Error27.7
Cost7044
\[\begin{array}{l} t_0 := \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \mathbf{if}\;\ell \leq -8.8 \cdot 10^{-256}:\\ \;\;\;\;\left(-d\right) \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot t_0\\ \end{array} \]
Alternative 20
Error37.3
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq -7.4 \cdot 10^{-205}:\\ \;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 21
Error37.3
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq -7.4 \cdot 10^{-205}:\\ \;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
Alternative 22
Error37.3
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq -7.4 \cdot 10^{-205}:\\ \;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \end{array} \]
Alternative 23
Error43.8
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]
Alternative 24
Error60.0
Cost64
\[0 \]

Error

Reproduce

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