
(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)))))
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)));
}
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
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)));
}
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)))
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 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
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]
\begin{array}{l}
\\
\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)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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)))))
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)));
}
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
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)));
}
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)))
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 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
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]
\begin{array}{l}
\\
\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)
\end{array}
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* d (pow (* l h) -0.5))))
(if (<= l -2.7e+230)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(- 1.0 (* 0.5 (* (/ 0.25 l) (* (/ D (/ d D)) (* h (* M (/ M d)))))))))
(if (<= l -2e-310)
(* t_0 (- -1.0 (* -0.5 (* (/ h l) (pow (* D (/ (/ M d) 2.0)) 2.0)))))
(if (<= l 4.5e+149)
(* (+ 1.0 (* -0.5 (/ (* h (pow (* D (* 0.5 (/ M d))) 2.0)) l))) t_0)
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = d * pow((l * h), -0.5);
double tmp;
if (l <= -2.7e+230) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (0.5 * ((0.25 / l) * ((D / (d / D)) * (h * (M * (M / d))))))));
} else if (l <= -2e-310) {
tmp = t_0 * (-1.0 - (-0.5 * ((h / l) * pow((D * ((M / d) / 2.0)), 2.0))));
} else if (l <= 4.5e+149) {
tmp = (1.0 + (-0.5 * ((h * pow((D * (0.5 * (M / d))), 2.0)) / l))) * t_0;
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = d * ((l * h) ** (-0.5d0))
if (l <= (-2.7d+230)) then
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0d0 - (0.5d0 * ((0.25d0 / l) * ((d_1 / (d / d_1)) * (h * (m * (m / d))))))))
else if (l <= (-2d-310)) then
tmp = t_0 * ((-1.0d0) - ((-0.5d0) * ((h / l) * ((d_1 * ((m / d) / 2.0d0)) ** 2.0d0))))
else if (l <= 4.5d+149) then
tmp = (1.0d0 + ((-0.5d0) * ((h * ((d_1 * (0.5d0 * (m / d))) ** 2.0d0)) / l))) * t_0
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = d * Math.pow((l * h), -0.5);
double tmp;
if (l <= -2.7e+230) {
tmp = Math.sqrt((d / h)) * (Math.sqrt((d / l)) * (1.0 - (0.5 * ((0.25 / l) * ((D / (d / D)) * (h * (M * (M / d))))))));
} else if (l <= -2e-310) {
tmp = t_0 * (-1.0 - (-0.5 * ((h / l) * Math.pow((D * ((M / d) / 2.0)), 2.0))));
} else if (l <= 4.5e+149) {
tmp = (1.0 + (-0.5 * ((h * Math.pow((D * (0.5 * (M / d))), 2.0)) / l))) * t_0;
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = d * math.pow((l * h), -0.5) tmp = 0 if l <= -2.7e+230: tmp = math.sqrt((d / h)) * (math.sqrt((d / l)) * (1.0 - (0.5 * ((0.25 / l) * ((D / (d / D)) * (h * (M * (M / d)))))))) elif l <= -2e-310: tmp = t_0 * (-1.0 - (-0.5 * ((h / l) * math.pow((D * ((M / d) / 2.0)), 2.0)))) elif l <= 4.5e+149: tmp = (1.0 + (-0.5 * ((h * math.pow((D * (0.5 * (M / d))), 2.0)) / l))) * t_0 else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) t_0 = Float64(d * (Float64(l * h) ^ -0.5)) tmp = 0.0 if (l <= -2.7e+230) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(0.5 * Float64(Float64(0.25 / l) * Float64(Float64(D / Float64(d / D)) * Float64(h * Float64(M * Float64(M / d))))))))); elseif (l <= -2e-310) tmp = Float64(t_0 * Float64(-1.0 - Float64(-0.5 * Float64(Float64(h / l) * (Float64(D * Float64(Float64(M / d) / 2.0)) ^ 2.0))))); elseif (l <= 4.5e+149) tmp = Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(h * (Float64(D * Float64(0.5 * Float64(M / d))) ^ 2.0)) / l))) * t_0); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = d * ((l * h) ^ -0.5); tmp = 0.0; if (l <= -2.7e+230) tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (0.5 * ((0.25 / l) * ((D / (d / D)) * (h * (M * (M / d)))))))); elseif (l <= -2e-310) tmp = t_0 * (-1.0 - (-0.5 * ((h / l) * ((D * ((M / d) / 2.0)) ^ 2.0)))); elseif (l <= 4.5e+149) tmp = (1.0 + (-0.5 * ((h * ((D * (0.5 * (M / d))) ^ 2.0)) / l))) * t_0; else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d * N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2.7e+230], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.5 * N[(N[(0.25 / l), $MachinePrecision] * N[(N[(D / N[(d / D), $MachinePrecision]), $MachinePrecision] * N[(h * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -2e-310], N[(t$95$0 * N[(-1.0 - N[(-0.5 * N[(N[(h / l), $MachinePrecision] * N[Power[N[(D * N[(N[(M / d), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.5e+149], N[(N[(1.0 + N[(-0.5 * N[(N[(h * N[Power[N[(D * N[(0.5 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := d \cdot {\left(\ell \cdot h\right)}^{-0.5}\\
\mathbf{if}\;\ell \leq -2.7 \cdot 10^{+230}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left(\frac{0.25}{\ell} \cdot \left(\frac{D}{\frac{d}{D}} \cdot \left(h \cdot \left(M \cdot \frac{M}{d}\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_0 \cdot \left(-1 - -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(D \cdot \frac{\frac{M}{d}}{2}\right)}^{2}\right)\right)\\
\mathbf{elif}\;\ell \leq 4.5 \cdot 10^{+149}:\\
\;\;\;\;\left(1 + -0.5 \cdot \frac{h \cdot {\left(D \cdot \left(0.5 \cdot \frac{M}{d}\right)\right)}^{2}}{\ell}\right) \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -2.70000000000000003e230Initial program 56.4%
associate-*l*56.4%
metadata-eval56.4%
unpow1/256.4%
metadata-eval56.4%
unpow1/256.4%
associate-*l*56.4%
metadata-eval56.4%
times-frac60.9%
Simplified60.9%
associate-*r/61.4%
frac-times61.4%
*-commutative61.4%
*-commutative61.4%
associate-*r/61.4%
associate-/r*61.4%
Applied egg-rr61.4%
Taylor expanded in D around 0 26.0%
associate-*r/26.0%
times-frac25.8%
unpow225.8%
times-frac41.5%
unpow241.5%
associate-/l*41.5%
unpow241.5%
associate-*r*46.5%
*-commutative46.5%
associate-*r/56.5%
*-commutative56.5%
associate-*l*61.4%
Simplified61.4%
if -2.70000000000000003e230 < l < -1.999999999999994e-310Initial program 63.9%
Applied egg-rr24.3%
expm1-def31.4%
expm1-log1p56.0%
cancel-sign-sub-inv56.0%
metadata-eval56.0%
Simplified56.0%
Taylor expanded in d around -inf 75.1%
associate-*r*75.1%
mul-1-neg75.1%
*-commutative75.1%
unpow-175.1%
sqr-pow75.1%
rem-sqrt-square75.1%
metadata-eval75.1%
sqr-pow75.1%
fabs-sqr75.1%
sqr-pow75.1%
Simplified75.1%
if -1.999999999999994e-310 < l < 4.49999999999999982e149Initial program 69.3%
Applied egg-rr25.5%
expm1-def31.1%
expm1-log1p57.8%
cancel-sign-sub-inv57.8%
metadata-eval57.8%
Simplified57.8%
Taylor expanded in d around 0 79.3%
*-commutative79.3%
*-commutative79.3%
unpow-179.3%
sqr-pow79.3%
rem-sqrt-square79.3%
metadata-eval79.3%
sqr-pow79.1%
fabs-sqr79.1%
sqr-pow79.3%
Simplified79.3%
associate-*l/84.6%
*-commutative84.6%
div-inv84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if 4.49999999999999982e149 < l Initial program 47.2%
Taylor expanded in d around inf 57.2%
*-un-lft-identity57.2%
*-commutative57.2%
Applied egg-rr57.2%
*-lft-identity57.2%
*-commutative57.2%
associate-/r*59.2%
Simplified59.2%
sqrt-div68.1%
Applied egg-rr68.1%
Final simplification76.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* -0.5 (* (/ h l) (pow (* D (/ (/ M d) 2.0)) 2.0)))))
(if (<= l -4.6e+232)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(- 1.0 (* 0.5 (* (/ 0.25 l) (* (/ D (/ d D)) (* h (* M (/ M d)))))))))
(if (<= l -2e-310)
(* (* d (pow (* l h) -0.5)) (- -1.0 t_0))
(* (+ 1.0 t_0) (* d (* (pow h -0.5) (pow l -0.5))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = -0.5 * ((h / l) * pow((D * ((M / d) / 2.0)), 2.0));
double tmp;
if (l <= -4.6e+232) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (0.5 * ((0.25 / l) * ((D / (d / D)) * (h * (M * (M / d))))))));
} else if (l <= -2e-310) {
tmp = (d * pow((l * h), -0.5)) * (-1.0 - t_0);
} else {
tmp = (1.0 + t_0) * (d * (pow(h, -0.5) * pow(l, -0.5)));
}
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
real(8) :: t_0
real(8) :: tmp
t_0 = (-0.5d0) * ((h / l) * ((d_1 * ((m / d) / 2.0d0)) ** 2.0d0))
if (l <= (-4.6d+232)) then
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0d0 - (0.5d0 * ((0.25d0 / l) * ((d_1 / (d / d_1)) * (h * (m * (m / d))))))))
else if (l <= (-2d-310)) then
tmp = (d * ((l * h) ** (-0.5d0))) * ((-1.0d0) - t_0)
else
tmp = (1.0d0 + t_0) * (d * ((h ** (-0.5d0)) * (l ** (-0.5d0))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = -0.5 * ((h / l) * Math.pow((D * ((M / d) / 2.0)), 2.0));
double tmp;
if (l <= -4.6e+232) {
tmp = Math.sqrt((d / h)) * (Math.sqrt((d / l)) * (1.0 - (0.5 * ((0.25 / l) * ((D / (d / D)) * (h * (M * (M / d))))))));
} else if (l <= -2e-310) {
tmp = (d * Math.pow((l * h), -0.5)) * (-1.0 - t_0);
} else {
tmp = (1.0 + t_0) * (d * (Math.pow(h, -0.5) * Math.pow(l, -0.5)));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = -0.5 * ((h / l) * math.pow((D * ((M / d) / 2.0)), 2.0)) tmp = 0 if l <= -4.6e+232: tmp = math.sqrt((d / h)) * (math.sqrt((d / l)) * (1.0 - (0.5 * ((0.25 / l) * ((D / (d / D)) * (h * (M * (M / d)))))))) elif l <= -2e-310: tmp = (d * math.pow((l * h), -0.5)) * (-1.0 - t_0) else: tmp = (1.0 + t_0) * (d * (math.pow(h, -0.5) * math.pow(l, -0.5))) return tmp
function code(d, h, l, M, D) t_0 = Float64(-0.5 * Float64(Float64(h / l) * (Float64(D * Float64(Float64(M / d) / 2.0)) ^ 2.0))) tmp = 0.0 if (l <= -4.6e+232) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(0.5 * Float64(Float64(0.25 / l) * Float64(Float64(D / Float64(d / D)) * Float64(h * Float64(M * Float64(M / d))))))))); elseif (l <= -2e-310) tmp = Float64(Float64(d * (Float64(l * h) ^ -0.5)) * Float64(-1.0 - t_0)); else tmp = Float64(Float64(1.0 + t_0) * Float64(d * Float64((h ^ -0.5) * (l ^ -0.5)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = -0.5 * ((h / l) * ((D * ((M / d) / 2.0)) ^ 2.0)); tmp = 0.0; if (l <= -4.6e+232) tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (0.5 * ((0.25 / l) * ((D / (d / D)) * (h * (M * (M / d)))))))); elseif (l <= -2e-310) tmp = (d * ((l * h) ^ -0.5)) * (-1.0 - t_0); else tmp = (1.0 + t_0) * (d * ((h ^ -0.5) * (l ^ -0.5))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(-0.5 * N[(N[(h / l), $MachinePrecision] * N[Power[N[(D * N[(N[(M / d), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -4.6e+232], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.5 * N[(N[(0.25 / l), $MachinePrecision] * N[(N[(D / N[(d / D), $MachinePrecision]), $MachinePrecision] * N[(h * N[(M * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -2e-310], N[(N[(d * N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] * N[(-1.0 - t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + t$95$0), $MachinePrecision] * N[(d * N[(N[Power[h, -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(D \cdot \frac{\frac{M}{d}}{2}\right)}^{2}\right)\\
\mathbf{if}\;\ell \leq -4.6 \cdot 10^{+232}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left(\frac{0.25}{\ell} \cdot \left(\frac{D}{\frac{d}{D}} \cdot \left(h \cdot \left(M \cdot \frac{M}{d}\right)\right)\right)\right)\right)\right)\\
\mathbf{elif}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot {\left(\ell \cdot h\right)}^{-0.5}\right) \cdot \left(-1 - t_0\right)\\
\mathbf{else}:\\
\;\;\;\;\left(1 + t_0\right) \cdot \left(d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\right)\\
\end{array}
\end{array}
if l < -4.60000000000000012e232Initial program 56.4%
associate-*l*56.4%
metadata-eval56.4%
unpow1/256.4%
metadata-eval56.4%
unpow1/256.4%
associate-*l*56.4%
metadata-eval56.4%
times-frac60.9%
Simplified60.9%
associate-*r/61.4%
frac-times61.4%
*-commutative61.4%
*-commutative61.4%
associate-*r/61.4%
associate-/r*61.4%
Applied egg-rr61.4%
Taylor expanded in D around 0 26.0%
associate-*r/26.0%
times-frac25.8%
unpow225.8%
times-frac41.5%
unpow241.5%
associate-/l*41.5%
unpow241.5%
associate-*r*46.5%
*-commutative46.5%
associate-*r/56.5%
*-commutative56.5%
associate-*l*61.4%
Simplified61.4%
if -4.60000000000000012e232 < l < -1.999999999999994e-310Initial program 63.9%
Applied egg-rr24.3%
expm1-def31.4%
expm1-log1p56.0%
cancel-sign-sub-inv56.0%
metadata-eval56.0%
Simplified56.0%
Taylor expanded in d around -inf 75.1%
associate-*r*75.1%
mul-1-neg75.1%
*-commutative75.1%
unpow-175.1%
sqr-pow75.1%
rem-sqrt-square75.1%
metadata-eval75.1%
sqr-pow75.1%
fabs-sqr75.1%
sqr-pow75.1%
Simplified75.1%
if -1.999999999999994e-310 < l Initial program 62.1%
Applied egg-rr25.2%
expm1-def30.7%
expm1-log1p50.0%
cancel-sign-sub-inv50.0%
metadata-eval50.0%
Simplified50.0%
Taylor expanded in d around 0 70.7%
*-commutative70.7%
*-commutative70.7%
unpow-170.7%
sqr-pow70.6%
rem-sqrt-square70.6%
metadata-eval70.6%
sqr-pow70.5%
fabs-sqr70.5%
sqr-pow70.6%
Simplified70.6%
unpow-prod-down55.3%
Applied egg-rr78.5%
Final simplification75.8%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ 1.0 (* l h))))
(if (<= l -4.2e-140)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= l 1.4e-301)
(* d (sqrt (cbrt (* t_0 (* t_0 t_0)))))
(if (<= l 2.5e+149)
(*
(+ 1.0 (* -0.5 (* (/ h l) (pow (* D (/ (/ M d) 2.0)) 2.0))))
(* d (pow (* l h) -0.5)))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = 1.0 / (l * h);
double tmp;
if (l <= -4.2e-140) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (l <= 1.4e-301) {
tmp = d * sqrt(cbrt((t_0 * (t_0 * t_0))));
} else if (l <= 2.5e+149) {
tmp = (1.0 + (-0.5 * ((h / l) * pow((D * ((M / d) / 2.0)), 2.0)))) * (d * pow((l * h), -0.5));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
public static double code(double d, double h, double l, double M, double D) {
double t_0 = 1.0 / (l * h);
double tmp;
if (l <= -4.2e-140) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (l <= 1.4e-301) {
tmp = d * Math.sqrt(Math.cbrt((t_0 * (t_0 * t_0))));
} else if (l <= 2.5e+149) {
tmp = (1.0 + (-0.5 * ((h / l) * Math.pow((D * ((M / d) / 2.0)), 2.0)))) * (d * Math.pow((l * h), -0.5));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(1.0 / Float64(l * h)) tmp = 0.0 if (l <= -4.2e-140) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (l <= 1.4e-301) tmp = Float64(d * sqrt(cbrt(Float64(t_0 * Float64(t_0 * t_0))))); elseif (l <= 2.5e+149) tmp = Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(h / l) * (Float64(D * Float64(Float64(M / d) / 2.0)) ^ 2.0)))) * Float64(d * (Float64(l * h) ^ -0.5))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -4.2e-140], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.4e-301], N[(d * N[Sqrt[N[Power[N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.5e+149], N[(N[(1.0 + N[(-0.5 * N[(N[(h / l), $MachinePrecision] * N[Power[N[(D * N[(N[(M / d), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(d * N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\ell \cdot h}\\
\mathbf{if}\;\ell \leq -4.2 \cdot 10^{-140}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;\ell \leq 1.4 \cdot 10^{-301}:\\
\;\;\;\;d \cdot \sqrt{\sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}}\\
\mathbf{elif}\;\ell \leq 2.5 \cdot 10^{+149}:\\
\;\;\;\;\left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(D \cdot \frac{\frac{M}{d}}{2}\right)}^{2}\right)\right) \cdot \left(d \cdot {\left(\ell \cdot h\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -4.20000000000000035e-140Initial program 61.4%
associate-*l*61.4%
metadata-eval61.4%
unpow1/261.4%
metadata-eval61.4%
unpow1/261.4%
sub-neg61.4%
+-commutative61.4%
*-commutative61.4%
distribute-rgt-neg-in61.4%
fma-def61.4%
Simplified62.3%
Taylor expanded in h around 0 46.1%
if -4.20000000000000035e-140 < l < 1.4000000000000001e-301Initial program 68.2%
Taylor expanded in d around inf 26.2%
add-cbrt-cube45.5%
*-commutative45.5%
*-commutative45.5%
*-commutative45.5%
Applied egg-rr45.5%
if 1.4000000000000001e-301 < l < 2.49999999999999995e149Initial program 69.4%
Applied egg-rr25.3%
expm1-def31.0%
expm1-log1p57.5%
cancel-sign-sub-inv57.5%
metadata-eval57.5%
Simplified57.5%
Taylor expanded in d around 0 79.7%
*-commutative79.7%
*-commutative79.7%
unpow-179.7%
sqr-pow79.7%
rem-sqrt-square79.7%
metadata-eval79.7%
sqr-pow79.6%
fabs-sqr79.6%
sqr-pow79.7%
Simplified79.7%
if 2.49999999999999995e149 < l Initial program 47.2%
Taylor expanded in d around inf 57.2%
*-un-lft-identity57.2%
*-commutative57.2%
Applied egg-rr57.2%
*-lft-identity57.2%
*-commutative57.2%
associate-/r*59.2%
Simplified59.2%
sqrt-div68.1%
Applied egg-rr68.1%
Final simplification61.1%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ 1.0 (* l h))))
(if (<= l -4.1e-140)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= l -2e-310)
(* d (sqrt (cbrt (* t_0 (* t_0 t_0)))))
(if (<= l 2.5e+150)
(*
(+ 1.0 (* -0.5 (/ (* h (pow (* D (* 0.5 (/ M d))) 2.0)) l)))
(* d (pow (* l h) -0.5)))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = 1.0 / (l * h);
double tmp;
if (l <= -4.1e-140) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (l <= -2e-310) {
tmp = d * sqrt(cbrt((t_0 * (t_0 * t_0))));
} else if (l <= 2.5e+150) {
tmp = (1.0 + (-0.5 * ((h * pow((D * (0.5 * (M / d))), 2.0)) / l))) * (d * pow((l * h), -0.5));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
public static double code(double d, double h, double l, double M, double D) {
double t_0 = 1.0 / (l * h);
double tmp;
if (l <= -4.1e-140) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (l <= -2e-310) {
tmp = d * Math.sqrt(Math.cbrt((t_0 * (t_0 * t_0))));
} else if (l <= 2.5e+150) {
tmp = (1.0 + (-0.5 * ((h * Math.pow((D * (0.5 * (M / d))), 2.0)) / l))) * (d * Math.pow((l * h), -0.5));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
function code(d, h, l, M, D) t_0 = Float64(1.0 / Float64(l * h)) tmp = 0.0 if (l <= -4.1e-140) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (l <= -2e-310) tmp = Float64(d * sqrt(cbrt(Float64(t_0 * Float64(t_0 * t_0))))); elseif (l <= 2.5e+150) tmp = Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(h * (Float64(D * Float64(0.5 * Float64(M / d))) ^ 2.0)) / l))) * Float64(d * (Float64(l * h) ^ -0.5))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -4.1e-140], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -2e-310], N[(d * N[Sqrt[N[Power[N[(t$95$0 * N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.5e+150], N[(N[(1.0 + N[(-0.5 * N[(N[(h * N[Power[N[(D * N[(0.5 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(d * N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{1}{\ell \cdot h}\\
\mathbf{if}\;\ell \leq -4.1 \cdot 10^{-140}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;d \cdot \sqrt{\sqrt[3]{t_0 \cdot \left(t_0 \cdot t_0\right)}}\\
\mathbf{elif}\;\ell \leq 2.5 \cdot 10^{+150}:\\
\;\;\;\;\left(1 + -0.5 \cdot \frac{h \cdot {\left(D \cdot \left(0.5 \cdot \frac{M}{d}\right)\right)}^{2}}{\ell}\right) \cdot \left(d \cdot {\left(\ell \cdot h\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -4.1000000000000001e-140Initial program 61.4%
associate-*l*61.4%
metadata-eval61.4%
unpow1/261.4%
metadata-eval61.4%
unpow1/261.4%
sub-neg61.4%
+-commutative61.4%
*-commutative61.4%
distribute-rgt-neg-in61.4%
fma-def61.4%
Simplified62.3%
Taylor expanded in h around 0 46.1%
if -4.1000000000000001e-140 < l < -1.999999999999994e-310Initial program 68.4%
Taylor expanded in d around inf 20.6%
add-cbrt-cube42.6%
*-commutative42.6%
*-commutative42.6%
*-commutative42.6%
Applied egg-rr42.6%
if -1.999999999999994e-310 < l < 2.50000000000000004e150Initial program 69.3%
Applied egg-rr25.5%
expm1-def31.1%
expm1-log1p57.8%
cancel-sign-sub-inv57.8%
metadata-eval57.8%
Simplified57.8%
Taylor expanded in d around 0 79.3%
*-commutative79.3%
*-commutative79.3%
unpow-179.3%
sqr-pow79.3%
rem-sqrt-square79.3%
metadata-eval79.3%
sqr-pow79.1%
fabs-sqr79.1%
sqr-pow79.3%
Simplified79.3%
associate-*l/84.6%
*-commutative84.6%
div-inv84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if 2.50000000000000004e150 < l Initial program 47.2%
Taylor expanded in d around inf 57.2%
*-un-lft-identity57.2%
*-commutative57.2%
Applied egg-rr57.2%
*-lft-identity57.2%
*-commutative57.2%
associate-/r*59.2%
Simplified59.2%
sqrt-div68.1%
Applied egg-rr68.1%
Final simplification63.0%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.15e-299)
(*
(+ 1.0 (* -0.5 (* (/ h l) (pow (* 0.5 (/ (* D M) d)) 2.0))))
(sqrt (* (/ d h) (/ d l))))
(if (<= l 2.65e+150)
(*
(+ 1.0 (* -0.5 (/ (* h (pow (* D (* 0.5 (/ M d))) 2.0)) l)))
(* d (pow (* l h) -0.5)))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.15e-299) {
tmp = (1.0 + (-0.5 * ((h / l) * pow((0.5 * ((D * M) / d)), 2.0)))) * sqrt(((d / h) * (d / l)));
} else if (l <= 2.65e+150) {
tmp = (1.0 + (-0.5 * ((h * pow((D * (0.5 * (M / d))), 2.0)) / l))) * (d * pow((l * h), -0.5));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-1.15d-299)) then
tmp = (1.0d0 + ((-0.5d0) * ((h / l) * ((0.5d0 * ((d_1 * m) / d)) ** 2.0d0)))) * sqrt(((d / h) * (d / l)))
else if (l <= 2.65d+150) then
tmp = (1.0d0 + ((-0.5d0) * ((h * ((d_1 * (0.5d0 * (m / d))) ** 2.0d0)) / l))) * (d * ((l * h) ** (-0.5d0)))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.15e-299) {
tmp = (1.0 + (-0.5 * ((h / l) * Math.pow((0.5 * ((D * M) / d)), 2.0)))) * Math.sqrt(((d / h) * (d / l)));
} else if (l <= 2.65e+150) {
tmp = (1.0 + (-0.5 * ((h * Math.pow((D * (0.5 * (M / d))), 2.0)) / l))) * (d * Math.pow((l * h), -0.5));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.15e-299: tmp = (1.0 + (-0.5 * ((h / l) * math.pow((0.5 * ((D * M) / d)), 2.0)))) * math.sqrt(((d / h) * (d / l))) elif l <= 2.65e+150: tmp = (1.0 + (-0.5 * ((h * math.pow((D * (0.5 * (M / d))), 2.0)) / l))) * (d * math.pow((l * h), -0.5)) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.15e-299) tmp = Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(h / l) * (Float64(0.5 * Float64(Float64(D * M) / d)) ^ 2.0)))) * sqrt(Float64(Float64(d / h) * Float64(d / l)))); elseif (l <= 2.65e+150) tmp = Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(h * (Float64(D * Float64(0.5 * Float64(M / d))) ^ 2.0)) / l))) * Float64(d * (Float64(l * h) ^ -0.5))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.15e-299) tmp = (1.0 + (-0.5 * ((h / l) * ((0.5 * ((D * M) / d)) ^ 2.0)))) * sqrt(((d / h) * (d / l))); elseif (l <= 2.65e+150) tmp = (1.0 + (-0.5 * ((h * ((D * (0.5 * (M / d))) ^ 2.0)) / l))) * (d * ((l * h) ^ -0.5)); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.15e-299], N[(N[(1.0 + N[(-0.5 * N[(N[(h / l), $MachinePrecision] * N[Power[N[(0.5 * N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(d / h), $MachinePrecision] * N[(d / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.65e+150], N[(N[(1.0 + N[(-0.5 * N[(N[(h * N[Power[N[(D * N[(0.5 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(d * N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.15 \cdot 10^{-299}:\\
\;\;\;\;\left(1 + -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(0.5 \cdot \frac{D \cdot M}{d}\right)}^{2}\right)\right) \cdot \sqrt{\frac{d}{h} \cdot \frac{d}{\ell}}\\
\mathbf{elif}\;\ell \leq 2.65 \cdot 10^{+150}:\\
\;\;\;\;\left(1 + -0.5 \cdot \frac{h \cdot {\left(D \cdot \left(0.5 \cdot \frac{M}{d}\right)\right)}^{2}}{\ell}\right) \cdot \left(d \cdot {\left(\ell \cdot h\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -1.15e-299Initial program 63.2%
Applied egg-rr24.7%
expm1-def35.1%
expm1-log1p56.8%
cancel-sign-sub-inv56.8%
metadata-eval56.8%
Simplified56.8%
Taylor expanded in D around 0 56.8%
if -1.15e-299 < l < 2.65000000000000007e150Initial program 68.5%
Applied egg-rr25.3%
expm1-def30.7%
expm1-log1p57.1%
cancel-sign-sub-inv57.1%
metadata-eval57.1%
Simplified57.1%
Taylor expanded in d around 0 78.4%
*-commutative78.4%
*-commutative78.4%
unpow-178.4%
sqr-pow78.4%
rem-sqrt-square78.4%
metadata-eval78.4%
sqr-pow78.3%
fabs-sqr78.3%
sqr-pow78.4%
Simplified78.4%
associate-*l/83.6%
*-commutative83.6%
div-inv83.6%
metadata-eval83.6%
Applied egg-rr83.6%
if 2.65000000000000007e150 < l Initial program 47.2%
Taylor expanded in d around inf 57.2%
*-un-lft-identity57.2%
*-commutative57.2%
Applied egg-rr57.2%
*-lft-identity57.2%
*-commutative57.2%
associate-/r*59.2%
Simplified59.2%
sqrt-div68.1%
Applied egg-rr68.1%
Final simplification68.3%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* d (pow (* l h) -0.5))))
(if (<= l -2e-310)
(* t_0 (- -1.0 (* -0.5 (* (/ h l) (pow (* D (/ (/ M d) 2.0)) 2.0)))))
(if (<= l 8e+149)
(* (+ 1.0 (* -0.5 (/ (* h (pow (* D (* 0.5 (/ M d))) 2.0)) l))) t_0)
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = d * pow((l * h), -0.5);
double tmp;
if (l <= -2e-310) {
tmp = t_0 * (-1.0 - (-0.5 * ((h / l) * pow((D * ((M / d) / 2.0)), 2.0))));
} else if (l <= 8e+149) {
tmp = (1.0 + (-0.5 * ((h * pow((D * (0.5 * (M / d))), 2.0)) / l))) * t_0;
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = d * ((l * h) ** (-0.5d0))
if (l <= (-2d-310)) then
tmp = t_0 * ((-1.0d0) - ((-0.5d0) * ((h / l) * ((d_1 * ((m / d) / 2.0d0)) ** 2.0d0))))
else if (l <= 8d+149) then
tmp = (1.0d0 + ((-0.5d0) * ((h * ((d_1 * (0.5d0 * (m / d))) ** 2.0d0)) / l))) * t_0
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = d * Math.pow((l * h), -0.5);
double tmp;
if (l <= -2e-310) {
tmp = t_0 * (-1.0 - (-0.5 * ((h / l) * Math.pow((D * ((M / d) / 2.0)), 2.0))));
} else if (l <= 8e+149) {
tmp = (1.0 + (-0.5 * ((h * Math.pow((D * (0.5 * (M / d))), 2.0)) / l))) * t_0;
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = d * math.pow((l * h), -0.5) tmp = 0 if l <= -2e-310: tmp = t_0 * (-1.0 - (-0.5 * ((h / l) * math.pow((D * ((M / d) / 2.0)), 2.0)))) elif l <= 8e+149: tmp = (1.0 + (-0.5 * ((h * math.pow((D * (0.5 * (M / d))), 2.0)) / l))) * t_0 else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) t_0 = Float64(d * (Float64(l * h) ^ -0.5)) tmp = 0.0 if (l <= -2e-310) tmp = Float64(t_0 * Float64(-1.0 - Float64(-0.5 * Float64(Float64(h / l) * (Float64(D * Float64(Float64(M / d) / 2.0)) ^ 2.0))))); elseif (l <= 8e+149) tmp = Float64(Float64(1.0 + Float64(-0.5 * Float64(Float64(h * (Float64(D * Float64(0.5 * Float64(M / d))) ^ 2.0)) / l))) * t_0); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = d * ((l * h) ^ -0.5); tmp = 0.0; if (l <= -2e-310) tmp = t_0 * (-1.0 - (-0.5 * ((h / l) * ((D * ((M / d) / 2.0)) ^ 2.0)))); elseif (l <= 8e+149) tmp = (1.0 + (-0.5 * ((h * ((D * (0.5 * (M / d))) ^ 2.0)) / l))) * t_0; else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(d * N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -2e-310], N[(t$95$0 * N[(-1.0 - N[(-0.5 * N[(N[(h / l), $MachinePrecision] * N[Power[N[(D * N[(N[(M / d), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 8e+149], N[(N[(1.0 + N[(-0.5 * N[(N[(h * N[Power[N[(D * N[(0.5 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := d \cdot {\left(\ell \cdot h\right)}^{-0.5}\\
\mathbf{if}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_0 \cdot \left(-1 - -0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(D \cdot \frac{\frac{M}{d}}{2}\right)}^{2}\right)\right)\\
\mathbf{elif}\;\ell \leq 8 \cdot 10^{+149}:\\
\;\;\;\;\left(1 + -0.5 \cdot \frac{h \cdot {\left(D \cdot \left(0.5 \cdot \frac{M}{d}\right)\right)}^{2}}{\ell}\right) \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 62.7%
Applied egg-rr24.5%
expm1-def34.8%
expm1-log1p56.3%
cancel-sign-sub-inv56.3%
metadata-eval56.3%
Simplified56.3%
Taylor expanded in d around -inf 69.6%
associate-*r*69.6%
mul-1-neg69.6%
*-commutative69.6%
unpow-169.6%
sqr-pow69.6%
rem-sqrt-square69.6%
metadata-eval69.6%
sqr-pow69.6%
fabs-sqr69.6%
sqr-pow69.6%
Simplified69.6%
if -1.999999999999994e-310 < l < 8.00000000000000039e149Initial program 69.3%
Applied egg-rr25.5%
expm1-def31.1%
expm1-log1p57.8%
cancel-sign-sub-inv57.8%
metadata-eval57.8%
Simplified57.8%
Taylor expanded in d around 0 79.3%
*-commutative79.3%
*-commutative79.3%
unpow-179.3%
sqr-pow79.3%
rem-sqrt-square79.3%
metadata-eval79.3%
sqr-pow79.1%
fabs-sqr79.1%
sqr-pow79.3%
Simplified79.3%
associate-*l/84.6%
*-commutative84.6%
div-inv84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if 8.00000000000000039e149 < l Initial program 47.2%
Taylor expanded in d around inf 57.2%
*-un-lft-identity57.2%
*-commutative57.2%
Applied egg-rr57.2%
*-lft-identity57.2%
*-commutative57.2%
associate-/r*59.2%
Simplified59.2%
sqrt-div68.1%
Applied egg-rr68.1%
Final simplification74.6%
(FPCore (d h l M D)
:precision binary64
(if (<= d 7.6e-255)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= d 7.5e-149)
(* -0.125 (/ (* D (* D (* M M))) (/ d (sqrt (/ h (pow l 3.0))))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 7.6e-255) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (d <= 7.5e-149) {
tmp = -0.125 * ((D * (D * (M * M))) / (d / sqrt((h / pow(l, 3.0)))));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= 7.6d-255) then
tmp = sqrt((d / h)) * sqrt((d / l))
else if (d <= 7.5d-149) then
tmp = (-0.125d0) * ((d_1 * (d_1 * (m * m))) / (d / sqrt((h / (l ** 3.0d0)))))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 7.6e-255) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (d <= 7.5e-149) {
tmp = -0.125 * ((D * (D * (M * M))) / (d / Math.sqrt((h / Math.pow(l, 3.0)))));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= 7.6e-255: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) elif d <= 7.5e-149: tmp = -0.125 * ((D * (D * (M * M))) / (d / math.sqrt((h / math.pow(l, 3.0))))) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= 7.6e-255) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (d <= 7.5e-149) tmp = Float64(-0.125 * Float64(Float64(D * Float64(D * Float64(M * M))) / Float64(d / sqrt(Float64(h / (l ^ 3.0)))))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= 7.6e-255) tmp = sqrt((d / h)) * sqrt((d / l)); elseif (d <= 7.5e-149) tmp = -0.125 * ((D * (D * (M * M))) / (d / sqrt((h / (l ^ 3.0))))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 7.6e-255], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7.5e-149], N[(-0.125 * N[(N[(D * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d / N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 7.6 \cdot 10^{-255}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;d \leq 7.5 \cdot 10^{-149}:\\
\;\;\;\;-0.125 \cdot \frac{D \cdot \left(D \cdot \left(M \cdot M\right)\right)}{\frac{d}{\sqrt{\frac{h}{{\ell}^{3}}}}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < 7.6e-255Initial program 59.0%
associate-*l*59.0%
metadata-eval59.0%
unpow1/259.0%
metadata-eval59.0%
unpow1/259.0%
sub-neg59.0%
+-commutative59.0%
*-commutative59.0%
distribute-rgt-neg-in59.0%
fma-def59.0%
Simplified58.9%
Taylor expanded in h around 0 40.5%
if 7.6e-255 < d < 7.49999999999999995e-149Initial program 50.7%
Taylor expanded in d around 0 54.8%
associate-*l/54.8%
associate-/l*54.8%
unpow254.8%
associate-*l*54.8%
unpow254.8%
Simplified54.8%
if 7.49999999999999995e-149 < d Initial program 69.7%
Taylor expanded in d around inf 58.8%
*-un-lft-identity58.8%
*-commutative58.8%
Applied egg-rr58.8%
*-lft-identity58.8%
*-commutative58.8%
associate-/r*59.6%
Simplified59.6%
sqrt-div65.4%
Applied egg-rr65.4%
Final simplification51.3%
(FPCore (d h l M D)
:precision binary64
(if (<= d 1.35e-267)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= d 1.22e-149)
(* (sqrt (/ h (pow l 3.0))) (/ -0.125 (/ d (* D (* M (* D M))))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 1.35e-267) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (d <= 1.22e-149) {
tmp = sqrt((h / pow(l, 3.0))) * (-0.125 / (d / (D * (M * (D * M)))));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= 1.35d-267) then
tmp = sqrt((d / h)) * sqrt((d / l))
else if (d <= 1.22d-149) then
tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) / (d / (d_1 * (m * (d_1 * m)))))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 1.35e-267) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (d <= 1.22e-149) {
tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 / (d / (D * (M * (D * M)))));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= 1.35e-267: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) elif d <= 1.22e-149: tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 / (d / (D * (M * (D * M))))) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= 1.35e-267) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (d <= 1.22e-149) tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 / Float64(d / Float64(D * Float64(M * Float64(D * M)))))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= 1.35e-267) tmp = sqrt((d / h)) * sqrt((d / l)); elseif (d <= 1.22e-149) tmp = sqrt((h / (l ^ 3.0))) * (-0.125 / (d / (D * (M * (D * M))))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 1.35e-267], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.22e-149], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 / N[(d / N[(D * N[(M * N[(D * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 1.35 \cdot 10^{-267}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;d \leq 1.22 \cdot 10^{-149}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{-0.125}{\frac{d}{D \cdot \left(M \cdot \left(D \cdot M\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < 1.34999999999999994e-267Initial program 60.0%
associate-*l*60.0%
metadata-eval60.0%
unpow1/260.0%
metadata-eval60.0%
unpow1/260.0%
sub-neg60.0%
+-commutative60.0%
*-commutative60.0%
distribute-rgt-neg-in60.0%
fma-def60.0%
Simplified60.0%
Taylor expanded in h around 0 41.0%
if 1.34999999999999994e-267 < d < 1.2199999999999999e-149Initial program 46.8%
Taylor expanded in d around 0 50.2%
associate-*r*50.2%
*-commutative50.2%
associate-/l*50.0%
associate-*r/50.0%
associate-/l*50.0%
unpow250.0%
associate-/r*62.3%
unpow262.3%
Simplified62.3%
Taylor expanded in d around 0 50.2%
unpow250.2%
unpow250.2%
swap-sqr62.5%
associate-*l*62.4%
Simplified62.4%
if 1.2199999999999999e-149 < d Initial program 69.7%
Taylor expanded in d around inf 58.8%
*-un-lft-identity58.8%
*-commutative58.8%
Applied egg-rr58.8%
*-lft-identity58.8%
*-commutative58.8%
associate-/r*59.6%
Simplified59.6%
sqrt-div65.4%
Applied egg-rr65.4%
Final simplification52.5%
(FPCore (d h l M D)
:precision binary64
(if (<= d 1.15e-306)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= d 1.85e-152)
(* (/ -0.125 (/ (/ (/ d M) M) (* D D))) (sqrt (/ h (pow l 3.0))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 1.15e-306) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (d <= 1.85e-152) {
tmp = (-0.125 / (((d / M) / M) / (D * D))) * sqrt((h / pow(l, 3.0)));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= 1.15d-306) then
tmp = sqrt((d / h)) * sqrt((d / l))
else if (d <= 1.85d-152) then
tmp = ((-0.125d0) / (((d / m) / m) / (d_1 * d_1))) * sqrt((h / (l ** 3.0d0)))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 1.15e-306) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (d <= 1.85e-152) {
tmp = (-0.125 / (((d / M) / M) / (D * D))) * Math.sqrt((h / Math.pow(l, 3.0)));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= 1.15e-306: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) elif d <= 1.85e-152: tmp = (-0.125 / (((d / M) / M) / (D * D))) * math.sqrt((h / math.pow(l, 3.0))) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= 1.15e-306) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (d <= 1.85e-152) tmp = Float64(Float64(-0.125 / Float64(Float64(Float64(d / M) / M) / Float64(D * D))) * sqrt(Float64(h / (l ^ 3.0)))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= 1.15e-306) tmp = sqrt((d / h)) * sqrt((d / l)); elseif (d <= 1.85e-152) tmp = (-0.125 / (((d / M) / M) / (D * D))) * sqrt((h / (l ^ 3.0))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 1.15e-306], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.85e-152], N[(N[(-0.125 / N[(N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision] / N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 1.15 \cdot 10^{-306}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;d \leq 1.85 \cdot 10^{-152}:\\
\;\;\;\;\frac{-0.125}{\frac{\frac{\frac{d}{M}}{M}}{D \cdot D}} \cdot \sqrt{\frac{h}{{\ell}^{3}}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < 1.14999999999999995e-306Initial program 62.2%
associate-*l*62.2%
metadata-eval62.2%
unpow1/262.2%
metadata-eval62.2%
unpow1/262.2%
sub-neg62.2%
+-commutative62.2%
*-commutative62.2%
distribute-rgt-neg-in62.2%
fma-def62.2%
Simplified62.1%
Taylor expanded in h around 0 41.0%
if 1.14999999999999995e-306 < d < 1.8499999999999999e-152Initial program 42.2%
Taylor expanded in d around 0 47.6%
associate-*r*47.6%
*-commutative47.6%
associate-/l*50.3%
associate-*r/50.3%
associate-/l*50.3%
unpow250.3%
associate-/r*59.7%
unpow259.7%
Simplified59.7%
if 1.8499999999999999e-152 < d Initial program 69.7%
Taylor expanded in d around inf 58.8%
*-un-lft-identity58.8%
*-commutative58.8%
Applied egg-rr58.8%
*-lft-identity58.8%
*-commutative58.8%
associate-/r*59.6%
Simplified59.6%
sqrt-div65.4%
Applied egg-rr65.4%
Final simplification52.8%
(FPCore (d h l M D)
:precision binary64
(if (<= d 1.15e-306)
(* (sqrt (/ d h)) (sqrt (/ d l)))
(if (<= d 3.7e-148)
(* (/ (sqrt h) (pow l 1.5)) (/ -0.125 (/ (/ (/ d M) M) (* D D))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 1.15e-306) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else if (d <= 3.7e-148) {
tmp = (sqrt(h) / pow(l, 1.5)) * (-0.125 / (((d / M) / M) / (D * D)));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= 1.15d-306) then
tmp = sqrt((d / h)) * sqrt((d / l))
else if (d <= 3.7d-148) then
tmp = (sqrt(h) / (l ** 1.5d0)) * ((-0.125d0) / (((d / m) / m) / (d_1 * d_1)))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 1.15e-306) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else if (d <= 3.7e-148) {
tmp = (Math.sqrt(h) / Math.pow(l, 1.5)) * (-0.125 / (((d / M) / M) / (D * D)));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= 1.15e-306: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) elif d <= 3.7e-148: tmp = (math.sqrt(h) / math.pow(l, 1.5)) * (-0.125 / (((d / M) / M) / (D * D))) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= 1.15e-306) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); elseif (d <= 3.7e-148) tmp = Float64(Float64(sqrt(h) / (l ^ 1.5)) * Float64(-0.125 / Float64(Float64(Float64(d / M) / M) / Float64(D * D)))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= 1.15e-306) tmp = sqrt((d / h)) * sqrt((d / l)); elseif (d <= 3.7e-148) tmp = (sqrt(h) / (l ^ 1.5)) * (-0.125 / (((d / M) / M) / (D * D))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 1.15e-306], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.7e-148], N[(N[(N[Sqrt[h], $MachinePrecision] / N[Power[l, 1.5], $MachinePrecision]), $MachinePrecision] * N[(-0.125 / N[(N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision] / N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 1.15 \cdot 10^{-306}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{elif}\;d \leq 3.7 \cdot 10^{-148}:\\
\;\;\;\;\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot \frac{-0.125}{\frac{\frac{\frac{d}{M}}{M}}{D \cdot D}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < 1.14999999999999995e-306Initial program 62.2%
associate-*l*62.2%
metadata-eval62.2%
unpow1/262.2%
metadata-eval62.2%
unpow1/262.2%
sub-neg62.2%
+-commutative62.2%
*-commutative62.2%
distribute-rgt-neg-in62.2%
fma-def62.2%
Simplified62.1%
Taylor expanded in h around 0 41.0%
if 1.14999999999999995e-306 < d < 3.70000000000000034e-148Initial program 42.2%
Taylor expanded in d around 0 47.6%
associate-*r*47.6%
*-commutative47.6%
associate-/l*50.3%
associate-*r/50.3%
associate-/l*50.3%
unpow250.3%
associate-/r*59.7%
unpow259.7%
Simplified59.7%
sqrt-div62.9%
Applied egg-rr62.9%
sqr-pow62.9%
rem-sqrt-square71.8%
metadata-eval71.8%
sqr-pow71.8%
fabs-sqr71.8%
sqr-pow71.8%
Simplified71.8%
if 3.70000000000000034e-148 < d Initial program 69.7%
Taylor expanded in d around inf 58.8%
*-un-lft-identity58.8%
*-commutative58.8%
Applied egg-rr58.8%
*-lft-identity58.8%
*-commutative58.8%
associate-/r*59.6%
Simplified59.6%
sqrt-div65.4%
Applied egg-rr65.4%
Final simplification54.4%
(FPCore (d h l M D) :precision binary64 (if (<= d 1.85e-208) (* d (pow (* l h) -0.5)) (* d (* (pow h -0.5) (pow l -0.5)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 1.85e-208) {
tmp = d * pow((l * h), -0.5);
} else {
tmp = d * (pow(h, -0.5) * pow(l, -0.5));
}
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
real(8) :: tmp
if (d <= 1.85d-208) then
tmp = d * ((l * h) ** (-0.5d0))
else
tmp = d * ((h ** (-0.5d0)) * (l ** (-0.5d0)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 1.85e-208) {
tmp = d * Math.pow((l * h), -0.5);
} else {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= 1.85e-208: tmp = d * math.pow((l * h), -0.5) else: tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= 1.85e-208) tmp = Float64(d * (Float64(l * h) ^ -0.5)); else tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= 1.85e-208) tmp = d * ((l * h) ^ -0.5); else tmp = d * ((h ^ -0.5) * (l ^ -0.5)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 1.85e-208], N[(d * N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 1.85 \cdot 10^{-208}:\\
\;\;\;\;d \cdot {\left(\ell \cdot h\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if d < 1.8500000000000001e-208Initial program 58.9%
Taylor expanded in d around inf 12.0%
*-un-lft-identity12.0%
*-commutative12.0%
Applied egg-rr12.0%
*-lft-identity12.0%
unpow-112.0%
sqr-pow12.0%
rem-sqrt-square12.0%
metadata-eval12.0%
sqr-pow12.0%
fabs-sqr12.0%
sqr-pow12.0%
Simplified12.0%
if 1.8500000000000001e-208 < d Initial program 67.0%
Taylor expanded in d around inf 54.8%
*-un-lft-identity54.8%
*-commutative54.8%
Applied egg-rr54.8%
*-lft-identity54.8%
unpow-154.8%
sqr-pow54.8%
rem-sqrt-square54.8%
metadata-eval54.8%
sqr-pow54.5%
fabs-sqr54.5%
sqr-pow54.8%
Simplified54.8%
unpow-prod-down60.6%
Applied egg-rr60.6%
Final simplification33.1%
(FPCore (d h l M D) :precision binary64 (if (<= d 3.15e-147) (* d (pow (* l h) -0.5)) (* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 3.15e-147) {
tmp = d * pow((l * h), -0.5);
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= 3.15d-147) then
tmp = d * ((l * h) ** (-0.5d0))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 3.15e-147) {
tmp = d * Math.pow((l * h), -0.5);
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= 3.15e-147: tmp = d * math.pow((l * h), -0.5) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= 3.15e-147) tmp = Float64(d * (Float64(l * h) ^ -0.5)); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= 3.15e-147) tmp = d * ((l * h) ^ -0.5); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 3.15e-147], N[(d * N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 3.15 \cdot 10^{-147}:\\
\;\;\;\;d \cdot {\left(\ell \cdot h\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < 3.14999999999999975e-147Initial program 57.5%
Taylor expanded in d around inf 13.6%
*-un-lft-identity13.6%
*-commutative13.6%
Applied egg-rr13.6%
*-lft-identity13.6%
unpow-113.6%
sqr-pow13.6%
rem-sqrt-square13.6%
metadata-eval13.6%
sqr-pow13.6%
fabs-sqr13.6%
sqr-pow13.6%
Simplified13.6%
if 3.14999999999999975e-147 < d Initial program 70.4%
Taylor expanded in d around inf 58.4%
*-un-lft-identity58.4%
*-commutative58.4%
Applied egg-rr58.4%
*-lft-identity58.4%
*-commutative58.4%
associate-/r*59.2%
Simplified59.2%
sqrt-div65.1%
Applied egg-rr65.1%
Final simplification33.1%
(FPCore (d h l M D) :precision binary64 (if (<= d 5.6e-308) (* (sqrt (/ d h)) (sqrt (/ d l))) (* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 5.6e-308) {
tmp = sqrt((d / h)) * sqrt((d / l));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (d <= 5.6d-308) then
tmp = sqrt((d / h)) * sqrt((d / l))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 5.6e-308) {
tmp = Math.sqrt((d / h)) * Math.sqrt((d / l));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= 5.6e-308: tmp = math.sqrt((d / h)) * math.sqrt((d / l)) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= 5.6e-308) tmp = Float64(sqrt(Float64(d / h)) * sqrt(Float64(d / l))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= 5.6e-308) tmp = sqrt((d / h)) * sqrt((d / l)); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 5.6e-308], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 5.6 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \sqrt{\frac{d}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < 5.59999999999999969e-308Initial program 62.7%
associate-*l*62.7%
metadata-eval62.7%
unpow1/262.7%
metadata-eval62.7%
unpow1/262.7%
sub-neg62.7%
+-commutative62.7%
*-commutative62.7%
distribute-rgt-neg-in62.7%
fma-def62.7%
Simplified62.6%
Taylor expanded in h around 0 41.3%
if 5.59999999999999969e-308 < d Initial program 62.1%
Taylor expanded in d around inf 50.5%
*-un-lft-identity50.5%
*-commutative50.5%
Applied egg-rr50.5%
*-lft-identity50.5%
*-commutative50.5%
associate-/r*51.1%
Simplified51.1%
sqrt-div55.4%
Applied egg-rr55.4%
Final simplification48.6%
(FPCore (d h l M D) :precision binary64 (* d (sqrt (* (/ 1.0 l) (/ 1.0 h)))))
double code(double d, double h, double l, double M, double D) {
return d * sqrt(((1.0 / l) * (1.0 / h)));
}
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 * sqrt(((1.0d0 / l) * (1.0d0 / h)))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.sqrt(((1.0 / l) * (1.0 / h)));
}
def code(d, h, l, M, D): return d * math.sqrt(((1.0 / l) * (1.0 / h)))
function code(d, h, l, M, D) return Float64(d * sqrt(Float64(Float64(1.0 / l) * Float64(1.0 / h)))) end
function tmp = code(d, h, l, M, D) tmp = d * sqrt(((1.0 / l) * (1.0 / h))); end
code[d_, h_, l_, M_, D_] := N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] * N[(1.0 / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot \sqrt{\frac{1}{\ell} \cdot \frac{1}{h}}
\end{array}
Initial program 62.4%
Taylor expanded in d around inf 30.6%
*-un-lft-identity30.6%
*-commutative30.6%
Applied egg-rr30.6%
*-lft-identity30.6%
*-commutative30.6%
associate-/r*30.9%
Simplified30.9%
div-inv30.9%
Applied egg-rr30.9%
Final simplification30.9%
(FPCore (d h l M D) :precision binary64 (* d (sqrt (/ 1.0 (* l h)))))
double code(double d, double h, double l, double M, double D) {
return d * sqrt((1.0 / (l * h)));
}
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 * sqrt((1.0d0 / (l * h)))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.sqrt((1.0 / (l * h)));
}
def code(d, h, l, M, D): return d * math.sqrt((1.0 / (l * h)))
function code(d, h, l, M, D) return Float64(d * sqrt(Float64(1.0 / Float64(l * h)))) end
function tmp = code(d, h, l, M, D) tmp = d * sqrt((1.0 / (l * h))); end
code[d_, h_, l_, M_, D_] := N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot \sqrt{\frac{1}{\ell \cdot h}}
\end{array}
Initial program 62.4%
Taylor expanded in d around inf 30.6%
Final simplification30.6%
(FPCore (d h l M D) :precision binary64 (* d (sqrt (/ (/ 1.0 l) h))))
double code(double d, double h, double l, double M, double D) {
return d * sqrt(((1.0 / l) / h));
}
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 * sqrt(((1.0d0 / l) / h))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.sqrt(((1.0 / l) / h));
}
def code(d, h, l, M, D): return d * math.sqrt(((1.0 / l) / h))
function code(d, h, l, M, D) return Float64(d * sqrt(Float64(Float64(1.0 / l) / h))) end
function tmp = code(d, h, l, M, D) tmp = d * sqrt(((1.0 / l) / h)); end
code[d_, h_, l_, M_, D_] := N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}
\end{array}
Initial program 62.4%
Taylor expanded in d around inf 30.6%
*-un-lft-identity30.6%
*-commutative30.6%
Applied egg-rr30.6%
*-lft-identity30.6%
*-commutative30.6%
associate-/r*30.9%
Simplified30.9%
Final simplification30.9%
(FPCore (d h l M D) :precision binary64 (* d (pow (* l h) -0.5)))
double code(double d, double h, double l, double M, double D) {
return d * pow((l * h), -0.5);
}
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 * ((l * h) ** (-0.5d0))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.pow((l * h), -0.5);
}
def code(d, h, l, M, D): return d * math.pow((l * h), -0.5)
function code(d, h, l, M, D) return Float64(d * (Float64(l * h) ^ -0.5)) end
function tmp = code(d, h, l, M, D) tmp = d * ((l * h) ^ -0.5); end
code[d_, h_, l_, M_, D_] := N[(d * N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot {\left(\ell \cdot h\right)}^{-0.5}
\end{array}
Initial program 62.4%
Taylor expanded in d around inf 30.6%
*-un-lft-identity30.6%
*-commutative30.6%
Applied egg-rr30.6%
*-lft-identity30.6%
unpow-130.6%
sqr-pow30.5%
rem-sqrt-square30.5%
metadata-eval30.5%
sqr-pow30.4%
fabs-sqr30.4%
sqr-pow30.5%
Simplified30.5%
Final simplification30.5%
herbie shell --seed 2023222
(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)))))