Average Error: 26.4 → 13.0
Time: 56.2s
Precision: binary64
Cost: 83596
\[ \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 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_3 := \left(t_2 \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{-178}:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot t_1\right) \cdot \left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\frac{M \cdot \left(0.5 \cdot D\right)}{d} \cdot \sqrt{0.5}\right)\right)}^{2}\right)\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;t_0\\ \mathbf{elif}\;t_3 \leq 10^{+272}:\\ \;\;\;\;\left(t_2 \cdot t_1\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \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 (fabs (/ d (sqrt (* h l)))))
        (t_1 (sqrt (/ d l)))
        (t_2 (pow (/ d h) 0.5))
        (t_3
         (*
          (* t_2 (pow (/ d l) 0.5))
          (- 1.0 (* (* 0.5 (pow (/ (* M D) (* d 2.0)) 2.0)) (/ h l))))))
   (if (<= t_3 -1e-178)
     (*
      (* (/ 1.0 (sqrt (/ h d))) t_1)
      (-
       1.0
       (pow (* (sqrt (/ h l)) (* (/ (* M (* 0.5 D)) d) (sqrt 0.5))) 2.0)))
     (if (<= t_3 0.0)
       t_0
       (if (<= t_3 1e+272)
         (*
          (* t_2 t_1)
          (+ 1.0 (* (/ h l) (* (pow (* D (/ M (* d 2.0))) 2.0) -0.5))))
         t_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)));
}
double code(double d, double h, double l, double M, double D) {
	double t_0 = fabs((d / sqrt((h * l))));
	double t_1 = sqrt((d / l));
	double t_2 = pow((d / h), 0.5);
	double t_3 = (t_2 * pow((d / l), 0.5)) * (1.0 - ((0.5 * pow(((M * D) / (d * 2.0)), 2.0)) * (h / l)));
	double tmp;
	if (t_3 <= -1e-178) {
		tmp = ((1.0 / sqrt((h / d))) * t_1) * (1.0 - pow((sqrt((h / l)) * (((M * (0.5 * D)) / d) * sqrt(0.5))), 2.0));
	} else if (t_3 <= 0.0) {
		tmp = t_0;
	} else if (t_3 <= 1e+272) {
		tmp = (t_2 * t_1) * (1.0 + ((h / l) * (pow((D * (M / (d * 2.0))), 2.0) * -0.5)));
	} else {
		tmp = t_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
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 = abs((d / sqrt((h * l))))
    t_1 = sqrt((d / l))
    t_2 = (d / h) ** 0.5d0
    t_3 = (t_2 * ((d / l) ** 0.5d0)) * (1.0d0 - ((0.5d0 * (((m * d_1) / (d * 2.0d0)) ** 2.0d0)) * (h / l)))
    if (t_3 <= (-1d-178)) then
        tmp = ((1.0d0 / sqrt((h / d))) * t_1) * (1.0d0 - ((sqrt((h / l)) * (((m * (0.5d0 * d_1)) / d) * sqrt(0.5d0))) ** 2.0d0))
    else if (t_3 <= 0.0d0) then
        tmp = t_0
    else if (t_3 <= 1d+272) then
        tmp = (t_2 * t_1) * (1.0d0 + ((h / l) * (((d_1 * (m / (d * 2.0d0))) ** 2.0d0) * (-0.5d0))))
    else
        tmp = t_0
    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.abs((d / Math.sqrt((h * l))));
	double t_1 = Math.sqrt((d / l));
	double t_2 = Math.pow((d / h), 0.5);
	double t_3 = (t_2 * Math.pow((d / l), 0.5)) * (1.0 - ((0.5 * Math.pow(((M * D) / (d * 2.0)), 2.0)) * (h / l)));
	double tmp;
	if (t_3 <= -1e-178) {
		tmp = ((1.0 / Math.sqrt((h / d))) * t_1) * (1.0 - Math.pow((Math.sqrt((h / l)) * (((M * (0.5 * D)) / d) * Math.sqrt(0.5))), 2.0));
	} else if (t_3 <= 0.0) {
		tmp = t_0;
	} else if (t_3 <= 1e+272) {
		tmp = (t_2 * t_1) * (1.0 + ((h / l) * (Math.pow((D * (M / (d * 2.0))), 2.0) * -0.5)));
	} else {
		tmp = t_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)))
