Average Error: 26.5 → 18.6
Time: 1.0min
Precision: binary64
Cost: 40792
\[\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{\frac{d}{\ell}}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_2 := 1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\frac{M \cdot 0.5}{\frac{d}{D}} \cdot \sqrt{0.5}\right)\right)}^{2}\\ t_3 := \sqrt{-d}\\ t_4 := \frac{t_3}{\sqrt{-h}} \cdot t_0\\ \mathbf{if}\;h \leq -1 \cdot 10^{+136}:\\ \;\;\;\;t_4 \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}\;h \leq -1 \cdot 10^{-55}:\\ \;\;\;\;\left(t_1 \cdot \frac{t_3}{\sqrt{-\ell}}\right) \cdot t_2\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-235}:\\ \;\;\;\;t_4 \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right)\\ \mathbf{elif}\;h \leq 10^{-305}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;h \leq 10^{-40}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(t_0 \cdot \mathsf{fma}\left({\left(\frac{\frac{D}{d}}{\frac{2}{M}}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\right)\\ \mathbf{elif}\;h \leq 10^{+160}:\\ \;\;\;\;t_2 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{\sqrt{d \cdot \frac{d}{h}}}{\sqrt{\ell}} \cdot \left(1 + \frac{h \cdot \left(-0.5 \cdot {\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2}\right)}{\ell}\right)}\right)}^{3}\\ \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 l)))
        (t_1 (pow (/ d h) 0.5))
        (t_2
         (-
          1.0
          (pow (* (sqrt (/ h l)) (* (/ (* M 0.5) (/ d D)) (sqrt 0.5))) 2.0)))
        (t_3 (sqrt (- d)))
        (t_4 (* (/ t_3 (sqrt (- h))) t_0)))
   (if (<= h -1e+136)
     (* t_4 (- 1.0 (/ (* (pow (* (/ M 2.0) (/ D d)) 2.0) (* h 0.5)) l)))
     (if (<= h -1e-55)
       (* (* t_1 (/ t_3 (sqrt (- l)))) t_2)
       (if (<= h -1e-235)
         (* t_4 (+ 1.0 (* (/ h l) (* (pow (/ (* M D) (* d 2.0)) 2.0) -0.5))))
         (if (<= h 1e-305)
           (* (- d) (sqrt (/ 1.0 (* h l))))
           (if (<= h 1e-40)
             (*
              (/ (sqrt d) (sqrt h))
              (*
               t_0
               (fma (pow (/ (/ D d) (/ 2.0 M)) 2.0) (* (/ h l) -0.5) 1.0)))
             (if (<= h 1e+160)
               (* t_2 (* t_1 (/ (sqrt d) (sqrt l))))
               (pow
                (cbrt
                 (*
                  (/ (sqrt (* d (/ d h))) (sqrt l))
                  (+
                   1.0
                   (/ (* h (* -0.5 (pow (* 0.5 (/ (* M D) d)) 2.0))) l))))
                3.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 = sqrt((d / l));
	double t_1 = pow((d / h), 0.5);
	double t_2 = 1.0 - pow((sqrt((h / l)) * (((M * 0.5) / (d / D)) * sqrt(0.5))), 2.0);
	double t_3 = sqrt(-d);
	double t_4 = (t_3 / sqrt(-h)) * t_0;
	double tmp;
	if (h <= -1e+136) {
		tmp = t_4 * (1.0 - ((pow(((M / 2.0) * (D / d)), 2.0) * (h * 0.5)) / l));
	} else if (h <= -1e-55) {
		tmp = (t_1 * (t_3 / sqrt(-l))) * t_2;
	} else if (h <= -1e-235) {
		tmp = t_4 * (1.0 + ((h / l) * (pow(((M * D) / (d * 2.0)), 2.0) * -0.5)));
	} else if (h <= 1e-305) {
		tmp = -d * sqrt((1.0 / (h * l)));
	} else if (h <= 1e-40) {
		tmp = (sqrt(d) / sqrt(h)) * (t_0 * fma(pow(((D / d) / (2.0 / M)), 2.0), ((h / l) * -0.5), 1.0));
	} else if (h <= 1e+160) {
		tmp = t_2 * (t_1 * (sqrt(d) / sqrt(l)));
	} else {
		tmp = pow(cbrt(((sqrt((d * (d / h))) / sqrt(l)) * (1.0 + ((h * (-0.5 * pow((0.5 * ((M * D) / d)), 2.0))) / l)))), 3.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 = sqrt(Float64(d / l))
	t_1 = Float64(d / h) ^ 0.5
	t_2 = Float64(1.0 - (Float64(sqrt(Float64(h / l)) * Float64(Float64(Float64(M * 0.5) / Float64(d / D)) * sqrt(0.5))) ^ 2.0))
	t_3 = sqrt(Float64(-d))
	t_4 = Float64(Float64(t_3 / sqrt(Float64(-h))) * t_0)
	tmp = 0.0
	if (h <= -1e+136)
		tmp = Float64(t_4 * Float64(1.0 - Float64(Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(h * 0.5)) / l)));
	elseif (h <= -1e-55)
		tmp = Float64(Float64(t_1 * Float64(t_3 / sqrt(Float64(-l)))) * t_2);
	elseif (h <= -1e-235)
		tmp = Float64(t_4 * Float64(1.0 + Float64(Float64(h / l) * Float64((Float64(Float64(M * D) / Float64(d * 2.0)) ^ 2.0) * -0.5))));
	elseif (h <= 1e-305)
		tmp = Float64(Float64(-d) * sqrt(Float64(1.0 / Float64(h * l))));
	elseif (h <= 1e-40)
		tmp = Float64(Float64(sqrt(d) / sqrt(h)) * Float64(t_0 * fma((Float64(Float64(D / d) / Float64(2.0 / M)) ^ 2.0), Float64(Float64(h / l) * -0.5), 1.0)));
	elseif (h <= 1e+160)
		tmp = Float64(t_2 * Float64(t_1 * Float64(sqrt(d) / sqrt(l))));
	else
		tmp = cbrt(Float64(Float64(sqrt(Float64(d * Float64(d / h))) / sqrt(l)) * Float64(1.0 + Float64(Float64(h * Float64(-0.5 * (Float64(0.5 * Float64(Float64(M * D) / d)) ^ 2.0))) / l)))) ^ 3.0;
	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[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(d / h), $MachinePrecision], 0.5], $MachinePrecision]}, Block[{t$95$2 = N[(1.0 - N[Power[N[(N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(M * 0.5), $MachinePrecision] / N[(d / D), $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[(-d)], $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]}, If[LessEqual[h, -1e+136], N[(t$95$4 * N[(1.0 - N[(N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, -1e-55], N[(N[(t$95$1 * N[(t$95$3 / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], If[LessEqual[h, -1e-235], N[(t$95$4 * N[(1.0 + N[(N[(h / l), $MachinePrecision] * N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(d * 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 1e-305], N[((-d) * N[Sqrt[N[(1.0 / N[(h * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 1e-40], N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(N[Power[N[(N[(D / d), $MachinePrecision] / N[(2.0 / M), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(h / l), $MachinePrecision] * -0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 1e+160], N[(t$95$2 * N[(t$95$1 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[Power[N[(N[(N[Sqrt[N[(d * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sqrt[l], $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[(N[(h * N[(-0.5 * N[Power[N[(0.5 * N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $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{\frac{d}{\ell}}\\
t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\
t_2 := 1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\frac{M \cdot 0.5}{\frac{d}{D}} \cdot \sqrt{0.5}\right)\right)}^{2}\\
t_3 := \sqrt{-d}\\
t_4 := \frac{t_3}{\sqrt{-h}} \cdot t_0\\
\mathbf{if}\;h \leq -1 \cdot 10^{+136}:\\
\;\;\;\;t_4 \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}\;h \leq -1 \cdot 10^{-55}:\\
\;\;\;\;\left(t_1 \cdot \frac{t_3}{\sqrt{-\ell}}\right) \cdot t_2\\

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

\mathbf{elif}\;h \leq 10^{-305}:\\
\;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\

\mathbf{elif}\;h \leq 10^{-40}:\\
\;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(t_0 \cdot \mathsf{fma}\left({\left(\frac{\frac{D}{d}}{\frac{2}{M}}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{\frac{\sqrt{d \cdot \frac{d}{h}}}{\sqrt{\ell}} \cdot \left(1 + \frac{h \cdot \left(-0.5 \cdot {\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2}\right)}{\ell}\right)}\right)}^{3}\\


\end{array}

Error

Derivation

  1. Split input into 7 regimes
  2. if h < -1.00000000000000006e136

    1. Initial program 30.6

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

      \[\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 \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    3. Applied egg-rr27.6

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

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

    if -1.00000000000000006e136 < h < -9.99999999999999995e-56

    1. Initial program 18.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. Applied egg-rr17.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(\frac{M}{2} \cdot \frac{D}{d}\right) \cdot \sqrt{0.5}\right)\right)}^{2}}\right) \]
    3. Applied egg-rr17.2

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

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

    if -9.99999999999999995e-56 < h < -9.9999999999999996e-236

    1. Initial program 28.6

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

      \[\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 \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    3. Applied egg-rr18.2

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

    if -9.9999999999999996e-236 < h < 9.99999999999999996e-306

    1. Initial program 39.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-rr35.1

      \[\leadsto \left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot \color{blue}{\frac{\sqrt{-d}}{\sqrt{-\ell}}}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right) \]
    3. Taylor expanded in d around -inf 26.2

      \[\leadsto \color{blue}{-1 \cdot \left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right)} \]
    4. Simplified26.2

      \[\leadsto \color{blue}{\sqrt{\frac{1}{h \cdot \ell}} \cdot \left(-d\right)} \]
      Proof
      (*.f64 (sqrt.f64 (/.f64 1 (*.f64 h l))) (neg.f64 d)): 0 points increase in error, 0 points decrease in error
      (*.f64 (sqrt.f64 (/.f64 1 (Rewrite<= *-commutative_binary64 (*.f64 l h)))) (neg.f64 d)): 0 points increase in error, 0 points decrease in error
      (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 (sqrt.f64 (/.f64 1 (*.f64 l h))) d))): 0 points increase in error, 0 points decrease in error
      (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 d (sqrt.f64 (/.f64 1 (*.f64 l h)))))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (*.f64 d (sqrt.f64 (/.f64 1 (*.f64 l h)))))): 0 points increase in error, 0 points decrease in error

    if 9.99999999999999996e-306 < h < 9.9999999999999993e-41

    1. Initial program 28.6

      \[\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. Simplified29.5

      \[\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))): 0 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 (/.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))))): 7 points increase in error, 6 points decrease in error
    3. Applied egg-rr17.4

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

    if 9.9999999999999993e-41 < h < 1.00000000000000001e160

    1. Initial program 20.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-rr19.3

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

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

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

    if 1.00000000000000001e160 < h

    1. Initial program 29.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-rr38.2

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;h \leq -1 \cdot 10^{+136}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-55}:\\ \;\;\;\;\left({\left(\frac{d}{h}\right)}^{0.5} \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right) \cdot \left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\frac{M \cdot 0.5}{\frac{d}{D}} \cdot \sqrt{0.5}\right)\right)}^{2}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-235}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right)\\ \mathbf{elif}\;h \leq 10^{-305}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;h \leq 10^{-40}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{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{elif}\;h \leq 10^{+160}:\\ \;\;\;\;\left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\frac{M \cdot 0.5}{\frac{d}{D}} \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}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{\sqrt{d \cdot \frac{d}{h}}}{\sqrt{\ell}} \cdot \left(1 + \frac{h \cdot \left(-0.5 \cdot {\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2}\right)}{\ell}\right)}\right)}^{3}\\ \end{array} \]

Alternatives

Alternative 1
Error18.8
Cost40792
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_2 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_3 := \sqrt{-d}\\ t_4 := \frac{t_3}{\sqrt{-h}} \cdot t_0\\ \mathbf{if}\;h \leq -1 \cdot 10^{+140}:\\ \;\;\;\;t_4 \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}\;h \leq -1 \cdot 10^{-55}:\\ \;\;\;\;\left(t_1 \cdot \frac{t_3}{\sqrt{-\ell}}\right) \cdot t_2\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-235}:\\ \;\;\;\;t_4 \cdot t_2\\ \mathbf{elif}\;h \leq 10^{-305}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;h \leq 10^{-40}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(t_0 \cdot \mathsf{fma}\left({\left(\frac{\frac{D}{d}}{\frac{2}{M}}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\right)\\ \mathbf{elif}\;h \leq 10^{+160}:\\ \;\;\;\;\left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\frac{M \cdot 0.5}{\frac{d}{D}} \cdot \sqrt{0.5}\right)\right)}^{2}\right) \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{\sqrt{d \cdot \frac{d}{h}}}{\sqrt{\ell}} \cdot \left(1 + \frac{h \cdot \left(-0.5 \cdot {\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2}\right)}{\ell}\right)}\right)}^{3}\\ \end{array} \]
Alternative 2
Error19.1
Cost34392
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_2 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_3 := \sqrt{-d}\\ t_4 := \frac{t_3}{\sqrt{-h}} \cdot t_0\\ \mathbf{if}\;h \leq -1 \cdot 10^{+140}:\\ \;\;\;\;t_4 \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}\;h \leq -1 \cdot 10^{-55}:\\ \;\;\;\;\left(t_1 \cdot \frac{t_3}{\sqrt{-\ell}}\right) \cdot t_2\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-235}:\\ \;\;\;\;t_4 \cdot t_2\\ \mathbf{elif}\;h \leq 10^{-305}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;h \leq 10^{-20}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(t_0 \cdot \mathsf{fma}\left({\left(\frac{\frac{D}{d}}{\frac{2}{M}}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\right)\\ \mathbf{elif}\;h \leq 10^{+160}:\\ \;\;\;\;t_2 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{\sqrt{d \cdot \frac{d}{h}}}{\sqrt{\ell}} \cdot \left(1 + \frac{h \cdot \left(-0.5 \cdot {\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2}\right)}{\ell}\right)}\right)}^{3}\\ \end{array} \]
Alternative 3
Error19.0
Cost34200
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \frac{\sqrt{d}}{\sqrt{h}} \cdot \left(t_0 \cdot \mathsf{fma}\left({\left(\frac{\frac{D}{d}}{\frac{2}{M}}\right)}^{2}, \frac{h}{\ell} \cdot -0.5, 1\right)\right)\\ t_2 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_3 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_4 := \sqrt{-d}\\ t_5 := \frac{t_4}{\sqrt{-h}} \cdot t_0\\ \mathbf{if}\;h \leq -1 \cdot 10^{+140}:\\ \;\;\;\;t_5 \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}\;h \leq -1 \cdot 10^{-55}:\\ \;\;\;\;\left(t_2 \cdot \frac{t_4}{\sqrt{-\ell}}\right) \cdot t_3\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-235}:\\ \;\;\;\;t_5 \cdot t_3\\ \mathbf{elif}\;h \leq 10^{-305}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;h \leq 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;h \leq 10^{+150}:\\ \;\;\;\;t_3 \cdot \left(t_2 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 4
Error18.7
Cost34200
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_2 := \sqrt{-d}\\ \mathbf{if}\;d \leq -1 \cdot 10^{+23}:\\ \;\;\;\;\left(\frac{t_2}{\sqrt{-h}} \cdot t_0\right) \cdot \left(1 - \frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq -1 \cdot 10^{-100}:\\ \;\;\;\;\left(t_1 \cdot {\left(\frac{d}{\ell}\right)}^{0.5}\right) \cdot \left(1 - {\left(\sqrt{\frac{h}{\ell}} \cdot \left(\sqrt{0.5} \cdot \frac{M \cdot \left(D \cdot 0.5\right)}{d}\right)\right)}^{2}\right)\\ \mathbf{elif}\;d \leq -3.4 \cdot 10^{-300}:\\ \;\;\;\;\left(t_1 \cdot \frac{t_2}{\sqrt{-\ell}}\right) \cdot \left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right)\\ \mathbf{elif}\;d \leq 7 \cdot 10^{-258}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{h}}, -d, \left(\sqrt{h} \cdot \left(\left(M \cdot M\right) \cdot \left(D \cdot \frac{D}{d}\right)\right)\right) \cdot \frac{-0.125}{\ell}\right)}{\sqrt{\ell}}\\ \mathbf{elif}\;d \leq 6.2 \cdot 10^{-180}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 + \frac{\frac{-0.125}{\frac{d}{{\left(M \cdot D\right)}^{2}}}}{\ell \cdot \frac{d}{h}}\right)}\right)}^{3}\\ \mathbf{elif}\;d \leq 6 \cdot 10^{+228}:\\ \;\;\;\;\frac{\sqrt{d}}{\sqrt{h}} \cdot \left(t_0 \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}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 5
Error18.8
Cost27992
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := {\left(\frac{d}{h}\right)}^{0.5}\\ t_2 := {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)\\ t_3 := 1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\\ t_4 := \sqrt{-d}\\ t_5 := \frac{t_4}{\sqrt{-h}} \cdot t_0\\ \mathbf{if}\;h \leq -1 \cdot 10^{+140}:\\ \;\;\;\;t_5 \cdot \left(1 - \frac{t_2}{\ell}\right)\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-55}:\\ \;\;\;\;\left(t_1 \cdot \frac{t_4}{\sqrt{-\ell}}\right) \cdot t_3\\ \mathbf{elif}\;h \leq -1 \cdot 10^{-235}:\\ \;\;\;\;t_5 \cdot t_3\\ \mathbf{elif}\;h \leq 10^{-305}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;h \leq 10^{-110}:\\ \;\;\;\;t_3 \cdot \left({\left(\frac{d}{\ell}\right)}^{0.5} \cdot \left(\sqrt{d} \cdot \sqrt{\frac{1}{h}}\right)\right)\\ \mathbf{elif}\;h \leq 1.46 \cdot 10^{+147}:\\ \;\;\;\;t_3 \cdot \left(t_1 \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot t_1\right) \cdot \left(1 - \frac{1}{\frac{\ell}{t_2}}\right)\\ \end{array} \]
Alternative 6
Error19.4
Cost27732
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)\\ \mathbf{if}\;d \leq -3.4 \cdot 10^{-300}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot t_0\right) \cdot \left(1 - \frac{t_1}{\ell}\right)\\ \mathbf{elif}\;d \leq 10^{-90}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;d \leq 10^{-8}:\\ \;\;\;\;\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 6.4 \cdot 10^{+64}:\\ \;\;\;\;\left(t_0 \cdot {\left(\frac{d}{h}\right)}^{0.5}\right) \cdot \left(1 - \frac{1}{\frac{\ell}{t_1}}\right)\\ \mathbf{elif}\;d \leq 5.2 \cdot 10^{+161}:\\ \;\;\;\;{\left(\sqrt[3]{\left(1 + \frac{h \cdot \left(-0.5 \cdot {\left(0.5 \cdot \frac{M \cdot D}{d}\right)}^{2}\right)}{\ell}\right) \cdot \frac{d}{\sqrt{h \cdot \ell}}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 7
Error18.1
Cost27596
\[\begin{array}{l} \mathbf{if}\;d \leq -3.4 \cdot 10^{-300}:\\ \;\;\;\;\left(\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right)\\ \mathbf{elif}\;d \leq 10^{-259}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\frac{1}{h}}, -d, \left(\sqrt{h} \cdot \left(\left(M \cdot M\right) \cdot \left(D \cdot \frac{D}{d}\right)\right)\right) \cdot \frac{-0.125}{\ell}\right)}{\sqrt{\ell}}\\ \mathbf{elif}\;d \leq 200:\\ \;\;\;\;\left(1 + \frac{h}{\ell} \cdot \left({\left(\frac{M \cdot D}{d \cdot 2}\right)}^{2} \cdot -0.5\right)\right) \cdot \left({\left(\frac{d}{h}\right)}^{0.5} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 8
Error20.8
Cost27468
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2}\\ t_2 := t_1 \cdot \left(h \cdot 0.5\right)\\ \mathbf{if}\;d \leq -5 \cdot 10^{+132}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq 3.4 \cdot 10^{-276}:\\ \;\;\;\;\left(1 - \frac{t_2}{\ell}\right) \cdot \left(t_0 \cdot \sqrt{\frac{d}{h}}\right)\\ \mathbf{elif}\;d \leq 6.2 \cdot 10^{-180}:\\ \;\;\;\;{\left(\sqrt[3]{\frac{d}{\sqrt{h \cdot \ell}} \cdot \left(1 + \frac{h}{\ell} \cdot \left(t_1 \cdot -0.5\right)\right)}\right)}^{3}\\ \mathbf{elif}\;d \leq 10^{+30}:\\ \;\;\;\;\left(t_0 \cdot {\left(\frac{d}{h}\right)}^{0.5}\right) \cdot \left(1 - \frac{1}{\frac{\ell}{t_2}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 9
Error20.6
Cost21456
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)\\ \mathbf{if}\;d \leq -5 \cdot 10^{+132}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq 3.4 \cdot 10^{-276}:\\ \;\;\;\;\left(1 - \frac{t_1}{\ell}\right) \cdot \left(t_0 \cdot \sqrt{\frac{d}{h}}\right)\\ \mathbf{elif}\;d \leq 10^{-90}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;d \leq 10^{+30}:\\ \;\;\;\;\left(t_0 \cdot {\left(\frac{d}{h}\right)}^{0.5}\right) \cdot \left(1 - \frac{1}{\frac{\ell}{t_1}}\right)\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 10
Error20.6
Cost21264
\[\begin{array}{l} t_0 := \left(1 - \frac{{\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell}\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)\\ \mathbf{if}\;d \leq -5 \cdot 10^{+132}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{elif}\;d \leq 3.4 \cdot 10^{-276}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq 10^{-90}:\\ \;\;\;\;\frac{1}{\sqrt{\ell}} \cdot \frac{d}{\sqrt{h}}\\ \mathbf{elif}\;d \leq 10^{+30}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 11
Error23.5
Cost14796
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{if}\;d \leq -5 \cdot 10^{+132}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq -1.6 \cdot 10^{-59}:\\ \;\;\;\;t_0 \cdot t_1\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-125}:\\ \;\;\;\;t_1 \cdot \left(t_0 \cdot \left(\frac{-0.125}{d} \cdot \left(\frac{D}{\frac{\ell}{M}} \cdot \frac{D \cdot \left(h \cdot M\right)}{d}\right)\right)\right)\\ \mathbf{elif}\;d \leq 3.3 \cdot 10^{-276}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 12
Error23.6
Cost14796
\[\begin{array}{l} t_0 := \sqrt{\frac{d}{\ell}}\\ t_1 := \sqrt{\frac{d}{h}}\\ t_2 := \left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{if}\;d \leq -5 \cdot 10^{+132}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;d \leq -1.6 \cdot 10^{-59}:\\ \;\;\;\;t_0 \cdot t_1\\ \mathbf{elif}\;d \leq -4 \cdot 10^{-125}:\\ \;\;\;\;t_1 \cdot \left(t_0 \cdot \left(\left(D \cdot \frac{\left(M \cdot D\right) \cdot \left(h \cdot M\right)}{d \cdot \ell}\right) \cdot \frac{-0.125}{d}\right)\right)\\ \mathbf{elif}\;d \leq 3.3 \cdot 10^{-276}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 13
Error22.3
Cost13512
\[\begin{array}{l} \mathbf{if}\;h \leq -1 \cdot 10^{+84}:\\ \;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\ \mathbf{elif}\;h \leq 10^{-305}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 14
Error23.6
Cost13380
\[\begin{array}{l} \mathbf{if}\;\ell \leq 4 \cdot 10^{-273}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \left({\ell}^{-0.5} \cdot {h}^{-0.5}\right)\\ \end{array} \]
Alternative 15
Error23.6
Cost13252
\[\begin{array}{l} \mathbf{if}\;\ell \leq 4 \cdot 10^{-273}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}}\\ \end{array} \]
Alternative 16
Error27.2
Cost7044
\[\begin{array}{l} \mathbf{if}\;\ell \leq 4 \cdot 10^{-273}:\\ \;\;\;\;\left(-d\right) \cdot \sqrt{\frac{1}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \end{array} \]
Alternative 17
Error36.7
Cost6980
\[\begin{array}{l} \mathbf{if}\;d \leq 7.4 \cdot 10^{-271}:\\ \;\;\;\;\sqrt{\frac{d \cdot d}{h \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\ \end{array} \]
Alternative 18
Error43.2
Cost6848
\[d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}} \]
Alternative 19
Error43.3
Cost6784
\[d \cdot {\left(h \cdot \ell\right)}^{-0.5} \]
Alternative 20
Error43.3
Cost6720
\[\frac{d}{\sqrt{h \cdot \ell}} \]

Error

Reproduce

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