Average Error: 26.6 → 15.3
Time: 40.7s
Precision: binary64
Cost: 110608
\[ \begin{array}{c}[M, D] = \mathsf{sort}([M, D])\\ \end{array} \]
\[\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
\[\begin{array}{l} t_0 := \sqrt{h \cdot \ell}\\ t_1 := M \cdot \left(D \cdot \frac{0.5}{d}\right)\\ t_2 := {\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\\ t_3 := t_2 \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\ t_4 := \frac{h}{\ell} \cdot {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{-237}:\\ \;\;\;\;t_2 \cdot \left(1 - {\left(\left(t_1 \cdot \sqrt{0.5}\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}\right)\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{-282}:\\ \;\;\;\;\left|\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot {t_1}^{2}, 1\right) \cdot \frac{d}{t_0}\right|\\ \mathbf{elif}\;t_3 \leq 10^{+262}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + -0.5 \cdot t_4\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(-0.5, t_4, 1\right)}{\frac{t_0}{d}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\ \end{array} \]
(FPCore (d h l M D)
 :precision binary64
 (*
  (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0)))
  (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
(FPCore (d h l M D)
 :precision binary64
 (let* ((t_0 (sqrt (* h l)))
        (t_1 (* M (* D (/ 0.5 d))))
        (t_2 (* (pow (/ d h) 0.5) (pow (/ d l) 0.5)))
        (t_3
         (* t_2 (- 1.0 (* (* 0.5 (pow (/ (* M D) (* d 2.0)) 2.0)) (/ h l)))))
        (t_4 (* (/ h l) (pow (* M (* 0.5 (/ D d))) 2.0))))
   (if (<= t_3 -1e-237)
     (* t_2 (- 1.0 (pow (* (* t_1 (sqrt 0.5)) (sqrt (/ h l))) 2.0)))
     (if (<= t_3 4e-282)
       (fabs (* (fma -0.5 (* (/ h l) (pow t_1 2.0)) 1.0) (/ d t_0)))
       (if (<= t_3 1e+262)
         (/ (* (sqrt (/ d l)) (+ 1.0 (* -0.5 t_4))) (sqrt (/ h d)))
         (if (<= t_3 INFINITY)
           (fabs (/ (fma -0.5 t_4 1.0) (/ t_0 d)))
           (sqrt (* d (/ d (* h l))))))))))
double code(double d, double h, double l, double M, double D) {
	return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
double code(double d, double h, double l, double M, double D) {
	double t_0 = sqrt((h * l));
	double t_1 = M * (D * (0.5 / d));
	double t_2 = pow((d / h), 0.5) * pow((d / l), 0.5);
	double t_3 = t_2 * (1.0 - ((0.5 * pow(((M * D) / (d * 2.0)), 2.0)) * (h / l)));
	double t_4 = (h / l) * pow((M * (0.5 * (D / d))), 2.0);
	double tmp;
	if (t_3 <= -1e-237) {
		tmp = t_2 * (1.0 - pow(((t_1 * sqrt(0.5)) * sqrt((h / l))), 2.0));
	} else if (t_3 <= 4e-282) {
		tmp = fabs((fma(-0.5, ((h / l) * pow(t_1, 2.0)), 1.0) * (d / t_0)));
	} else if (t_3 <= 1e+262) {
		tmp = (sqrt((d / l)) * (1.0 + (-0.5 * t_4))) / sqrt((h / d));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = fabs((fma(-0.5, t_4, 1.0) / (t_0 / d)));
	} else {
		tmp = sqrt((d * (d / (h * l))));
	}
	return tmp;
}
function code(d, h, l, M, D)
	return Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l))))
end
function code(d, h, l, M, D)
	t_0 = sqrt(Float64(h * l))
	t_1 = Float64(M * Float64(D * Float64(0.5 / d)))
	t_2 = Float64((Float64(d / h) ^ 0.5) * (Float64(d / l) ^ 0.5))
	t_3 = Float64(t_2 * Float64(1.0 - Float64(Float64(0.5 * (Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0)) * Float64(h / l))))
	t_4 = Float64(Float64(h / l) * (Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0))
	tmp = 0.0
	if (t_3 <= -1e-237)
		tmp = Float64(t_2 * Float64(1.0 - (Float64(Float64(t_1 * sqrt(0.5)) * sqrt(Float64(h / l))) ^ 2.0)));
	elseif (t_3 <= 4e-282)
		tmp = abs(Float64(fma(-0.5, Float64(Float64(h / l) * (t_1 ^ 2.0)), 1.0) * Float64(d / t_0)));
	elseif (t_3 <= 1e+262)
		tmp = Float64(Float64(sqrt(Float64(d / l)) * Float64(1.0 + Float64(-0.5 * t_4))) / sqrt(Float64(h / d)));
	elseif (t_3 <= Inf)
		tmp = abs(Float64(fma(-0.5, t_4, 1.0) / Float64(t_0 / d)));
	else
		tmp = sqrt(Float64(d * Float64(d / Float64(h * l))));
	end
	return tmp
end
code[d_, h_, l_, M_, D_] := N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(h * l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(M * N[(D * N[(0.5 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * 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]}, Block[{t$95$4 = N[(N[(h / l), $MachinePrecision] * N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-237], N[(t$95$2 * N[(1.0 - N[Power[N[(N[(t$95$1 * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e-282], N[Abs[N[(N[(-0.5 * N[(N[(h / l), $MachinePrecision] * N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(d / t$95$0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 1e+262], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 + N[(-0.5 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(h / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Abs[N[(N[(-0.5 * t$95$4 + 1.0), $MachinePrecision] / N[(t$95$0 / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(d * N[(d / N[(h * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]]]]
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\begin{array}{l}
t_0 := \sqrt{h \cdot \ell}\\
t_1 := M \cdot \left(D \cdot \frac{0.5}{d}\right)\\
t_2 := {\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\\
t_3 := t_2 \cdot \left(1 - \left(0.5 \cdot {\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)\\
t_4 := \frac{h}{\ell} \cdot {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-237}:\\
\;\;\;\;t_2 \cdot \left(1 - {\left(\left(t_1 \cdot \sqrt{0.5}\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}\right)\\

\mathbf{elif}\;t_3 \leq 4 \cdot 10^{-282}:\\
\;\;\;\;\left|\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot {t_1}^{2}, 1\right) \cdot \frac{d}{t_0}\right|\\

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

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\left|\frac{\mathsf{fma}\left(-0.5, t_4, 1\right)}{\frac{t_0}{d}}\right|\\

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


\end{array}

Error

Derivation

  1. Split input into 5 regimes
  2. if (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < -9.9999999999999999e-238

    1. Initial program 28.0

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

    if -9.9999999999999999e-238 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < 4.0000000000000001e-282

    1. Initial program 40.0

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

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

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

    if 4.0000000000000001e-282 < (*.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)))) < 1e262

    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. Simplified1.1

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)} \]
      Proof
      (*.f64 (*.f64 (sqrt.f64 (/.f64 d h)) (sqrt.f64 (/.f64 d l))) (-.f64 1 (*.f64 1/2 (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (Rewrite<= unpow1/2_binary64 (pow.f64 (/.f64 d h) 1/2)) (sqrt.f64 (/.f64 d l))) (-.f64 1 (*.f64 1/2 (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 0 points increase in error, 8 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (Rewrite<= metadata-eval (/.f64 1 2))) (sqrt.f64 (/.f64 d l))) (-.f64 1 (*.f64 1/2 (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 8 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (Rewrite<= unpow1/2_binary64 (pow.f64 (/.f64 d l) 1/2))) (-.f64 1 (*.f64 1/2 (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 0 points increase in error, 8 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (Rewrite<= metadata-eval (/.f64 1 2)))) (-.f64 1 (*.f64 1/2 (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 8 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (Rewrite<= metadata-eval (/.f64 1 2)) (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (/.f64 1 2) (*.f64 (pow.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 M D) (*.f64 2 d))) 2) (/.f64 h l))))): 0 points increase in error, 8 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l))))): 8 points increase in error, 0 points decrease in error
    3. Applied egg-rr1.3

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

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

    if 1e262 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l)))) < +inf.0

    1. Initial program 60.4

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

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

      \[\leadsto \color{blue}{\left|\mathsf{fma}\left(-0.5, {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2} \cdot \frac{h}{\ell}, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\right|} \]
    4. Applied egg-rr7.1

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

    if +inf.0 < (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l))))

    1. Initial program 64.0

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

      \[\leadsto \color{blue}{\left(\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)} \]
      Proof
      (*.f64 (*.f64 (sqrt.f64 (/.f64 d h)) (sqrt.f64 (/.f64 d l))) (-.f64 1 (*.f64 1/2 (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (Rewrite<= unpow1/2_binary64 (pow.f64 (/.f64 d h) 1/2)) (sqrt.f64 (/.f64 d l))) (-.f64 1 (*.f64 1/2 (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 0 points increase in error, 8 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (Rewrite<= metadata-eval (/.f64 1 2))) (sqrt.f64 (/.f64 d l))) (-.f64 1 (*.f64 1/2 (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 8 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (Rewrite<= unpow1/2_binary64 (pow.f64 (/.f64 d l) 1/2))) (-.f64 1 (*.f64 1/2 (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 0 points increase in error, 8 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (Rewrite<= metadata-eval (/.f64 1 2)))) (-.f64 1 (*.f64 1/2 (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 8 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (Rewrite<= metadata-eval (/.f64 1 2)) (*.f64 (pow.f64 (*.f64 (/.f64 M 2) (/.f64 D d)) 2) (/.f64 h l))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (*.f64 (/.f64 1 2) (*.f64 (pow.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 M D) (*.f64 2 d))) 2) (/.f64 h l))))): 0 points increase in error, 8 points decrease in error
      (*.f64 (*.f64 (pow.f64 (/.f64 d h) (/.f64 1 2)) (pow.f64 (/.f64 d l) (/.f64 1 2))) (-.f64 1 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (/.f64 1 2) (pow.f64 (/.f64 (*.f64 M D) (*.f64 2 d)) 2)) (/.f64 h l))))): 8 points increase in error, 0 points decrease in error
    3. Taylor expanded in d around inf 49.8

      \[\leadsto \color{blue}{\sqrt{\frac{1}{\ell \cdot h}} \cdot d} \]
    4. Simplified49.8

      \[\leadsto \color{blue}{d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}} \]
      Proof
      (*.f64 d (sqrt.f64 (/.f64 (/.f64 1 l) h))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (sqrt.f64 (Rewrite<= associate-/r*_binary64 (/.f64 1 (*.f64 l h))))): 0 points increase in error, 3 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (sqrt.f64 (/.f64 1 (*.f64 l h))) d)): 3 points increase in error, 0 points decrease in error
    5. Applied egg-rr53.7

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{d}{\sqrt{\ell \cdot h}}\right)} - 1} \]
    6. Simplified49.8

      \[\leadsto \color{blue}{\frac{d}{\sqrt{\ell \cdot h}}} \]
      Proof
      (/.f64 d (sqrt.f64 (*.f64 l h))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= expm1-log1p_binary64 (expm1.f64 (log1p.f64 (/.f64 d (sqrt.f64 (*.f64 l h)))))): 0 points increase in error, 3 points decrease in error
      (Rewrite<= expm1-def_binary64 (-.f64 (exp.f64 (log1p.f64 (/.f64 d (sqrt.f64 (*.f64 l h))))) 1)): 3 points increase in error, 0 points decrease in error
    7. Applied egg-rr52.8

      \[\leadsto \color{blue}{\sqrt{\frac{d \cdot d}{\ell \cdot h}}} \]
    8. Simplified50.0

      \[\leadsto \color{blue}{\sqrt{d \cdot \frac{d}{\ell \cdot h}}} \]
      Proof
      (sqrt.f64 (*.f64 d (/.f64 d (*.f64 l h)))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 d (*.f64 l h)) d))): 2 points increase in error, 1 points decrease in error
      (sqrt.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 d d) (*.f64 l h)))): 3 points increase in error, 0 points decrease in error
  3. Recombined 5 regimes into one program.
  4. Final simplification15.3

    \[\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^{-237}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - {\left(\left(\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right) \cdot \sqrt{0.5}\right) \cdot \sqrt{\frac{h}{\ell}}\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 4 \cdot 10^{-282}:\\ \;\;\;\;\left|\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}, 1\right) \cdot \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^{+262}:\\ \;\;\;\;\frac{\sqrt{\frac{d}{\ell}} \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\right)\right)}{\sqrt{\frac{h}{d}}}\\ \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 \infty:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}, 1\right)}{\frac{\sqrt{h \cdot \ell}}{d}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\ \end{array} \]

Alternatives

Alternative 1
Error16.5
Cost110608
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \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)\\ t_2 := \left|\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}, 1\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}\right|\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-237}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_0 \cdot \left(-0.125 \cdot \frac{M \cdot D}{\left(d \cdot \frac{\ell}{h}\right) \cdot \frac{d}{M \cdot D}}\right)\right)\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{-282}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+247}:\\ \;\;\;\;\frac{t_0 \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\right)\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\ \end{array} \]
Alternative 2
Error16.4
Cost110608
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \sqrt{h \cdot \ell}\\ t_2 := \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)\\ t_3 := \frac{h}{\ell} \cdot {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-237}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(t_0 \cdot \left(-0.125 \cdot \frac{M \cdot D}{\left(d \cdot \frac{\ell}{h}\right) \cdot \frac{d}{M \cdot D}}\right)\right)\\ \mathbf{elif}\;t_2 \leq 4 \cdot 10^{-282}:\\ \;\;\;\;\left|\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}, 1\right) \cdot \frac{d}{t_1}\right|\\ \mathbf{elif}\;t_2 \leq 10^{+262}:\\ \;\;\;\;\frac{t_0 \cdot \left(1 + -0.5 \cdot t_3\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(-0.5, t_3, 1\right)}{\frac{t_1}{d}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\ \end{array} \]
Alternative 3
Error15.2
Cost110608
\[\begin{array}{l} t_0 := M \cdot \left(0.5 \cdot \frac{D}{d}\right)\\ t_1 := \sqrt{\frac{d}{\ell}}\\ t_2 := \frac{h}{\ell} \cdot {t_0}^{2}\\ t_3 := \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)\\ t_4 := \sqrt{h \cdot \ell}\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{-237}:\\ \;\;\;\;\left(t_1 \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 + -0.5 \cdot {\left(\sqrt{\frac{h}{\ell}} \cdot t_0\right)}^{2}\right)\\ \mathbf{elif}\;t_3 \leq 4 \cdot 10^{-282}:\\ \;\;\;\;\left|\mathsf{fma}\left(-0.5, \frac{h}{\ell} \cdot {\left(M \cdot \left(D \cdot \frac{0.5}{d}\right)\right)}^{2}, 1\right) \cdot \frac{d}{t_4}\right|\\ \mathbf{elif}\;t_3 \leq 10^{+262}:\\ \;\;\;\;\frac{t_1 \cdot \left(1 + -0.5 \cdot t_2\right)}{\sqrt{\frac{h}{d}}}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\left|\frac{\mathsf{fma}\left(-0.5, t_2, 1\right)}{\frac{t_4}{d}}\right|\\ \mathbf{else}:\\ \;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}}\\ \end{array} \]
Alternative 4
Error21.2
Cost21132
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{h}}\\ t_1 := \sqrt{\frac{d}{\ell}}\\ \mathbf{if}\;d \leq -1.05 \cdot 10^{+64}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-39}:\\ \;\;\;\;t_0 \cdot \left(t_1 \cdot \mathsf{fma}\left(-0.125, \left(M \cdot \left(h \cdot M\right)\right) \cdot \left(\frac{D}{d \cdot d} \cdot \frac{D}{\ell}\right), 1\right)\right)\\ \mathbf{elif}\;d \leq 3.3 \cdot 10^{-306}:\\ \;\;\;\;\left(t_1 \cdot t_0\right) \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\\ \end{array} \]
Alternative 5
Error21.9
Cost21004
\[\begin{array}{l} t_0 := d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{if}\;d \leq -1.02 \cdot 10^{+64}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -8.5 \cdot 10^{-58}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \left(0.125 \cdot \frac{D}{\frac{\ell}{D}}\right) \cdot \left(\frac{h}{d} \cdot \frac{M \cdot M}{d}\right)\right)\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\\ \end{array} \]
Alternative 6
Error20.6
Cost21004
\[\begin{array}{l} \mathbf{if}\;h \leq -2.05 \cdot 10^{-104}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right)\\ \mathbf{elif}\;h \leq 4.2 \cdot 10^{-292}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;h \leq 1.15 \cdot 10^{+99}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \end{array} \]
Alternative 7
Error20.5
Cost21004
\[\begin{array}{l} t_0 := {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\\ \mathbf{if}\;h \leq -7.2 \cdot 10^{-100}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - 0.5 \cdot \frac{t_0}{\frac{\ell}{h}}\right)\\ \mathbf{elif}\;h \leq 4.2 \cdot 10^{-292}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;h \leq 1.9 \cdot 10^{+98}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}} \cdot \left(1 + t_0 \cdot \left(\frac{h}{\ell} \cdot -0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \end{array} \]
Alternative 8
Error22.4
Cost14920
\[\begin{array}{l} t_0 := d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{if}\;d \leq -1.3 \cdot 10^{+64}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -3.4 \cdot 10^{-71}:\\ \;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 + 0.5 \cdot \left(\left(\frac{M \cdot \left(M \cdot \left(D \cdot D\right)\right)}{\ell} \cdot \frac{\frac{h}{d}}{d}\right) \cdot -0.25\right)\right)\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \end{array} \]
Alternative 9
Error22.9
Cost14920
\[\begin{array}{l} t_0 := d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{if}\;d \leq -1.12 \cdot 10^{+64}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -6.5 \cdot 10^{-57}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - \left(0.125 \cdot \frac{D}{\frac{\ell}{D}}\right) \cdot \left(\frac{h}{d} \cdot \frac{M \cdot M}{d}\right)\right)\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \end{array} \]
Alternative 10
Error24.0
Cost14664
\[\begin{array}{l} t_0 := d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{if}\;d \leq -1.45 \cdot 10^{-9}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -3.4 \cdot 10^{-56}:\\ \;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(-0.125 \cdot \frac{h \cdot \left(M \cdot D\right)}{\ell \cdot \left(\frac{d}{M} \cdot \frac{d}{D}\right)}\right)\right)\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \end{array} \]
Alternative 11
Error22.6
Cost13580
\[\begin{array}{l} t_0 := d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{if}\;d \leq -3.4 \cdot 10^{+64}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -8.6 \cdot 10^{-99}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-310}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \end{array} \]
Alternative 12
Error23.9
Cost13316
\[\begin{array}{l} \mathbf{if}\;h \leq 4.2 \cdot 10^{-292}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \frac{{\ell}^{-0.5}}{\sqrt{h}}\\ \end{array} \]
Alternative 13
Error23.9
Cost13252
\[\begin{array}{l} \mathbf{if}\;h \leq 4.2 \cdot 10^{-292}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{\ell} \cdot \sqrt{h}}\\ \end{array} \]
Alternative 14
Error27.6
Cost7244
\[\begin{array}{l} t_0 := \sqrt{h \cdot \ell}\\ \mathbf{if}\;h \leq 4.2 \cdot 10^{-292}:\\ \;\;\;\;\frac{-d}{t_0}\\ \mathbf{elif}\;h \leq 3.6 \cdot 10^{+178}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{elif}\;h \leq 6.5 \cdot 10^{+261}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{t_0}\\ \end{array} \]
Alternative 15
Error27.6
Cost7244
\[\begin{array}{l} \mathbf{if}\;h \leq 4.2 \cdot 10^{-292}:\\ \;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\ \mathbf{elif}\;h \leq 1.3 \cdot 10^{+184}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \mathbf{elif}\;h \leq 1.8 \cdot 10^{+258}:\\ \;\;\;\;\sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h \cdot \ell}}\\ \end{array} \]
Alternative 16
Error27.7
Cost6916
\[\begin{array}{l} \mathbf{if}\;h \leq 4.2 \cdot 10^{-292}:\\ \;\;\;\;\frac{-d}{\sqrt{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot {\left(h \cdot \ell\right)}^{-0.5}\\ \end{array} \]
Alternative 17
Error43.4
Cost6784
\[d \cdot {\left(h \cdot \ell\right)}^{-0.5} \]
Alternative 18
Error43.4
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce

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