def code(d, h, l, M, D):
	t_0 = math.fabs((d / math.sqrt((h * l))))
	t_1 = math.sqrt((d / l))
	t_2 = math.pow((d / h), 0.5)
	t_3 = (t_2 * math.pow((d / l), 0.5)) * (1.0 - ((0.5 * math.pow(((M * D) / (d * 2.0)), 2.0)) * (h / l)))
	tmp = 0
	if t_3 <= -1e-178:
		tmp = ((1.0 / math.sqrt((h / d))) * t_1) * (1.0 - math.pow((math.sqrt((h / l)) * (((M * (0.5 * D)) / d) * math.sqrt(0.5))), 2.0))
	elif t_3 <= 0.0:
		tmp = t_0
	elif t_3 <= 1e+272:
		tmp = (t_2 * t_1) * (1.0 + ((h / l) * (math.pow((D * (M / (d * 2.0))), 2.0) * -0.5)))
	else:
		tmp = t_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
function code(d, h, l, M, D)
	t_0 = abs(Float64(d / sqrt(Float64(h * l))))
	t_1 = sqrt(Float64(d / l))
	t_2 = Float64(d / h) ^ 0.5
	t_3 = Float64(Float64(t_2 * (Float64(d / l) ^ 0.5)) * Float64(1.0 - Float64(Float64(0.5 * (Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0)) * Float64(h / l))))
	tmp = 0.0
	if (t_3 <= -1e-178)
		tmp = Float64(Float64(Float64(1.0 / sqrt(Float64(h / d))) * t_1) * Float64(1.0 - (Float64(sqrt(Float64(h / l)) * Float64(Float64(Float64(M * Float64(0.5 * D)) / d) * sqrt(0.5))) ^ 2.0)));
	elseif (t_3 <= 0.0)
		tmp = t_0;
	elseif (t_3 <= 1e+272)
		tmp = Float64(Float64(t_2 * t_1) * Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(D * Float64(M / Float64(d * 2.0))) ^ 2.0) * -0.5))));
	else
		tmp = t_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
function tmp_2 = code(d, h, l, M, D)
	t_0 = abs((d / sqrt((h * l))));
	t_1 = sqrt((d / l));
	t_2 = (d / h) ^ 0.5;
	t_3 = (t_2 * ((d / l) ^ 0.5)) * (1.0 - ((0.5 * (((M * D) / (d * 2.0)) ^ 2.0)) * (h / l)));
	tmp = 0.0;
	if (t_3 <= -1e-178)
		tmp = ((1.0 / sqrt((h / d))) * t_1) * (1.0 - ((sqrt((h / l)) * (((M * (0.5 * D)) / d) * sqrt(0.5))) ^ 2.0));
	elseif (t_3 <= 0.0)
		tmp = t_0;
	elseif (t_3 <= 1e+272)
		tmp = (t_2 * t_1) * (1.0 + ((h / l) * (((D * (M / (d * 2.0))) ^ 2.0) * -0.5)));
	else
		tmp = t_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]
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Abs[N[(d / N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 * N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(0.5 * N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-178], N[(N[(N[(1.0 / N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(1.0 - N[Power[N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(M * N[(0.5 * D), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], t$95$0, If[LessEqual[t$95$3, 1e+272], N[(N[(t$95$2 * t$95$1), $MachinePrecision] * N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(D * N[(M / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$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)
\begin{array}{l}
t_0 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\
t_1 := \sqrt{\frac{d}{\ell}}\\
t_2 := {\left(\frac{d}{h}\right)}^{0.5}\\
t_3 := \left(t_2 \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-178}:\\
\;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot t_1\right) \cdot \left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\frac{M \cdot \left(0.5 \cdot D\right)}{d} \cdot \sqrt{0.5}\right)\right)}^{2}\right)\\

\mathbf{elif}\;t_3 \leq 0:\\
\;\;\;\;t_0\\

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

\mathbf{else}:\\
\;\;\;\;t_0\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < -9.9999999999999995e-179

    1. Initial program 27.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-rr27.5

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

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

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

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

    if -9.9999999999999995e-179 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < 0.0 or 1.0000000000000001e272 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l))))

    1. Initial program 57.2

      \[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    2. Simplified57.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))): 3 points increase in error, 1 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))): 2 points increase in error, 13 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, 8 points decrease in error
    3. Taylor expanded in D around 0 53.5

      \[\leadsto \sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \color{blue}{1}\right) \]
    4. Applied egg-rr40.9

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\frac{d}{{\left(h \cdot \ell\right)}^{0.5}}}\right)}^{3}} \]
    5. Applied egg-rr51.0

      \[\leadsto {\color{blue}{\left({\left(\frac{d \cdot d}{h \cdot \ell}\right)}^{0.16666666666666666}\right)}}^{3} \]
    6. Applied egg-rr24.1

      \[\leadsto \color{blue}{\left|\frac{d}{\sqrt{h \cdot \ell}}\right|} \]

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

    1. Initial program 0.9

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

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

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

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

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

Alternatives

Alternative 1
Error13.4
Cost104528
\[\begin{array}{l} t_0 := 1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_3 := \left(t_2 \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot t_0\\ t_4 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{if}\;t_3 \leq -\infty:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_1 \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}\;t_3 \leq -1 \cdot 10^{-178}:\\ \;\;\;\;t_0 \cdot \left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right)\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;t_4\\ \mathbf{elif}\;t_3 \leq 10^{+272}:\\ \;\;\;\;\left(t_2 \cdot t_1\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 2
Error21.3
Cost21920
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \sqrt{\frac{d}{h}} \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)\\ t_2 := \frac{1}{\sqrt{\frac{h}{d}}} \cdot t_0\\ t_3 := t_2 \cdot \left(1 + \frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right)\\ t_4 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{if}\;d \leq -7.7 \cdot 10^{+233}:\\ \;\;\;\;t_0 \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{elif}\;d \leq -7.5 \cdot 10^{+187}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+100}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+25}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq 3.2 \cdot 10^{-283}:\\ \;\;\;\;t_2 \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right)\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{-82}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;d \leq 1.18 \cdot 10^{+82}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 3
Error21.0
Cost21920
\[\begin{array}{l} t_0 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot t_1\right) \cdot \left(1 + \frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot -0.5\right)}{\ell}\right)\\ t_3 := \sqrt{\frac{d}{h}} \cdot \left(t_1 \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{if}\;d \leq -7.7 \cdot 10^{+233}:\\ \;\;\;\;t_1 \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{elif}\;d \leq -7.5 \cdot 10^{+187}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+100}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+25}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq -5 \cdot 10^{-82}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq 3.2 \cdot 10^{-283}:\\ \;\;\;\;\left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \cdot \left({\left(\frac{d}{h}\right)}^{0.5} \cdot t_1\right)\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{-82}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 1.18 \cdot 10^{+82}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error21.4
Cost21856
\[\begin{array}{l} t_0 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \frac{1}{\sqrt{\frac{h}{d}}} \cdot t_1\\ t_3 := \sqrt{\frac{d}{h}} \cdot \left(t_1 \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{if}\;d \leq -7.7 \cdot 10^{+233}:\\ \;\;\;\;t_1 \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{elif}\;d \leq -7.5 \cdot 10^{+187}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+100}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+25}:\\ \;\;\;\;t_2 \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 -5 \cdot 10^{-82}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -9.5 \cdot 10^{-213}:\\ \;\;\;\;\left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \cdot t_2\\ \mathbf{elif}\;d \leq 6.7 \cdot 10^{-108}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+51}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 5
Error21.4
Cost21592
\[\begin{array}{l} t_0 := \left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \sqrt{\frac{d}{h}} \cdot \left(t_1 \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{if}\;d \leq -7.7 \cdot 10^{+233}:\\ \;\;\;\;t_1 \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{elif}\;d \leq -7.5 \cdot 10^{+187}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+100}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq -9.5 \cdot 10^{-213}:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot t_1\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 6.7 \cdot 10^{-108}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+51}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 6
Error21.9
Cost21524
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := t_0 \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{if}\;d \leq -7.7 \cdot 10^{+233}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq -7.5 \cdot 10^{+187}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+150}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-90}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \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 -1.55 \cdot 10^{-176}:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot t_0\right) \cdot \left(1 - \frac{0.5 \cdot {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2}}{\frac{\ell}{h}}\right)\\ \mathbf{elif}\;d \leq -2 \cdot 10^{-295}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + -0.125 \cdot \left(M \cdot \frac{h}{\frac{\ell}{M} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 7
Error21.6
Cost21396
\[\begin{array}{l} t_0 := 1 + -0.125 \cdot \left(M \cdot \frac{h}{\frac{\ell}{M} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)}\right)\\ t_1 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ t_2 := \sqrt{\frac{d}{\ell}}\\ t_3 := t_2 \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{if}\;d \leq -7.7 \cdot 10^{+233}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -7.5 \cdot 10^{+187}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+126}:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot t_2\right) \cdot t_0\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+71}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq 3.2 \cdot 10^{-283}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_2 \cdot \left(1 + {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{-82}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+51}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error21.9
Cost21396
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := t_1 \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ \mathbf{if}\;d \leq -7.7 \cdot 10^{+233}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq -7.5 \cdot 10^{+187}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+150}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-90}:\\ \;\;\;\;t_0 \cdot \left(t_1 \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 -1 \cdot 10^{-176}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \left(1 + {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\right)\\ \mathbf{elif}\;d \leq -2 \cdot 10^{-295}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 + -0.125 \cdot \left(M \cdot \frac{h}{\frac{\ell}{M} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 9
Error22.7
Cost20304
\[\begin{array}{l} t_0 := 1 + -0.125 \cdot \left(M \cdot \frac{h}{\frac{\ell}{M} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)}\right)\\ t_1 := \left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot t_0\\ t_2 := \sqrt{\frac{d}{\ell}}\\ t_3 := t_2 \cdot \frac{\sqrt{-d}}{\sqrt{-h}}\\ t_4 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \mathbf{if}\;d \leq -7.7 \cdot 10^{+233}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -7.5 \cdot 10^{+187}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+126}:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot t_2\right) \cdot t_0\\ \mathbf{elif}\;d \leq -1 \cdot 10^{+50}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;d \leq -2 \cdot 10^{-295}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{-82}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_4\\ \end{array} \]
Alternative 10
Error24.2
Cost15052
\[\begin{array}{l} t_0 := \frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ t_1 := 1 + -0.125 \cdot \left(M \cdot \frac{h}{\frac{\ell}{M} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)}\right)\\ \mathbf{if}\;d \leq -2 \cdot 10^{-295}:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot t_1\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{-82}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 2.3 \cdot 10^{+51}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Error24.2
Cost14788
\[\begin{array}{l} \mathbf{if}\;\ell \leq 2.1 \cdot 10^{-298}:\\ \;\;\;\;\left(\frac{1}{\sqrt{\frac{h}{d}}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + -0.125 \cdot \left(M \cdot \frac{h}{\frac{\ell}{M} \cdot \left(\frac{d}{D} \cdot \frac{d}{D}\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 12
Error22.9
Cost13508
\[\begin{array}{l} \mathbf{if}\;h \leq -1 \cdot 10^{+135}:\\ \;\;\;\;\frac{1}{\sqrt{\frac{h}{d}}} \cdot \sqrt{\frac{d}{\ell}}\\ \mathbf{elif}\;h \leq 10^{-252}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 13
Error22.9
Cost13384
\[\begin{array}{l} \mathbf{if}\;h \leq -2.25 \cdot 10^{+132}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;h \leq 10^{-252}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 14
Error23.8
Cost13252
\[\begin{array}{l} \mathbf{if}\;h \leq 10^{-252}:\\ \;\;\;\;\left|\frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 15
Error27.4
Cost13120
\[\left|\frac{d}{\sqrt{h \cdot \ell}}\right| \]
Alternative 16
Error33.1
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq 5.9 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]
Alternative 17
Error33.4
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq 1.5 \cdot 10^{-217}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \end{array} \]
Alternative 18
Error33.1
Cost6980
\[\begin{array}{l} \mathbf{if}\;\ell \leq 5.9 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}\\ \end{array} \]
Alternative 19
Error43.8
Cost6784
\[d \cdot {\left(h \cdot \ell\right)}^{-0.5} \]
Alternative 20
Error43.8
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce

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