
(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 23 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
(if (<= l -1e-309)
(*
(/ (sqrt (- d)) (sqrt (- h)))
(*
(sqrt (/ d l))
(- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l))))))
(*
(/ d (* (sqrt h) (sqrt l)))
(- 1.0 (* (pow (/ (* D (* 0.5 M)) d) 2.0) (/ 0.5 (/ l h)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1e-309) {
tmp = (sqrt(-d) / sqrt(-h)) * (sqrt((d / l)) * (1.0 - (0.5 * (pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / 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 <= (-1d-309)) then
tmp = (sqrt(-d) / sqrt(-h)) * (sqrt((d / l)) * (1.0d0 - (0.5d0 * ((((m / 2.0d0) * (d_1 / d)) ** 2.0d0) * (h / l)))))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 - ((((d_1 * (0.5d0 * m)) / d) ** 2.0d0) * (0.5d0 / (l / 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 <= -1e-309) {
tmp = (Math.sqrt(-d) / Math.sqrt(-h)) * (Math.sqrt((d / l)) * (1.0 - (0.5 * (Math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 - (Math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1e-309: tmp = (math.sqrt(-d) / math.sqrt(-h)) * (math.sqrt((d / l)) * (1.0 - (0.5 * (math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l))))) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 - (math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1e-309) tmp = Float64(Float64(sqrt(Float64(-d)) / sqrt(Float64(-h))) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(0.5 * Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(h / l)))))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 - Float64((Float64(Float64(D * Float64(0.5 * M)) / d) ^ 2.0) * Float64(0.5 / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1e-309) tmp = (sqrt(-d) / sqrt(-h)) * (sqrt((d / l)) * (1.0 - (0.5 * ((((M / 2.0) * (D / d)) ^ 2.0) * (h / l))))); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - ((((D * (0.5 * M)) / d) ^ 2.0) * (0.5 / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1e-309], N[(N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.5 * N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{\sqrt{-d}}{\sqrt{-h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 - {\left(\frac{D \cdot \left(0.5 \cdot M\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\
\end{array}
\end{array}
if l < -1.000000000000002e-309Initial program 63.0%
associate-*l*62.3%
metadata-eval62.3%
unpow1/262.3%
metadata-eval62.3%
unpow1/262.3%
associate-*l*62.3%
metadata-eval62.3%
times-frac62.3%
Simplified62.3%
frac-2neg62.3%
sqrt-div78.4%
Applied egg-rr78.4%
if -1.000000000000002e-309 < l Initial program 67.8%
metadata-eval67.8%
unpow1/267.8%
metadata-eval67.8%
unpow1/267.8%
*-commutative67.8%
associate-*l*67.8%
times-frac67.9%
metadata-eval67.9%
Simplified67.9%
expm1-log1p-u41.9%
expm1-udef30.3%
Applied egg-rr36.8%
expm1-def51.6%
expm1-log1p83.2%
associate-/l*83.2%
*-commutative83.2%
associate-*l/83.1%
Simplified83.1%
Final simplification81.0%
(FPCore (d h l M D)
:precision binary64
(if (<= d -3.55e+165)
(* d (- (sqrt (/ (/ 1.0 h) l))))
(if (<= d -3.3e-165)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(- 1.0 (* 0.5 (pow (* (* (/ D d) (* 0.5 M)) (sqrt (/ h l))) 2.0)))))
(if (<= d 8e-308)
(-
(* (sqrt (/ h (pow l 3.0))) (* (/ (* D D) (/ (/ d M) M)) 0.125))
(* d (sqrt (/ 1.0 (* l h)))))
(*
(/ d (* (sqrt h) (sqrt l)))
(- 1.0 (* (pow (/ (* D (* 0.5 M)) d) 2.0) (/ 0.5 (/ l h)))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -3.55e+165) {
tmp = d * -sqrt(((1.0 / h) / l));
} else if (d <= -3.3e-165) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (0.5 * pow((((D / d) * (0.5 * M)) * sqrt((h / l))), 2.0))));
} else if (d <= 8e-308) {
tmp = (sqrt((h / pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * sqrt((1.0 / (l * h))));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / 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.55d+165)) then
tmp = d * -sqrt(((1.0d0 / h) / l))
else if (d <= (-3.3d-165)) then
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0d0 - (0.5d0 * ((((d_1 / d) * (0.5d0 * m)) * sqrt((h / l))) ** 2.0d0))))
else if (d <= 8d-308) then
tmp = (sqrt((h / (l ** 3.0d0))) * (((d_1 * d_1) / ((d / m) / m)) * 0.125d0)) - (d * sqrt((1.0d0 / (l * h))))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 - ((((d_1 * (0.5d0 * m)) / d) ** 2.0d0) * (0.5d0 / (l / 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.55e+165) {
tmp = d * -Math.sqrt(((1.0 / h) / l));
} else if (d <= -3.3e-165) {
tmp = Math.sqrt((d / h)) * (Math.sqrt((d / l)) * (1.0 - (0.5 * Math.pow((((D / d) * (0.5 * M)) * Math.sqrt((h / l))), 2.0))));
} else if (d <= 8e-308) {
tmp = (Math.sqrt((h / Math.pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * Math.sqrt((1.0 / (l * h))));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 - (Math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -3.55e+165: tmp = d * -math.sqrt(((1.0 / h) / l)) elif d <= -3.3e-165: tmp = math.sqrt((d / h)) * (math.sqrt((d / l)) * (1.0 - (0.5 * math.pow((((D / d) * (0.5 * M)) * math.sqrt((h / l))), 2.0)))) elif d <= 8e-308: tmp = (math.sqrt((h / math.pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * math.sqrt((1.0 / (l * h)))) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 - (math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -3.55e+165) tmp = Float64(d * Float64(-sqrt(Float64(Float64(1.0 / h) / l)))); elseif (d <= -3.3e-165) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(0.5 * (Float64(Float64(Float64(D / d) * Float64(0.5 * M)) * sqrt(Float64(h / l))) ^ 2.0))))); elseif (d <= 8e-308) tmp = Float64(Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(Float64(Float64(D * D) / Float64(Float64(d / M) / M)) * 0.125)) - Float64(d * sqrt(Float64(1.0 / Float64(l * h))))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 - Float64((Float64(Float64(D * Float64(0.5 * M)) / d) ^ 2.0) * Float64(0.5 / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -3.55e+165) tmp = d * -sqrt(((1.0 / h) / l)); elseif (d <= -3.3e-165) tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (0.5 * ((((D / d) * (0.5 * M)) * sqrt((h / l))) ^ 2.0)))); elseif (d <= 8e-308) tmp = (sqrt((h / (l ^ 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * sqrt((1.0 / (l * h)))); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - ((((D * (0.5 * M)) / d) ^ 2.0) * (0.5 / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -3.55e+165], N[(d * (-N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[d, -3.3e-165], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.5 * N[Power[N[(N[(N[(D / d), $MachinePrecision] * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(h / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8e-308], N[(N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] / N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision] - N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -3.55 \cdot 10^{+165}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\
\mathbf{elif}\;d \leq -3.3 \cdot 10^{-165}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot {\left(\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right) \cdot \sqrt{\frac{h}{\ell}}\right)}^{2}\right)\right)\\
\mathbf{elif}\;d \leq 8 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(\frac{D \cdot D}{\frac{\frac{d}{M}}{M}} \cdot 0.125\right) - d \cdot \sqrt{\frac{1}{\ell \cdot h}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 - {\left(\frac{D \cdot \left(0.5 \cdot M\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\
\end{array}
\end{array}
if d < -3.54999999999999988e165Initial program 64.1%
metadata-eval64.1%
unpow1/264.1%
metadata-eval64.1%
unpow1/264.1%
*-commutative64.1%
associate-*l*64.1%
times-frac64.2%
metadata-eval64.2%
Simplified64.2%
clear-num64.2%
sqrt-div64.1%
metadata-eval64.1%
Applied egg-rr64.1%
Taylor expanded in d around -inf 72.7%
mul-1-neg72.7%
associate-/l/72.7%
Simplified72.7%
if -3.54999999999999988e165 < d < -3.2999999999999998e-165Initial program 80.7%
associate-*l*80.7%
metadata-eval80.7%
unpow1/280.7%
metadata-eval80.7%
unpow1/280.7%
associate-*l*80.7%
metadata-eval80.7%
times-frac80.7%
Simplified80.7%
add-sqr-sqrt80.7%
pow280.7%
sqrt-prod80.7%
sqrt-pow182.9%
metadata-eval82.9%
pow182.9%
div-inv82.9%
metadata-eval82.9%
Applied egg-rr82.9%
if -3.2999999999999998e-165 < d < 8.00000000000000026e-308Initial program 30.3%
metadata-eval30.3%
unpow1/230.3%
metadata-eval30.3%
unpow1/230.3%
*-commutative30.3%
associate-*l*30.3%
times-frac30.4%
metadata-eval30.4%
Simplified30.4%
clear-num30.4%
sqrt-div30.4%
metadata-eval30.4%
Applied egg-rr30.4%
Taylor expanded in d around -inf 47.3%
mul-1-neg47.3%
*-commutative47.3%
unsub-neg47.3%
*-commutative47.3%
*-commutative47.3%
associate-*l*47.3%
associate-/l*47.1%
unpow247.1%
unpow247.1%
associate-/r*53.9%
Simplified53.9%
if 8.00000000000000026e-308 < d Initial program 68.7%
metadata-eval68.7%
unpow1/268.7%
metadata-eval68.7%
unpow1/268.7%
*-commutative68.7%
associate-*l*68.7%
times-frac68.8%
metadata-eval68.8%
Simplified68.8%
expm1-log1p-u42.5%
expm1-udef30.7%
Applied egg-rr37.3%
expm1-def52.3%
expm1-log1p84.3%
associate-/l*84.3%
*-commutative84.3%
associate-*l/84.3%
Simplified84.3%
Final simplification78.7%
(FPCore (d h l M D)
:precision binary64
(if (<= d -2.65e-163)
(*
(sqrt (/ d h))
(*
(- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l))))
(/ (sqrt (- d)) (sqrt (- l)))))
(if (<= d 8e-308)
(-
(* (sqrt (/ h (pow l 3.0))) (* (/ (* D D) (/ (/ d M) M)) 0.125))
(* d (sqrt (/ 1.0 (* l h)))))
(*
(/ d (* (sqrt h) (sqrt l)))
(- 1.0 (* (pow (/ (* D (* 0.5 M)) d) 2.0) (/ 0.5 (/ l h))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -2.65e-163) {
tmp = sqrt((d / h)) * ((1.0 - (0.5 * (pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * (sqrt(-d) / sqrt(-l)));
} else if (d <= 8e-308) {
tmp = (sqrt((h / pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * sqrt((1.0 / (l * h))));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / 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 <= (-2.65d-163)) then
tmp = sqrt((d / h)) * ((1.0d0 - (0.5d0 * ((((m / 2.0d0) * (d_1 / d)) ** 2.0d0) * (h / l)))) * (sqrt(-d) / sqrt(-l)))
else if (d <= 8d-308) then
tmp = (sqrt((h / (l ** 3.0d0))) * (((d_1 * d_1) / ((d / m) / m)) * 0.125d0)) - (d * sqrt((1.0d0 / (l * h))))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 - ((((d_1 * (0.5d0 * m)) / d) ** 2.0d0) * (0.5d0 / (l / 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 <= -2.65e-163) {
tmp = Math.sqrt((d / h)) * ((1.0 - (0.5 * (Math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * (Math.sqrt(-d) / Math.sqrt(-l)));
} else if (d <= 8e-308) {
tmp = (Math.sqrt((h / Math.pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * Math.sqrt((1.0 / (l * h))));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 - (Math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -2.65e-163: tmp = math.sqrt((d / h)) * ((1.0 - (0.5 * (math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * (math.sqrt(-d) / math.sqrt(-l))) elif d <= 8e-308: tmp = (math.sqrt((h / math.pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * math.sqrt((1.0 / (l * h)))) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 - (math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -2.65e-163) tmp = Float64(sqrt(Float64(d / h)) * Float64(Float64(1.0 - Float64(0.5 * Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(h / l)))) * Float64(sqrt(Float64(-d)) / sqrt(Float64(-l))))); elseif (d <= 8e-308) tmp = Float64(Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(Float64(Float64(D * D) / Float64(Float64(d / M) / M)) * 0.125)) - Float64(d * sqrt(Float64(1.0 / Float64(l * h))))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 - Float64((Float64(Float64(D * Float64(0.5 * M)) / d) ^ 2.0) * Float64(0.5 / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -2.65e-163) tmp = sqrt((d / h)) * ((1.0 - (0.5 * ((((M / 2.0) * (D / d)) ^ 2.0) * (h / l)))) * (sqrt(-d) / sqrt(-l))); elseif (d <= 8e-308) tmp = (sqrt((h / (l ^ 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * sqrt((1.0 / (l * h)))); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - ((((D * (0.5 * M)) / d) ^ 2.0) * (0.5 / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -2.65e-163], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[(1.0 - N[(0.5 * N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-l)], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8e-308], N[(N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] / N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision] - N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -2.65 \cdot 10^{-163}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right) \cdot \frac{\sqrt{-d}}{\sqrt{-\ell}}\right)\\
\mathbf{elif}\;d \leq 8 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(\frac{D \cdot D}{\frac{\frac{d}{M}}{M}} \cdot 0.125\right) - d \cdot \sqrt{\frac{1}{\ell \cdot h}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 - {\left(\frac{D \cdot \left(0.5 \cdot M\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\
\end{array}
\end{array}
if d < -2.65000000000000008e-163Initial program 73.0%
associate-*l*72.0%
metadata-eval72.0%
unpow1/272.0%
metadata-eval72.0%
unpow1/272.0%
associate-*l*72.0%
metadata-eval72.0%
times-frac72.0%
Simplified72.0%
frac-2neg72.0%
sqrt-div74.9%
Applied egg-rr74.9%
if -2.65000000000000008e-163 < d < 8.00000000000000026e-308Initial program 30.3%
metadata-eval30.3%
unpow1/230.3%
metadata-eval30.3%
unpow1/230.3%
*-commutative30.3%
associate-*l*30.3%
times-frac30.4%
metadata-eval30.4%
Simplified30.4%
clear-num30.4%
sqrt-div30.4%
metadata-eval30.4%
Applied egg-rr30.4%
Taylor expanded in d around -inf 47.3%
mul-1-neg47.3%
*-commutative47.3%
unsub-neg47.3%
*-commutative47.3%
*-commutative47.3%
associate-*l*47.3%
associate-/l*47.1%
unpow247.1%
unpow247.1%
associate-/r*53.9%
Simplified53.9%
if 8.00000000000000026e-308 < d Initial program 68.7%
metadata-eval68.7%
unpow1/268.7%
metadata-eval68.7%
unpow1/268.7%
*-commutative68.7%
associate-*l*68.7%
times-frac68.8%
metadata-eval68.8%
Simplified68.8%
expm1-log1p-u42.5%
expm1-udef30.7%
Applied egg-rr37.3%
expm1-def52.3%
expm1-log1p84.3%
associate-/l*84.3%
*-commutative84.3%
associate-*l/84.3%
Simplified84.3%
Final simplification77.6%
(FPCore (d h l M D)
:precision binary64
(if (<= d -2.8e-164)
(*
(* (sqrt (/ d l)) (sqrt (/ d h)))
(- 1.0 (pow (* (* (/ D d) (* 0.5 M)) (sqrt (/ (* h 0.5) l))) 2.0)))
(if (<= d 8e-308)
(-
(* (sqrt (/ h (pow l 3.0))) (* (/ (* D D) (/ (/ d M) M)) 0.125))
(* d (sqrt (/ 1.0 (* l h)))))
(*
(/ d (* (sqrt h) (sqrt l)))
(- 1.0 (* (pow (/ (* D (* 0.5 M)) d) 2.0) (/ 0.5 (/ l h))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -2.8e-164) {
tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - pow((((D / d) * (0.5 * M)) * sqrt(((h * 0.5) / l))), 2.0));
} else if (d <= 8e-308) {
tmp = (sqrt((h / pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * sqrt((1.0 / (l * h))));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / 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 <= (-2.8d-164)) then
tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - ((((d_1 / d) * (0.5d0 * m)) * sqrt(((h * 0.5d0) / l))) ** 2.0d0))
else if (d <= 8d-308) then
tmp = (sqrt((h / (l ** 3.0d0))) * (((d_1 * d_1) / ((d / m) / m)) * 0.125d0)) - (d * sqrt((1.0d0 / (l * h))))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 - ((((d_1 * (0.5d0 * m)) / d) ** 2.0d0) * (0.5d0 / (l / 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 <= -2.8e-164) {
tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - Math.pow((((D / d) * (0.5 * M)) * Math.sqrt(((h * 0.5) / l))), 2.0));
} else if (d <= 8e-308) {
tmp = (Math.sqrt((h / Math.pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * Math.sqrt((1.0 / (l * h))));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 - (Math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -2.8e-164: tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - math.pow((((D / d) * (0.5 * M)) * math.sqrt(((h * 0.5) / l))), 2.0)) elif d <= 8e-308: tmp = (math.sqrt((h / math.pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * math.sqrt((1.0 / (l * h)))) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 - (math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -2.8e-164) tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - (Float64(Float64(Float64(D / d) * Float64(0.5 * M)) * sqrt(Float64(Float64(h * 0.5) / l))) ^ 2.0))); elseif (d <= 8e-308) tmp = Float64(Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(Float64(Float64(D * D) / Float64(Float64(d / M) / M)) * 0.125)) - Float64(d * sqrt(Float64(1.0 / Float64(l * h))))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 - Float64((Float64(Float64(D * Float64(0.5 * M)) / d) ^ 2.0) * Float64(0.5 / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -2.8e-164) tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((D / d) * (0.5 * M)) * sqrt(((h * 0.5) / l))) ^ 2.0)); elseif (d <= 8e-308) tmp = (sqrt((h / (l ^ 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * sqrt((1.0 / (l * h)))); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - ((((D * (0.5 * M)) / d) ^ 2.0) * (0.5 / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -2.8e-164], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[Power[N[(N[(N[(D / d), $MachinePrecision] * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(h * 0.5), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8e-308], N[(N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] / N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision] - N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -2.8 \cdot 10^{-164}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - {\left(\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right) \cdot \sqrt{\frac{h \cdot 0.5}{\ell}}\right)}^{2}\right)\\
\mathbf{elif}\;d \leq 8 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(\frac{D \cdot D}{\frac{\frac{d}{M}}{M}} \cdot 0.125\right) - d \cdot \sqrt{\frac{1}{\ell \cdot h}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 - {\left(\frac{D \cdot \left(0.5 \cdot M\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\
\end{array}
\end{array}
if d < -2.8000000000000001e-164Initial program 73.0%
metadata-eval73.0%
unpow1/273.0%
metadata-eval73.0%
unpow1/273.0%
*-commutative73.0%
associate-*l*73.0%
times-frac73.0%
metadata-eval73.0%
Simplified73.0%
add-sqr-sqrt73.1%
pow273.1%
sqrt-prod73.1%
sqrt-pow174.2%
metadata-eval74.2%
pow174.2%
div-inv74.2%
metadata-eval74.2%
associate-*r/74.2%
Applied egg-rr74.2%
if -2.8000000000000001e-164 < d < 8.00000000000000026e-308Initial program 30.3%
metadata-eval30.3%
unpow1/230.3%
metadata-eval30.3%
unpow1/230.3%
*-commutative30.3%
associate-*l*30.3%
times-frac30.4%
metadata-eval30.4%
Simplified30.4%
clear-num30.4%
sqrt-div30.4%
metadata-eval30.4%
Applied egg-rr30.4%
Taylor expanded in d around -inf 47.3%
mul-1-neg47.3%
*-commutative47.3%
unsub-neg47.3%
*-commutative47.3%
*-commutative47.3%
associate-*l*47.3%
associate-/l*47.1%
unpow247.1%
unpow247.1%
associate-/r*53.9%
Simplified53.9%
if 8.00000000000000026e-308 < d Initial program 68.7%
metadata-eval68.7%
unpow1/268.7%
metadata-eval68.7%
unpow1/268.7%
*-commutative68.7%
associate-*l*68.7%
times-frac68.8%
metadata-eval68.8%
Simplified68.8%
expm1-log1p-u42.5%
expm1-udef30.7%
Applied egg-rr37.3%
expm1-def52.3%
expm1-log1p84.3%
associate-/l*84.3%
*-commutative84.3%
associate-*l/84.3%
Simplified84.3%
Final simplification77.3%
(FPCore (d h l M D)
:precision binary64
(if (<= d -2.5e-164)
(*
(/ (sqrt (/ d h)) (sqrt (/ l d)))
(- 1.0 (* (/ h l) (* 0.5 (pow (* 0.5 (* M (/ D d))) 2.0)))))
(if (<= d 8e-308)
(-
(* (sqrt (/ h (pow l 3.0))) (* (/ (* D D) (/ (/ d M) M)) 0.125))
(* d (sqrt (/ 1.0 (* l h)))))
(*
(/ d (* (sqrt h) (sqrt l)))
(- 1.0 (* (pow (/ (* D (* 0.5 M)) d) 2.0) (/ 0.5 (/ l h))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -2.5e-164) {
tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0 - ((h / l) * (0.5 * pow((0.5 * (M * (D / d))), 2.0))));
} else if (d <= 8e-308) {
tmp = (sqrt((h / pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * sqrt((1.0 / (l * h))));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / 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 <= (-2.5d-164)) then
tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0d0 - ((h / l) * (0.5d0 * ((0.5d0 * (m * (d_1 / d))) ** 2.0d0))))
else if (d <= 8d-308) then
tmp = (sqrt((h / (l ** 3.0d0))) * (((d_1 * d_1) / ((d / m) / m)) * 0.125d0)) - (d * sqrt((1.0d0 / (l * h))))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 - ((((d_1 * (0.5d0 * m)) / d) ** 2.0d0) * (0.5d0 / (l / 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 <= -2.5e-164) {
tmp = (Math.sqrt((d / h)) / Math.sqrt((l / d))) * (1.0 - ((h / l) * (0.5 * Math.pow((0.5 * (M * (D / d))), 2.0))));
} else if (d <= 8e-308) {
tmp = (Math.sqrt((h / Math.pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * Math.sqrt((1.0 / (l * h))));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 - (Math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -2.5e-164: tmp = (math.sqrt((d / h)) / math.sqrt((l / d))) * (1.0 - ((h / l) * (0.5 * math.pow((0.5 * (M * (D / d))), 2.0)))) elif d <= 8e-308: tmp = (math.sqrt((h / math.pow(l, 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * math.sqrt((1.0 / (l * h)))) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 - (math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -2.5e-164) tmp = Float64(Float64(sqrt(Float64(d / h)) / sqrt(Float64(l / d))) * Float64(1.0 - Float64(Float64(h / l) * Float64(0.5 * (Float64(0.5 * Float64(M * Float64(D / d))) ^ 2.0))))); elseif (d <= 8e-308) tmp = Float64(Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(Float64(Float64(D * D) / Float64(Float64(d / M) / M)) * 0.125)) - Float64(d * sqrt(Float64(1.0 / Float64(l * h))))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 - Float64((Float64(Float64(D * Float64(0.5 * M)) / d) ^ 2.0) * Float64(0.5 / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -2.5e-164) tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0 - ((h / l) * (0.5 * ((0.5 * (M * (D / d))) ^ 2.0)))); elseif (d <= 8e-308) tmp = (sqrt((h / (l ^ 3.0))) * (((D * D) / ((d / M) / M)) * 0.125)) - (d * sqrt((1.0 / (l * h)))); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - ((((D * (0.5 * M)) / d) ^ 2.0) * (0.5 / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -2.5e-164], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(0.5 * N[Power[N[(0.5 * N[(M * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8e-308], N[(N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] / N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision] * 0.125), $MachinePrecision]), $MachinePrecision] - N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -2.5 \cdot 10^{-164}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}} \cdot \left(1 - \frac{h}{\ell} \cdot \left(0.5 \cdot {\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}\right)\right)\\
\mathbf{elif}\;d \leq 8 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(\frac{D \cdot D}{\frac{\frac{d}{M}}{M}} \cdot 0.125\right) - d \cdot \sqrt{\frac{1}{\ell \cdot h}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 - {\left(\frac{D \cdot \left(0.5 \cdot M\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\
\end{array}
\end{array}
if d < -2.49999999999999981e-164Initial program 73.0%
metadata-eval73.0%
unpow1/273.0%
metadata-eval73.0%
unpow1/273.0%
*-commutative73.0%
associate-*l*73.0%
times-frac73.0%
metadata-eval73.0%
Simplified73.0%
clear-num73.0%
sqrt-div73.0%
metadata-eval73.0%
Applied egg-rr73.0%
pow173.0%
un-div-inv73.1%
div-inv73.1%
metadata-eval73.1%
associate-*l*73.1%
Applied egg-rr73.1%
unpow173.1%
*-commutative73.1%
*-commutative73.1%
associate-*l*73.1%
*-commutative73.1%
associate-*l*73.1%
Simplified73.1%
if -2.49999999999999981e-164 < d < 8.00000000000000026e-308Initial program 30.3%
metadata-eval30.3%
unpow1/230.3%
metadata-eval30.3%
unpow1/230.3%
*-commutative30.3%
associate-*l*30.3%
times-frac30.4%
metadata-eval30.4%
Simplified30.4%
clear-num30.4%
sqrt-div30.4%
metadata-eval30.4%
Applied egg-rr30.4%
Taylor expanded in d around -inf 47.3%
mul-1-neg47.3%
*-commutative47.3%
unsub-neg47.3%
*-commutative47.3%
*-commutative47.3%
associate-*l*47.3%
associate-/l*47.1%
unpow247.1%
unpow247.1%
associate-/r*53.9%
Simplified53.9%
if 8.00000000000000026e-308 < d Initial program 68.7%
metadata-eval68.7%
unpow1/268.7%
metadata-eval68.7%
unpow1/268.7%
*-commutative68.7%
associate-*l*68.7%
times-frac68.8%
metadata-eval68.8%
Simplified68.8%
expm1-log1p-u42.5%
expm1-udef30.7%
Applied egg-rr37.3%
expm1-def52.3%
expm1-log1p84.3%
associate-/l*84.3%
*-commutative84.3%
associate-*l/84.3%
Simplified84.3%
Final simplification76.9%
(FPCore (d h l M D)
:precision binary64
(if (<= d -6.5e+161)
(* d (- (sqrt (/ (/ 1.0 h) l))))
(if (<= d -6.6e-301)
(*
(* (sqrt (/ d h)) (/ 1.0 (sqrt (/ l d))))
(- 1.0 (* (/ 0.125 l) (* (* (/ (* D D) d) (* M M)) (/ h d)))))
(*
(/ d (* (sqrt h) (sqrt l)))
(- 1.0 (* (pow (* D (* 0.5 (/ M d))) 2.0) (* h (/ 0.5 l))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -6.5e+161) {
tmp = d * -sqrt(((1.0 / h) / l));
} else if (d <= -6.6e-301) {
tmp = (sqrt((d / h)) * (1.0 / sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d))));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (pow((D * (0.5 * (M / d))), 2.0) * (h * (0.5 / l))));
}
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 <= (-6.5d+161)) then
tmp = d * -sqrt(((1.0d0 / h) / l))
else if (d <= (-6.6d-301)) then
tmp = (sqrt((d / h)) * (1.0d0 / sqrt((l / d)))) * (1.0d0 - ((0.125d0 / l) * ((((d_1 * d_1) / d) * (m * m)) * (h / d))))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 - (((d_1 * (0.5d0 * (m / d))) ** 2.0d0) * (h * (0.5d0 / l))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -6.5e+161) {
tmp = d * -Math.sqrt(((1.0 / h) / l));
} else if (d <= -6.6e-301) {
tmp = (Math.sqrt((d / h)) * (1.0 / Math.sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d))));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 - (Math.pow((D * (0.5 * (M / d))), 2.0) * (h * (0.5 / l))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -6.5e+161: tmp = d * -math.sqrt(((1.0 / h) / l)) elif d <= -6.6e-301: tmp = (math.sqrt((d / h)) * (1.0 / math.sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d)))) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 - (math.pow((D * (0.5 * (M / d))), 2.0) * (h * (0.5 / l)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -6.5e+161) tmp = Float64(d * Float64(-sqrt(Float64(Float64(1.0 / h) / l)))); elseif (d <= -6.6e-301) tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(1.0 / sqrt(Float64(l / d)))) * Float64(1.0 - Float64(Float64(0.125 / l) * Float64(Float64(Float64(Float64(D * D) / d) * Float64(M * M)) * Float64(h / d))))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 - Float64((Float64(D * Float64(0.5 * Float64(M / d))) ^ 2.0) * Float64(h * Float64(0.5 / l))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -6.5e+161) tmp = d * -sqrt(((1.0 / h) / l)); elseif (d <= -6.6e-301) tmp = (sqrt((d / h)) * (1.0 / sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d)))); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (((D * (0.5 * (M / d))) ^ 2.0) * (h * (0.5 / l)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -6.5e+161], N[(d * (-N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[d, -6.6e-301], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(0.125 / l), $MachinePrecision] * N[(N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * N[(M * M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(D * N[(0.5 * N[(M / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * N[(0.5 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -6.5 \cdot 10^{+161}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\
\mathbf{elif}\;d \leq -6.6 \cdot 10^{-301}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 - \frac{0.125}{\ell} \cdot \left(\left(\frac{D \cdot D}{d} \cdot \left(M \cdot M\right)\right) \cdot \frac{h}{d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 - {\left(D \cdot \left(0.5 \cdot \frac{M}{d}\right)\right)}^{2} \cdot \left(h \cdot \frac{0.5}{\ell}\right)\right)\\
\end{array}
\end{array}
if d < -6.5e161Initial program 63.6%
metadata-eval63.6%
unpow1/263.6%
metadata-eval63.6%
unpow1/263.6%
*-commutative63.6%
associate-*l*63.6%
times-frac63.8%
metadata-eval63.8%
Simplified63.8%
clear-num63.8%
sqrt-div63.7%
metadata-eval63.7%
Applied egg-rr63.7%
Taylor expanded in d around -inf 71.6%
mul-1-neg71.6%
associate-/l/71.6%
Simplified71.6%
if -6.5e161 < d < -6.6000000000000001e-301Initial program 66.3%
metadata-eval66.3%
unpow1/266.3%
metadata-eval66.3%
unpow1/266.3%
*-commutative66.3%
associate-*l*66.3%
times-frac66.4%
metadata-eval66.4%
Simplified66.4%
clear-num66.4%
sqrt-div66.3%
metadata-eval66.3%
Applied egg-rr66.3%
Taylor expanded in M around 0 48.7%
associate-*r/48.7%
times-frac50.1%
associate-*r*50.1%
unpow250.1%
times-frac60.3%
associate-/l*59.0%
associate-/r/60.3%
unpow260.3%
unpow260.3%
Simplified60.3%
if -6.6000000000000001e-301 < d Initial program 65.9%
metadata-eval65.9%
unpow1/265.9%
metadata-eval65.9%
unpow1/265.9%
*-commutative65.9%
associate-*l*65.9%
times-frac66.0%
metadata-eval66.0%
Simplified66.0%
expm1-log1p-u40.7%
expm1-udef29.5%
Applied egg-rr35.8%
expm1-def50.2%
expm1-log1p80.9%
*-commutative80.9%
associate-*r*80.9%
*-commutative80.9%
associate-*r/80.8%
metadata-eval80.8%
times-frac80.8%
*-rgt-identity80.8%
associate-*l/80.2%
*-commutative80.2%
*-lft-identity80.2%
*-commutative80.2%
times-frac80.2%
metadata-eval80.2%
associate-/l*80.2%
associate-/r/80.2%
Simplified80.2%
Final simplification73.5%
(FPCore (d h l M D)
:precision binary64
(if (<= d -3.25e+161)
(* d (- (sqrt (/ (/ 1.0 h) l))))
(if (<= d -6.6e-301)
(*
(* (sqrt (/ d h)) (/ 1.0 (sqrt (/ l d))))
(- 1.0 (* (/ 0.125 l) (* (* (/ (* D D) d) (* M M)) (/ h d)))))
(*
(/ d (* (sqrt h) (sqrt l)))
(- 1.0 (* (pow (/ (* D (* 0.5 M)) d) 2.0) (/ 0.5 (/ l h))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -3.25e+161) {
tmp = d * -sqrt(((1.0 / h) / l));
} else if (d <= -6.6e-301) {
tmp = (sqrt((d / h)) * (1.0 / sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d))));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / 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.25d+161)) then
tmp = d * -sqrt(((1.0d0 / h) / l))
else if (d <= (-6.6d-301)) then
tmp = (sqrt((d / h)) * (1.0d0 / sqrt((l / d)))) * (1.0d0 - ((0.125d0 / l) * ((((d_1 * d_1) / d) * (m * m)) * (h / d))))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 - ((((d_1 * (0.5d0 * m)) / d) ** 2.0d0) * (0.5d0 / (l / 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.25e+161) {
tmp = d * -Math.sqrt(((1.0 / h) / l));
} else if (d <= -6.6e-301) {
tmp = (Math.sqrt((d / h)) * (1.0 / Math.sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d))));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 - (Math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -3.25e+161: tmp = d * -math.sqrt(((1.0 / h) / l)) elif d <= -6.6e-301: tmp = (math.sqrt((d / h)) * (1.0 / math.sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d)))) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 - (math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -3.25e+161) tmp = Float64(d * Float64(-sqrt(Float64(Float64(1.0 / h) / l)))); elseif (d <= -6.6e-301) tmp = Float64(Float64(sqrt(Float64(d / h)) * Float64(1.0 / sqrt(Float64(l / d)))) * Float64(1.0 - Float64(Float64(0.125 / l) * Float64(Float64(Float64(Float64(D * D) / d) * Float64(M * M)) * Float64(h / d))))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 - Float64((Float64(Float64(D * Float64(0.5 * M)) / d) ^ 2.0) * Float64(0.5 / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -3.25e+161) tmp = d * -sqrt(((1.0 / h) / l)); elseif (d <= -6.6e-301) tmp = (sqrt((d / h)) * (1.0 / sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d)))); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - ((((D * (0.5 * M)) / d) ^ 2.0) * (0.5 / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -3.25e+161], N[(d * (-N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[d, -6.6e-301], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(0.125 / l), $MachinePrecision] * N[(N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * N[(M * M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -3.25 \cdot 10^{+161}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\
\mathbf{elif}\;d \leq -6.6 \cdot 10^{-301}:\\
\;\;\;\;\left(\sqrt{\frac{d}{h}} \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 - \frac{0.125}{\ell} \cdot \left(\left(\frac{D \cdot D}{d} \cdot \left(M \cdot M\right)\right) \cdot \frac{h}{d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 - {\left(\frac{D \cdot \left(0.5 \cdot M\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\
\end{array}
\end{array}
if d < -3.25e161Initial program 63.6%
metadata-eval63.6%
unpow1/263.6%
metadata-eval63.6%
unpow1/263.6%
*-commutative63.6%
associate-*l*63.6%
times-frac63.8%
metadata-eval63.8%
Simplified63.8%
clear-num63.8%
sqrt-div63.7%
metadata-eval63.7%
Applied egg-rr63.7%
Taylor expanded in d around -inf 71.6%
mul-1-neg71.6%
associate-/l/71.6%
Simplified71.6%
if -3.25e161 < d < -6.6000000000000001e-301Initial program 66.3%
metadata-eval66.3%
unpow1/266.3%
metadata-eval66.3%
unpow1/266.3%
*-commutative66.3%
associate-*l*66.3%
times-frac66.4%
metadata-eval66.4%
Simplified66.4%
clear-num66.4%
sqrt-div66.3%
metadata-eval66.3%
Applied egg-rr66.3%
Taylor expanded in M around 0 48.7%
associate-*r/48.7%
times-frac50.1%
associate-*r*50.1%
unpow250.1%
times-frac60.3%
associate-/l*59.0%
associate-/r/60.3%
unpow260.3%
unpow260.3%
Simplified60.3%
if -6.6000000000000001e-301 < d Initial program 65.9%
metadata-eval65.9%
unpow1/265.9%
metadata-eval65.9%
unpow1/265.9%
*-commutative65.9%
associate-*l*65.9%
times-frac66.0%
metadata-eval66.0%
Simplified66.0%
expm1-log1p-u40.7%
expm1-udef29.5%
Applied egg-rr35.8%
expm1-def50.2%
expm1-log1p80.9%
associate-/l*80.9%
*-commutative80.9%
associate-*l/80.8%
Simplified80.8%
Final simplification73.8%
(FPCore (d h l M D)
:precision binary64
(if (<= l 2e-311)
(*
(*
(sqrt (/ d l))
(- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l)))))
(sqrt (/ d h)))
(*
(/ d (* (sqrt h) (sqrt l)))
(- 1.0 (* (pow (/ (* D (* 0.5 M)) d) 2.0) (/ 0.5 (/ l h)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 2e-311) {
tmp = (sqrt((d / l)) * (1.0 - (0.5 * (pow(((M / 2.0) * (D / d)), 2.0) * (h / l))))) * sqrt((d / h));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / 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 <= 2d-311) then
tmp = (sqrt((d / l)) * (1.0d0 - (0.5d0 * ((((m / 2.0d0) * (d_1 / d)) ** 2.0d0) * (h / l))))) * sqrt((d / h))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 - ((((d_1 * (0.5d0 * m)) / d) ** 2.0d0) * (0.5d0 / (l / 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 <= 2e-311) {
tmp = (Math.sqrt((d / l)) * (1.0 - (0.5 * (Math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l))))) * Math.sqrt((d / h));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 - (Math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 2e-311: tmp = (math.sqrt((d / l)) * (1.0 - (0.5 * (math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l))))) * math.sqrt((d / h)) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 - (math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 2e-311) tmp = Float64(Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(0.5 * Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(h / l))))) * sqrt(Float64(d / h))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 - Float64((Float64(Float64(D * Float64(0.5 * M)) / d) ^ 2.0) * Float64(0.5 / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 2e-311) tmp = (sqrt((d / l)) * (1.0 - (0.5 * ((((M / 2.0) * (D / d)) ^ 2.0) * (h / l))))) * sqrt((d / h)); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - ((((D * (0.5 * M)) / d) ^ 2.0) * (0.5 / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 2e-311], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.5 * N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2 \cdot 10^{-311}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left({\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \frac{h}{\ell}\right)\right)\right) \cdot \sqrt{\frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 - {\left(\frac{D \cdot \left(0.5 \cdot M\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\
\end{array}
\end{array}
if l < 1.9999999999999e-311Initial program 63.0%
associate-*l*62.3%
metadata-eval62.3%
unpow1/262.3%
metadata-eval62.3%
unpow1/262.3%
associate-*l*62.3%
metadata-eval62.3%
times-frac62.3%
Simplified62.3%
if 1.9999999999999e-311 < l Initial program 67.8%
metadata-eval67.8%
unpow1/267.8%
metadata-eval67.8%
unpow1/267.8%
*-commutative67.8%
associate-*l*67.8%
times-frac67.9%
metadata-eval67.9%
Simplified67.9%
expm1-log1p-u41.9%
expm1-udef30.3%
Applied egg-rr36.8%
expm1-def51.6%
expm1-log1p83.2%
associate-/l*83.2%
*-commutative83.2%
associate-*l/83.1%
Simplified83.1%
Final simplification73.8%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1e-309)
(*
(* (sqrt (/ d l)) (sqrt (/ d h)))
(- 1.0 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (* 0.5 (/ h l)))))
(*
(/ d (* (sqrt h) (sqrt l)))
(- 1.0 (* (pow (/ (* D (* 0.5 M)) d) 2.0) (/ 0.5 (/ l h)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1e-309) {
tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (pow(((M / 2.0) * (D / d)), 2.0) * (0.5 * (h / l))));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / 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 <= (-1d-309)) then
tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - ((((m / 2.0d0) * (d_1 / d)) ** 2.0d0) * (0.5d0 * (h / l))))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 - ((((d_1 * (0.5d0 * m)) / d) ** 2.0d0) * (0.5d0 / (l / 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 <= -1e-309) {
tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - (Math.pow(((M / 2.0) * (D / d)), 2.0) * (0.5 * (h / l))));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 - (Math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1e-309: tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - (math.pow(((M / 2.0) * (D / d)), 2.0) * (0.5 * (h / l)))) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 - (math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1e-309) tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64((Float64(Float64(M / 2.0) * Float64(D / d)) ^ 2.0) * Float64(0.5 * Float64(h / l))))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 - Float64((Float64(Float64(D * Float64(0.5 * M)) / d) ^ 2.0) * Float64(0.5 / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1e-309) tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((M / 2.0) * (D / d)) ^ 2.0) * (0.5 * (h / l)))); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - ((((D * (0.5 * M)) / d) ^ 2.0) * (0.5 / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1e-309], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(N[(M / 2.0), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - {\left(\frac{M}{2} \cdot \frac{D}{d}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 - {\left(\frac{D \cdot \left(0.5 \cdot M\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\
\end{array}
\end{array}
if l < -1.000000000000002e-309Initial program 63.0%
metadata-eval63.0%
unpow1/263.0%
metadata-eval63.0%
unpow1/263.0%
*-commutative63.0%
associate-*l*63.0%
times-frac63.1%
metadata-eval63.1%
Simplified63.1%
if -1.000000000000002e-309 < l Initial program 67.8%
metadata-eval67.8%
unpow1/267.8%
metadata-eval67.8%
unpow1/267.8%
*-commutative67.8%
associate-*l*67.8%
times-frac67.9%
metadata-eval67.9%
Simplified67.9%
expm1-log1p-u41.9%
expm1-udef30.3%
Applied egg-rr36.8%
expm1-def51.6%
expm1-log1p83.2%
associate-/l*83.2%
*-commutative83.2%
associate-*l/83.1%
Simplified83.1%
Final simplification74.2%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1e-309)
(*
(/ (sqrt (/ d h)) (sqrt (/ l d)))
(- 1.0 (* (/ h l) (* 0.5 (pow (* 0.5 (* M (/ D d))) 2.0)))))
(*
(/ d (* (sqrt h) (sqrt l)))
(- 1.0 (* (pow (/ (* D (* 0.5 M)) d) 2.0) (/ 0.5 (/ l h)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1e-309) {
tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0 - ((h / l) * (0.5 * pow((0.5 * (M * (D / d))), 2.0))));
} else {
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - (pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / 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 <= (-1d-309)) then
tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0d0 - ((h / l) * (0.5d0 * ((0.5d0 * (m * (d_1 / d))) ** 2.0d0))))
else
tmp = (d / (sqrt(h) * sqrt(l))) * (1.0d0 - ((((d_1 * (0.5d0 * m)) / d) ** 2.0d0) * (0.5d0 / (l / 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 <= -1e-309) {
tmp = (Math.sqrt((d / h)) / Math.sqrt((l / d))) * (1.0 - ((h / l) * (0.5 * Math.pow((0.5 * (M * (D / d))), 2.0))));
} else {
tmp = (d / (Math.sqrt(h) * Math.sqrt(l))) * (1.0 - (Math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1e-309: tmp = (math.sqrt((d / h)) / math.sqrt((l / d))) * (1.0 - ((h / l) * (0.5 * math.pow((0.5 * (M * (D / d))), 2.0)))) else: tmp = (d / (math.sqrt(h) * math.sqrt(l))) * (1.0 - (math.pow(((D * (0.5 * M)) / d), 2.0) * (0.5 / (l / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1e-309) tmp = Float64(Float64(sqrt(Float64(d / h)) / sqrt(Float64(l / d))) * Float64(1.0 - Float64(Float64(h / l) * Float64(0.5 * (Float64(0.5 * Float64(M * Float64(D / d))) ^ 2.0))))); else tmp = Float64(Float64(d / Float64(sqrt(h) * sqrt(l))) * Float64(1.0 - Float64((Float64(Float64(D * Float64(0.5 * M)) / d) ^ 2.0) * Float64(0.5 / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1e-309) tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0 - ((h / l) * (0.5 * ((0.5 * (M * (D / d))) ^ 2.0)))); else tmp = (d / (sqrt(h) * sqrt(l))) * (1.0 - ((((D * (0.5 * M)) / d) ^ 2.0) * (0.5 / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1e-309], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(h / l), $MachinePrecision] * N[(0.5 * N[Power[N[(0.5 * N[(M * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(d / N[(N[Sqrt[h], $MachinePrecision] * N[Sqrt[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[Power[N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}} \cdot \left(1 - \frac{h}{\ell} \cdot \left(0.5 \cdot {\left(0.5 \cdot \left(M \cdot \frac{D}{d}\right)\right)}^{2}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{h} \cdot \sqrt{\ell}} \cdot \left(1 - {\left(\frac{D \cdot \left(0.5 \cdot M\right)}{d}\right)}^{2} \cdot \frac{0.5}{\frac{\ell}{h}}\right)\\
\end{array}
\end{array}
if l < -1.000000000000002e-309Initial program 63.0%
metadata-eval63.0%
unpow1/263.0%
metadata-eval63.0%
unpow1/263.0%
*-commutative63.0%
associate-*l*63.0%
times-frac63.1%
metadata-eval63.1%
Simplified63.1%
clear-num63.1%
sqrt-div63.1%
metadata-eval63.1%
Applied egg-rr63.1%
pow163.1%
un-div-inv63.1%
div-inv63.1%
metadata-eval63.1%
associate-*l*63.1%
Applied egg-rr63.1%
unpow163.1%
*-commutative63.1%
*-commutative63.1%
associate-*l*63.1%
*-commutative63.1%
associate-*l*63.1%
Simplified63.1%
if -1.000000000000002e-309 < l Initial program 67.8%
metadata-eval67.8%
unpow1/267.8%
metadata-eval67.8%
unpow1/267.8%
*-commutative67.8%
associate-*l*67.8%
times-frac67.9%
metadata-eval67.9%
Simplified67.9%
expm1-log1p-u41.9%
expm1-udef30.3%
Applied egg-rr36.8%
expm1-def51.6%
expm1-log1p83.2%
associate-/l*83.2%
*-commutative83.2%
associate-*l/83.1%
Simplified83.1%
Final simplification74.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ d l)))
(t_1 (sqrt (/ d h)))
(t_2
(*
(* t_0 t_1)
(- 1.0 (/ (* (* (* D D) 0.125) (* M (* h M))) (* l (* d d)))))))
(if (<= d -2.7e+150)
(* d (- (sqrt (/ (/ 1.0 h) l))))
(if (<= d -9e-111)
t_2
(if (<= d -6.6e-301)
(* t_1 (* t_0 (* -0.125 (/ (* D (* (/ h d) (/ M (/ d M)))) (/ l D)))))
(if (<= d 1.26e-127)
(* (/ (sqrt h) (pow l 1.5)) (/ (* (* D D) -0.125) (/ (/ d M) M)))
(if (<= d 1e+85) t_2 (* d (* (pow h -0.5) (pow l -0.5))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((d / l));
double t_1 = sqrt((d / h));
double t_2 = (t_0 * t_1) * (1.0 - ((((D * D) * 0.125) * (M * (h * M))) / (l * (d * d))));
double tmp;
if (d <= -2.7e+150) {
tmp = d * -sqrt(((1.0 / h) / l));
} else if (d <= -9e-111) {
tmp = t_2;
} else if (d <= -6.6e-301) {
tmp = t_1 * (t_0 * (-0.125 * ((D * ((h / d) * (M / (d / M)))) / (l / D))));
} else if (d <= 1.26e-127) {
tmp = (sqrt(h) / pow(l, 1.5)) * (((D * D) * -0.125) / ((d / M) / M));
} else if (d <= 1e+85) {
tmp = t_2;
} 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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = sqrt((d / l))
t_1 = sqrt((d / h))
t_2 = (t_0 * t_1) * (1.0d0 - ((((d_1 * d_1) * 0.125d0) * (m * (h * m))) / (l * (d * d))))
if (d <= (-2.7d+150)) then
tmp = d * -sqrt(((1.0d0 / h) / l))
else if (d <= (-9d-111)) then
tmp = t_2
else if (d <= (-6.6d-301)) then
tmp = t_1 * (t_0 * ((-0.125d0) * ((d_1 * ((h / d) * (m / (d / m)))) / (l / d_1))))
else if (d <= 1.26d-127) then
tmp = (sqrt(h) / (l ** 1.5d0)) * (((d_1 * d_1) * (-0.125d0)) / ((d / m) / m))
else if (d <= 1d+85) then
tmp = t_2
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 t_0 = Math.sqrt((d / l));
double t_1 = Math.sqrt((d / h));
double t_2 = (t_0 * t_1) * (1.0 - ((((D * D) * 0.125) * (M * (h * M))) / (l * (d * d))));
double tmp;
if (d <= -2.7e+150) {
tmp = d * -Math.sqrt(((1.0 / h) / l));
} else if (d <= -9e-111) {
tmp = t_2;
} else if (d <= -6.6e-301) {
tmp = t_1 * (t_0 * (-0.125 * ((D * ((h / d) * (M / (d / M)))) / (l / D))));
} else if (d <= 1.26e-127) {
tmp = (Math.sqrt(h) / Math.pow(l, 1.5)) * (((D * D) * -0.125) / ((d / M) / M));
} else if (d <= 1e+85) {
tmp = t_2;
} else {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((d / l)) t_1 = math.sqrt((d / h)) t_2 = (t_0 * t_1) * (1.0 - ((((D * D) * 0.125) * (M * (h * M))) / (l * (d * d)))) tmp = 0 if d <= -2.7e+150: tmp = d * -math.sqrt(((1.0 / h) / l)) elif d <= -9e-111: tmp = t_2 elif d <= -6.6e-301: tmp = t_1 * (t_0 * (-0.125 * ((D * ((h / d) * (M / (d / M)))) / (l / D)))) elif d <= 1.26e-127: tmp = (math.sqrt(h) / math.pow(l, 1.5)) * (((D * D) * -0.125) / ((d / M) / M)) elif d <= 1e+85: tmp = t_2 else: tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(d / l)) t_1 = sqrt(Float64(d / h)) t_2 = Float64(Float64(t_0 * t_1) * Float64(1.0 - Float64(Float64(Float64(Float64(D * D) * 0.125) * Float64(M * Float64(h * M))) / Float64(l * Float64(d * d))))) tmp = 0.0 if (d <= -2.7e+150) tmp = Float64(d * Float64(-sqrt(Float64(Float64(1.0 / h) / l)))); elseif (d <= -9e-111) tmp = t_2; elseif (d <= -6.6e-301) tmp = Float64(t_1 * Float64(t_0 * Float64(-0.125 * Float64(Float64(D * Float64(Float64(h / d) * Float64(M / Float64(d / M)))) / Float64(l / D))))); elseif (d <= 1.26e-127) tmp = Float64(Float64(sqrt(h) / (l ^ 1.5)) * Float64(Float64(Float64(D * D) * -0.125) / Float64(Float64(d / M) / M))); elseif (d <= 1e+85) tmp = t_2; else tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((d / l)); t_1 = sqrt((d / h)); t_2 = (t_0 * t_1) * (1.0 - ((((D * D) * 0.125) * (M * (h * M))) / (l * (d * d)))); tmp = 0.0; if (d <= -2.7e+150) tmp = d * -sqrt(((1.0 / h) / l)); elseif (d <= -9e-111) tmp = t_2; elseif (d <= -6.6e-301) tmp = t_1 * (t_0 * (-0.125 * ((D * ((h / d) * (M / (d / M)))) / (l / D)))); elseif (d <= 1.26e-127) tmp = (sqrt(h) / (l ^ 1.5)) * (((D * D) * -0.125) / ((d / M) / M)); elseif (d <= 1e+85) tmp = t_2; else tmp = d * ((h ^ -0.5) * (l ^ -0.5)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(t$95$0 * t$95$1), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(D * D), $MachinePrecision] * 0.125), $MachinePrecision] * N[(M * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -2.7e+150], N[(d * (-N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[d, -9e-111], t$95$2, If[LessEqual[d, -6.6e-301], N[(t$95$1 * N[(t$95$0 * N[(-0.125 * N[(N[(D * N[(N[(h / d), $MachinePrecision] * N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.26e-127], N[(N[(N[Sqrt[h], $MachinePrecision] / N[Power[l, 1.5], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision] / N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1e+85], t$95$2, N[(d * N[(N[Power[h, -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell}}\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := \left(t_0 \cdot t_1\right) \cdot \left(1 - \frac{\left(\left(D \cdot D\right) \cdot 0.125\right) \cdot \left(M \cdot \left(h \cdot M\right)\right)}{\ell \cdot \left(d \cdot d\right)}\right)\\
\mathbf{if}\;d \leq -2.7 \cdot 10^{+150}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\
\mathbf{elif}\;d \leq -9 \cdot 10^{-111}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d \leq -6.6 \cdot 10^{-301}:\\
\;\;\;\;t_1 \cdot \left(t_0 \cdot \left(-0.125 \cdot \frac{D \cdot \left(\frac{h}{d} \cdot \frac{M}{\frac{d}{M}}\right)}{\frac{\ell}{D}}\right)\right)\\
\mathbf{elif}\;d \leq 1.26 \cdot 10^{-127}:\\
\;\;\;\;\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot \frac{\left(D \cdot D\right) \cdot -0.125}{\frac{\frac{d}{M}}{M}}\\
\mathbf{elif}\;d \leq 10^{+85}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if d < -2.70000000000000008e150Initial program 65.3%
metadata-eval65.3%
unpow1/265.3%
metadata-eval65.3%
unpow1/265.3%
*-commutative65.3%
associate-*l*65.3%
times-frac65.4%
metadata-eval65.4%
Simplified65.4%
clear-num65.5%
sqrt-div65.3%
metadata-eval65.3%
Applied egg-rr65.3%
Taylor expanded in d around -inf 68.4%
mul-1-neg68.4%
associate-/l/68.4%
Simplified68.4%
if -2.70000000000000008e150 < d < -8.99999999999999987e-111 or 1.2600000000000001e-127 < d < 1e85Initial program 79.3%
metadata-eval79.3%
unpow1/279.3%
metadata-eval79.3%
unpow1/279.3%
*-commutative79.3%
associate-*l*79.3%
times-frac79.4%
metadata-eval79.4%
Simplified79.4%
Taylor expanded in M around 0 71.4%
associate-*r/71.4%
associate-*r*71.4%
unpow271.4%
unpow271.4%
associate-*l*75.3%
unpow275.3%
Simplified75.3%
if -8.99999999999999987e-111 < d < -6.6000000000000001e-301Initial program 48.8%
associate-*l*48.9%
metadata-eval48.9%
unpow1/248.9%
metadata-eval48.9%
unpow1/248.9%
sub-neg48.9%
+-commutative48.9%
*-commutative48.9%
distribute-rgt-neg-in48.9%
fma-def48.9%
Simplified48.8%
Taylor expanded in h around inf 28.8%
*-commutative28.8%
times-frac28.8%
unpow228.8%
associate-/l*31.8%
unpow231.8%
times-frac35.3%
unpow235.3%
Simplified35.3%
associate-*l/35.3%
associate-/l*40.8%
Applied egg-rr40.8%
if -6.6000000000000001e-301 < d < 1.2600000000000001e-127Initial program 48.6%
metadata-eval48.6%
unpow1/248.6%
metadata-eval48.6%
unpow1/248.6%
*-commutative48.6%
associate-*l*48.6%
times-frac48.7%
metadata-eval48.7%
Simplified48.7%
clear-num48.7%
sqrt-div48.8%
metadata-eval48.8%
Applied egg-rr48.8%
Taylor expanded in d around 0 44.8%
associate-*r*44.8%
*-commutative44.8%
associate-/l*44.7%
associate-*r/44.7%
unpow244.7%
unpow244.7%
associate-/r*48.9%
Simplified48.9%
sqrt-div51.1%
Applied egg-rr51.1%
sqr-pow51.1%
rem-sqrt-square53.2%
sqr-pow53.2%
fabs-sqr53.2%
sqr-pow53.2%
metadata-eval53.2%
Simplified53.2%
if 1e85 < d Initial program 72.1%
metadata-eval72.1%
unpow1/272.1%
metadata-eval72.1%
unpow1/272.1%
*-commutative72.1%
associate-*l*72.1%
times-frac72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in d around inf 76.5%
*-commutative76.5%
add-cbrt-cube58.4%
expm1-log1p-u58.0%
expm1-udef48.9%
add-cbrt-cube56.6%
*-commutative56.6%
associate-/r*56.6%
Applied egg-rr56.6%
expm1-def76.2%
expm1-log1p77.4%
associate-/l/76.5%
unpow-176.5%
sqr-pow76.6%
rem-sqrt-square76.6%
sqr-pow76.5%
fabs-sqr76.5%
sqr-pow76.6%
metadata-eval76.6%
Simplified76.6%
unpow-prod-down81.6%
Applied egg-rr81.6%
Final simplification66.8%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ d h))))
(if (<= d -1.45e+158)
(* d (- (sqrt (/ (/ 1.0 h) l))))
(if (<= d -6.6e-301)
(*
(* t_0 (/ 1.0 (sqrt (/ l d))))
(- 1.0 (* (/ 0.125 l) (* (* (/ (* D D) d) (* M M)) (/ h d)))))
(if (<= d 7.2e-128)
(* (/ (sqrt h) (pow l 1.5)) (/ (* (* D D) -0.125) (/ (/ d M) M)))
(if (<= d 2.3e+90)
(*
(* (sqrt (/ d l)) t_0)
(- 1.0 (/ (* (* (* D D) 0.125) (* M (* h M))) (* l (* d d)))))
(* d (* (pow h -0.5) (pow l -0.5)))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((d / h));
double tmp;
if (d <= -1.45e+158) {
tmp = d * -sqrt(((1.0 / h) / l));
} else if (d <= -6.6e-301) {
tmp = (t_0 * (1.0 / sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d))));
} else if (d <= 7.2e-128) {
tmp = (sqrt(h) / pow(l, 1.5)) * (((D * D) * -0.125) / ((d / M) / M));
} else if (d <= 2.3e+90) {
tmp = (sqrt((d / l)) * t_0) * (1.0 - ((((D * D) * 0.125) * (M * (h * M))) / (l * (d * d))));
} 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) :: t_0
real(8) :: tmp
t_0 = sqrt((d / h))
if (d <= (-1.45d+158)) then
tmp = d * -sqrt(((1.0d0 / h) / l))
else if (d <= (-6.6d-301)) then
tmp = (t_0 * (1.0d0 / sqrt((l / d)))) * (1.0d0 - ((0.125d0 / l) * ((((d_1 * d_1) / d) * (m * m)) * (h / d))))
else if (d <= 7.2d-128) then
tmp = (sqrt(h) / (l ** 1.5d0)) * (((d_1 * d_1) * (-0.125d0)) / ((d / m) / m))
else if (d <= 2.3d+90) then
tmp = (sqrt((d / l)) * t_0) * (1.0d0 - ((((d_1 * d_1) * 0.125d0) * (m * (h * m))) / (l * (d * d))))
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 t_0 = Math.sqrt((d / h));
double tmp;
if (d <= -1.45e+158) {
tmp = d * -Math.sqrt(((1.0 / h) / l));
} else if (d <= -6.6e-301) {
tmp = (t_0 * (1.0 / Math.sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d))));
} else if (d <= 7.2e-128) {
tmp = (Math.sqrt(h) / Math.pow(l, 1.5)) * (((D * D) * -0.125) / ((d / M) / M));
} else if (d <= 2.3e+90) {
tmp = (Math.sqrt((d / l)) * t_0) * (1.0 - ((((D * D) * 0.125) * (M * (h * M))) / (l * (d * d))));
} else {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((d / h)) tmp = 0 if d <= -1.45e+158: tmp = d * -math.sqrt(((1.0 / h) / l)) elif d <= -6.6e-301: tmp = (t_0 * (1.0 / math.sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d)))) elif d <= 7.2e-128: tmp = (math.sqrt(h) / math.pow(l, 1.5)) * (((D * D) * -0.125) / ((d / M) / M)) elif d <= 2.3e+90: tmp = (math.sqrt((d / l)) * t_0) * (1.0 - ((((D * D) * 0.125) * (M * (h * M))) / (l * (d * d)))) else: tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(d / h)) tmp = 0.0 if (d <= -1.45e+158) tmp = Float64(d * Float64(-sqrt(Float64(Float64(1.0 / h) / l)))); elseif (d <= -6.6e-301) tmp = Float64(Float64(t_0 * Float64(1.0 / sqrt(Float64(l / d)))) * Float64(1.0 - Float64(Float64(0.125 / l) * Float64(Float64(Float64(Float64(D * D) / d) * Float64(M * M)) * Float64(h / d))))); elseif (d <= 7.2e-128) tmp = Float64(Float64(sqrt(h) / (l ^ 1.5)) * Float64(Float64(Float64(D * D) * -0.125) / Float64(Float64(d / M) / M))); elseif (d <= 2.3e+90) tmp = Float64(Float64(sqrt(Float64(d / l)) * t_0) * Float64(1.0 - Float64(Float64(Float64(Float64(D * D) * 0.125) * Float64(M * Float64(h * M))) / Float64(l * Float64(d * d))))); else tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((d / h)); tmp = 0.0; if (d <= -1.45e+158) tmp = d * -sqrt(((1.0 / h) / l)); elseif (d <= -6.6e-301) tmp = (t_0 * (1.0 / sqrt((l / d)))) * (1.0 - ((0.125 / l) * ((((D * D) / d) * (M * M)) * (h / d)))); elseif (d <= 7.2e-128) tmp = (sqrt(h) / (l ^ 1.5)) * (((D * D) * -0.125) / ((d / M) / M)); elseif (d <= 2.3e+90) tmp = (sqrt((d / l)) * t_0) * (1.0 - ((((D * D) * 0.125) * (M * (h * M))) / (l * (d * d)))); else tmp = d * ((h ^ -0.5) * (l ^ -0.5)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -1.45e+158], N[(d * (-N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[d, -6.6e-301], N[(N[(t$95$0 * N[(1.0 / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(0.125 / l), $MachinePrecision] * N[(N[(N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision] * N[(M * M), $MachinePrecision]), $MachinePrecision] * N[(h / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7.2e-128], N[(N[(N[Sqrt[h], $MachinePrecision] / N[Power[l, 1.5], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision] / N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.3e+90], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision] * N[(1.0 - N[(N[(N[(N[(D * D), $MachinePrecision] * 0.125), $MachinePrecision] * N[(M * N[(h * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
t_0 := \sqrt{\frac{d}{h}}\\
\mathbf{if}\;d \leq -1.45 \cdot 10^{+158}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\
\mathbf{elif}\;d \leq -6.6 \cdot 10^{-301}:\\
\;\;\;\;\left(t_0 \cdot \frac{1}{\sqrt{\frac{\ell}{d}}}\right) \cdot \left(1 - \frac{0.125}{\ell} \cdot \left(\left(\frac{D \cdot D}{d} \cdot \left(M \cdot M\right)\right) \cdot \frac{h}{d}\right)\right)\\
\mathbf{elif}\;d \leq 7.2 \cdot 10^{-128}:\\
\;\;\;\;\frac{\sqrt{h}}{{\ell}^{1.5}} \cdot \frac{\left(D \cdot D\right) \cdot -0.125}{\frac{\frac{d}{M}}{M}}\\
\mathbf{elif}\;d \leq 2.3 \cdot 10^{+90}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot t_0\right) \cdot \left(1 - \frac{\left(\left(D \cdot D\right) \cdot 0.125\right) \cdot \left(M \cdot \left(h \cdot M\right)\right)}{\ell \cdot \left(d \cdot d\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if d < -1.45000000000000012e158Initial program 63.6%
metadata-eval63.6%
unpow1/263.6%
metadata-eval63.6%
unpow1/263.6%
*-commutative63.6%
associate-*l*63.6%
times-frac63.8%
metadata-eval63.8%
Simplified63.8%
clear-num63.8%
sqrt-div63.7%
metadata-eval63.7%
Applied egg-rr63.7%
Taylor expanded in d around -inf 71.6%
mul-1-neg71.6%
associate-/l/71.6%
Simplified71.6%
if -1.45000000000000012e158 < d < -6.6000000000000001e-301Initial program 66.3%
metadata-eval66.3%
unpow1/266.3%
metadata-eval66.3%
unpow1/266.3%
*-commutative66.3%
associate-*l*66.3%
times-frac66.4%
metadata-eval66.4%
Simplified66.4%
clear-num66.4%
sqrt-div66.3%
metadata-eval66.3%
Applied egg-rr66.3%
Taylor expanded in M around 0 48.7%
associate-*r/48.7%
times-frac50.1%
associate-*r*50.1%
unpow250.1%
times-frac60.3%
associate-/l*59.0%
associate-/r/60.3%
unpow260.3%
unpow260.3%
Simplified60.3%
if -6.6000000000000001e-301 < d < 7.20000000000000049e-128Initial program 48.6%
metadata-eval48.6%
unpow1/248.6%
metadata-eval48.6%
unpow1/248.6%
*-commutative48.6%
associate-*l*48.6%
times-frac48.7%
metadata-eval48.7%
Simplified48.7%
clear-num48.7%
sqrt-div48.8%
metadata-eval48.8%
Applied egg-rr48.8%
Taylor expanded in d around 0 44.8%
associate-*r*44.8%
*-commutative44.8%
associate-/l*44.7%
associate-*r/44.7%
unpow244.7%
unpow244.7%
associate-/r*48.9%
Simplified48.9%
sqrt-div51.1%
Applied egg-rr51.1%
sqr-pow51.1%
rem-sqrt-square53.2%
sqr-pow53.2%
fabs-sqr53.2%
sqr-pow53.2%
metadata-eval53.2%
Simplified53.2%
if 7.20000000000000049e-128 < d < 2.3e90Initial program 76.1%
metadata-eval76.1%
unpow1/276.1%
metadata-eval76.1%
unpow1/276.1%
*-commutative76.1%
associate-*l*76.1%
times-frac76.2%
metadata-eval76.2%
Simplified76.2%
Taylor expanded in M around 0 69.4%
associate-*r/69.4%
associate-*r*69.4%
unpow269.4%
unpow269.4%
associate-*l*69.4%
unpow269.4%
Simplified69.4%
if 2.3e90 < d Initial program 72.1%
metadata-eval72.1%
unpow1/272.1%
metadata-eval72.1%
unpow1/272.1%
*-commutative72.1%
associate-*l*72.1%
times-frac72.1%
metadata-eval72.1%
Simplified72.1%
Taylor expanded in d around inf 76.5%
*-commutative76.5%
add-cbrt-cube58.4%
expm1-log1p-u58.0%
expm1-udef48.9%
add-cbrt-cube56.6%
*-commutative56.6%
associate-/r*56.6%
Applied egg-rr56.6%
expm1-def76.2%
expm1-log1p77.4%
associate-/l/76.5%
unpow-176.5%
sqr-pow76.6%
rem-sqrt-square76.6%
sqr-pow76.5%
fabs-sqr76.5%
sqr-pow76.6%
metadata-eval76.6%
Simplified76.6%
unpow-prod-down81.6%
Applied egg-rr81.6%
Final simplification67.1%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ d l))) (t_1 (sqrt (/ d h))) (t_2 (* t_0 t_1)))
(if (<= M 2.9e-198)
t_2
(if (<= M 4.6e-167)
(* d (* (pow h -0.5) (pow l -0.5)))
(if (<= M 1.05e+15)
t_2
(*
t_1
(* t_0 (* -0.125 (* (/ D (/ l D)) (* (/ h d) (/ (* M M) d)))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((d / l));
double t_1 = sqrt((d / h));
double t_2 = t_0 * t_1;
double tmp;
if (M <= 2.9e-198) {
tmp = t_2;
} else if (M <= 4.6e-167) {
tmp = d * (pow(h, -0.5) * pow(l, -0.5));
} else if (M <= 1.05e+15) {
tmp = t_2;
} else {
tmp = t_1 * (t_0 * (-0.125 * ((D / (l / D)) * ((h / d) * ((M * M) / d)))));
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = sqrt((d / l))
t_1 = sqrt((d / h))
t_2 = t_0 * t_1
if (m <= 2.9d-198) then
tmp = t_2
else if (m <= 4.6d-167) then
tmp = d * ((h ** (-0.5d0)) * (l ** (-0.5d0)))
else if (m <= 1.05d+15) then
tmp = t_2
else
tmp = t_1 * (t_0 * ((-0.125d0) * ((d_1 / (l / d_1)) * ((h / d) * ((m * m) / d)))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = Math.sqrt((d / l));
double t_1 = Math.sqrt((d / h));
double t_2 = t_0 * t_1;
double tmp;
if (M <= 2.9e-198) {
tmp = t_2;
} else if (M <= 4.6e-167) {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
} else if (M <= 1.05e+15) {
tmp = t_2;
} else {
tmp = t_1 * (t_0 * (-0.125 * ((D / (l / D)) * ((h / d) * ((M * M) / d)))));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((d / l)) t_1 = math.sqrt((d / h)) t_2 = t_0 * t_1 tmp = 0 if M <= 2.9e-198: tmp = t_2 elif M <= 4.6e-167: tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) elif M <= 1.05e+15: tmp = t_2 else: tmp = t_1 * (t_0 * (-0.125 * ((D / (l / D)) * ((h / d) * ((M * M) / d))))) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(d / l)) t_1 = sqrt(Float64(d / h)) t_2 = Float64(t_0 * t_1) tmp = 0.0 if (M <= 2.9e-198) tmp = t_2; elseif (M <= 4.6e-167) tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); elseif (M <= 1.05e+15) tmp = t_2; else tmp = Float64(t_1 * Float64(t_0 * Float64(-0.125 * Float64(Float64(D / Float64(l / D)) * Float64(Float64(h / d) * Float64(Float64(M * M) / d)))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((d / l)); t_1 = sqrt((d / h)); t_2 = t_0 * t_1; tmp = 0.0; if (M <= 2.9e-198) tmp = t_2; elseif (M <= 4.6e-167) tmp = d * ((h ^ -0.5) * (l ^ -0.5)); elseif (M <= 1.05e+15) tmp = t_2; else tmp = t_1 * (t_0 * (-0.125 * ((D / (l / D)) * ((h / d) * ((M * M) / d))))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * t$95$1), $MachinePrecision]}, If[LessEqual[M, 2.9e-198], t$95$2, If[LessEqual[M, 4.6e-167], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 1.05e+15], t$95$2, N[(t$95$1 * N[(t$95$0 * N[(-0.125 * N[(N[(D / N[(l / D), $MachinePrecision]), $MachinePrecision] * N[(N[(h / d), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell}}\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := t_0 \cdot t_1\\
\mathbf{if}\;M \leq 2.9 \cdot 10^{-198}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;M \leq 4.6 \cdot 10^{-167}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\mathbf{elif}\;M \leq 1.05 \cdot 10^{+15}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(t_0 \cdot \left(-0.125 \cdot \left(\frac{D}{\frac{\ell}{D}} \cdot \left(\frac{h}{d} \cdot \frac{M \cdot M}{d}\right)\right)\right)\right)\\
\end{array}
\end{array}
if M < 2.90000000000000001e-198 or 4.6000000000000003e-167 < M < 1.05e15Initial program 66.3%
associate-*l*65.9%
metadata-eval65.9%
unpow1/265.9%
metadata-eval65.9%
unpow1/265.9%
associate-*l*65.9%
metadata-eval65.9%
times-frac66.0%
Simplified66.0%
sqrt-div43.3%
Applied egg-rr43.3%
Taylor expanded in M around 0 29.0%
expm1-log1p-u28.0%
expm1-udef21.3%
sqrt-undiv34.1%
Applied egg-rr34.1%
expm1-def45.0%
expm1-log1p46.5%
Simplified46.5%
if 2.90000000000000001e-198 < M < 4.6000000000000003e-167Initial program 29.9%
metadata-eval29.9%
unpow1/229.9%
metadata-eval29.9%
unpow1/229.9%
*-commutative29.9%
associate-*l*29.9%
times-frac29.9%
metadata-eval29.9%
Simplified29.9%
Taylor expanded in d around inf 87.1%
*-commutative87.1%
add-cbrt-cube63.3%
expm1-log1p-u62.7%
expm1-udef36.5%
add-cbrt-cube47.1%
*-commutative47.1%
associate-/r*47.1%
Applied egg-rr47.1%
expm1-def85.5%
expm1-log1p87.1%
associate-/l/87.1%
unpow-187.1%
sqr-pow87.3%
rem-sqrt-square87.3%
sqr-pow86.9%
fabs-sqr86.9%
sqr-pow87.3%
metadata-eval87.3%
Simplified87.3%
unpow-prod-down87.3%
Applied egg-rr87.3%
if 1.05e15 < M Initial program 68.5%
associate-*l*68.5%
metadata-eval68.5%
unpow1/268.5%
metadata-eval68.5%
unpow1/268.5%
sub-neg68.5%
+-commutative68.5%
*-commutative68.5%
distribute-rgt-neg-in68.5%
fma-def68.5%
Simplified68.5%
Taylor expanded in h around inf 32.8%
*-commutative32.8%
times-frac32.7%
unpow232.7%
associate-/l*32.9%
unpow232.9%
times-frac38.3%
unpow238.3%
Simplified38.3%
Final simplification46.0%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ d l))) (t_1 (sqrt (/ d h))) (t_2 (* t_0 t_1)))
(if (<= M 2.9e-198)
t_2
(if (<= M 4.2e-167)
(* d (* (pow h -0.5) (pow l -0.5)))
(if (<= M 1.1e+19)
t_2
(*
t_1
(* t_0 (* -0.125 (/ (* D (* (/ h d) (/ M (/ d M)))) (/ l D))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((d / l));
double t_1 = sqrt((d / h));
double t_2 = t_0 * t_1;
double tmp;
if (M <= 2.9e-198) {
tmp = t_2;
} else if (M <= 4.2e-167) {
tmp = d * (pow(h, -0.5) * pow(l, -0.5));
} else if (M <= 1.1e+19) {
tmp = t_2;
} else {
tmp = t_1 * (t_0 * (-0.125 * ((D * ((h / d) * (M / (d / M)))) / (l / D))));
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = sqrt((d / l))
t_1 = sqrt((d / h))
t_2 = t_0 * t_1
if (m <= 2.9d-198) then
tmp = t_2
else if (m <= 4.2d-167) then
tmp = d * ((h ** (-0.5d0)) * (l ** (-0.5d0)))
else if (m <= 1.1d+19) then
tmp = t_2
else
tmp = t_1 * (t_0 * ((-0.125d0) * ((d_1 * ((h / d) * (m / (d / m)))) / (l / d_1))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = Math.sqrt((d / l));
double t_1 = Math.sqrt((d / h));
double t_2 = t_0 * t_1;
double tmp;
if (M <= 2.9e-198) {
tmp = t_2;
} else if (M <= 4.2e-167) {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
} else if (M <= 1.1e+19) {
tmp = t_2;
} else {
tmp = t_1 * (t_0 * (-0.125 * ((D * ((h / d) * (M / (d / M)))) / (l / D))));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((d / l)) t_1 = math.sqrt((d / h)) t_2 = t_0 * t_1 tmp = 0 if M <= 2.9e-198: tmp = t_2 elif M <= 4.2e-167: tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) elif M <= 1.1e+19: tmp = t_2 else: tmp = t_1 * (t_0 * (-0.125 * ((D * ((h / d) * (M / (d / M)))) / (l / D)))) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(d / l)) t_1 = sqrt(Float64(d / h)) t_2 = Float64(t_0 * t_1) tmp = 0.0 if (M <= 2.9e-198) tmp = t_2; elseif (M <= 4.2e-167) tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); elseif (M <= 1.1e+19) tmp = t_2; else tmp = Float64(t_1 * Float64(t_0 * Float64(-0.125 * Float64(Float64(D * Float64(Float64(h / d) * Float64(M / Float64(d / M)))) / Float64(l / D))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((d / l)); t_1 = sqrt((d / h)); t_2 = t_0 * t_1; tmp = 0.0; if (M <= 2.9e-198) tmp = t_2; elseif (M <= 4.2e-167) tmp = d * ((h ^ -0.5) * (l ^ -0.5)); elseif (M <= 1.1e+19) tmp = t_2; else tmp = t_1 * (t_0 * (-0.125 * ((D * ((h / d) * (M / (d / M)))) / (l / D)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 * t$95$1), $MachinePrecision]}, If[LessEqual[M, 2.9e-198], t$95$2, If[LessEqual[M, 4.2e-167], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 1.1e+19], t$95$2, N[(t$95$1 * N[(t$95$0 * N[(-0.125 * N[(N[(D * N[(N[(h / d), $MachinePrecision] * N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell}}\\
t_1 := \sqrt{\frac{d}{h}}\\
t_2 := t_0 \cdot t_1\\
\mathbf{if}\;M \leq 2.9 \cdot 10^{-198}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;M \leq 4.2 \cdot 10^{-167}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\mathbf{elif}\;M \leq 1.1 \cdot 10^{+19}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \left(t_0 \cdot \left(-0.125 \cdot \frac{D \cdot \left(\frac{h}{d} \cdot \frac{M}{\frac{d}{M}}\right)}{\frac{\ell}{D}}\right)\right)\\
\end{array}
\end{array}
if M < 2.90000000000000001e-198 or 4.20000000000000035e-167 < M < 1.1e19Initial program 66.2%
associate-*l*65.7%
metadata-eval65.7%
unpow1/265.7%
metadata-eval65.7%
unpow1/265.7%
associate-*l*65.7%
metadata-eval65.7%
times-frac65.8%
Simplified65.8%
sqrt-div43.3%
Applied egg-rr43.3%
Taylor expanded in M around 0 29.2%
expm1-log1p-u28.2%
expm1-udef21.5%
sqrt-undiv34.2%
Applied egg-rr34.2%
expm1-def45.0%
expm1-log1p46.5%
Simplified46.5%
if 2.90000000000000001e-198 < M < 4.20000000000000035e-167Initial program 29.9%
metadata-eval29.9%
unpow1/229.9%
metadata-eval29.9%
unpow1/229.9%
*-commutative29.9%
associate-*l*29.9%
times-frac29.9%
metadata-eval29.9%
Simplified29.9%
Taylor expanded in d around inf 87.1%
*-commutative87.1%
add-cbrt-cube63.3%
expm1-log1p-u62.7%
expm1-udef36.5%
add-cbrt-cube47.1%
*-commutative47.1%
associate-/r*47.1%
Applied egg-rr47.1%
expm1-def85.5%
expm1-log1p87.1%
associate-/l/87.1%
unpow-187.1%
sqr-pow87.3%
rem-sqrt-square87.3%
sqr-pow86.9%
fabs-sqr86.9%
sqr-pow87.3%
metadata-eval87.3%
Simplified87.3%
unpow-prod-down87.3%
Applied egg-rr87.3%
if 1.1e19 < M Initial program 69.1%
associate-*l*69.2%
metadata-eval69.2%
unpow1/269.2%
metadata-eval69.2%
unpow1/269.2%
sub-neg69.2%
+-commutative69.2%
*-commutative69.2%
distribute-rgt-neg-in69.2%
fma-def69.2%
Simplified69.2%
Taylor expanded in h around inf 33.9%
*-commutative33.9%
times-frac33.9%
unpow233.9%
associate-/l*34.1%
unpow234.1%
times-frac39.7%
unpow239.7%
Simplified39.7%
associate-*l/40.0%
associate-/l*43.6%
Applied egg-rr43.6%
Final simplification47.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (* (* D D) -0.125))
(t_1 (/ (/ 1.0 h) l))
(t_2 (* (/ (sqrt h) (pow l 1.5)) (/ t_0 (/ (/ d M) M))))
(t_3 (* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))
(if (<= d -5.2e-72)
(* d (- (sqrt t_1)))
(if (<= d -4e-310)
(* d (pow (pow t_1 3.0) 0.16666666666666666))
(if (<= d 2.55e-160)
t_2
(if (<= d 3.3e-84)
t_3
(if (<= d 3.1e-39)
(* (sqrt (/ h (pow l 3.0))) (* M (/ t_0 (/ d M))))
(if (<= d 6.8e+34)
t_3
(if (<= d 2.8e+80)
t_2
(* d (* (pow h -0.5) (pow l -0.5))))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (D * D) * -0.125;
double t_1 = (1.0 / h) / l;
double t_2 = (sqrt(h) / pow(l, 1.5)) * (t_0 / ((d / M) / M));
double t_3 = d * (sqrt((1.0 / l)) / sqrt(h));
double tmp;
if (d <= -5.2e-72) {
tmp = d * -sqrt(t_1);
} else if (d <= -4e-310) {
tmp = d * pow(pow(t_1, 3.0), 0.16666666666666666);
} else if (d <= 2.55e-160) {
tmp = t_2;
} else if (d <= 3.3e-84) {
tmp = t_3;
} else if (d <= 3.1e-39) {
tmp = sqrt((h / pow(l, 3.0))) * (M * (t_0 / (d / M)));
} else if (d <= 6.8e+34) {
tmp = t_3;
} else if (d <= 2.8e+80) {
tmp = t_2;
} 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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (d_1 * d_1) * (-0.125d0)
t_1 = (1.0d0 / h) / l
t_2 = (sqrt(h) / (l ** 1.5d0)) * (t_0 / ((d / m) / m))
t_3 = d * (sqrt((1.0d0 / l)) / sqrt(h))
if (d <= (-5.2d-72)) then
tmp = d * -sqrt(t_1)
else if (d <= (-4d-310)) then
tmp = d * ((t_1 ** 3.0d0) ** 0.16666666666666666d0)
else if (d <= 2.55d-160) then
tmp = t_2
else if (d <= 3.3d-84) then
tmp = t_3
else if (d <= 3.1d-39) then
tmp = sqrt((h / (l ** 3.0d0))) * (m * (t_0 / (d / m)))
else if (d <= 6.8d+34) then
tmp = t_3
else if (d <= 2.8d+80) then
tmp = t_2
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 t_0 = (D * D) * -0.125;
double t_1 = (1.0 / h) / l;
double t_2 = (Math.sqrt(h) / Math.pow(l, 1.5)) * (t_0 / ((d / M) / M));
double t_3 = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
double tmp;
if (d <= -5.2e-72) {
tmp = d * -Math.sqrt(t_1);
} else if (d <= -4e-310) {
tmp = d * Math.pow(Math.pow(t_1, 3.0), 0.16666666666666666);
} else if (d <= 2.55e-160) {
tmp = t_2;
} else if (d <= 3.3e-84) {
tmp = t_3;
} else if (d <= 3.1e-39) {
tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (M * (t_0 / (d / M)));
} else if (d <= 6.8e+34) {
tmp = t_3;
} else if (d <= 2.8e+80) {
tmp = t_2;
} else {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (D * D) * -0.125 t_1 = (1.0 / h) / l t_2 = (math.sqrt(h) / math.pow(l, 1.5)) * (t_0 / ((d / M) / M)) t_3 = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) tmp = 0 if d <= -5.2e-72: tmp = d * -math.sqrt(t_1) elif d <= -4e-310: tmp = d * math.pow(math.pow(t_1, 3.0), 0.16666666666666666) elif d <= 2.55e-160: tmp = t_2 elif d <= 3.3e-84: tmp = t_3 elif d <= 3.1e-39: tmp = math.sqrt((h / math.pow(l, 3.0))) * (M * (t_0 / (d / M))) elif d <= 6.8e+34: tmp = t_3 elif d <= 2.8e+80: tmp = t_2 else: tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(D * D) * -0.125) t_1 = Float64(Float64(1.0 / h) / l) t_2 = Float64(Float64(sqrt(h) / (l ^ 1.5)) * Float64(t_0 / Float64(Float64(d / M) / M))) t_3 = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))) tmp = 0.0 if (d <= -5.2e-72) tmp = Float64(d * Float64(-sqrt(t_1))); elseif (d <= -4e-310) tmp = Float64(d * ((t_1 ^ 3.0) ^ 0.16666666666666666)); elseif (d <= 2.55e-160) tmp = t_2; elseif (d <= 3.3e-84) tmp = t_3; elseif (d <= 3.1e-39) tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(M * Float64(t_0 / Float64(d / M)))); elseif (d <= 6.8e+34) tmp = t_3; elseif (d <= 2.8e+80) tmp = t_2; else tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (D * D) * -0.125; t_1 = (1.0 / h) / l; t_2 = (sqrt(h) / (l ^ 1.5)) * (t_0 / ((d / M) / M)); t_3 = d * (sqrt((1.0 / l)) / sqrt(h)); tmp = 0.0; if (d <= -5.2e-72) tmp = d * -sqrt(t_1); elseif (d <= -4e-310) tmp = d * ((t_1 ^ 3.0) ^ 0.16666666666666666); elseif (d <= 2.55e-160) tmp = t_2; elseif (d <= 3.3e-84) tmp = t_3; elseif (d <= 3.1e-39) tmp = sqrt((h / (l ^ 3.0))) * (M * (t_0 / (d / M))); elseif (d <= 6.8e+34) tmp = t_3; elseif (d <= 2.8e+80) tmp = t_2; else tmp = d * ((h ^ -0.5) * (l ^ -0.5)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision]}, Block[{t$95$1 = N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Sqrt[h], $MachinePrecision] / N[Power[l, 1.5], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 / N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -5.2e-72], N[(d * (-N[Sqrt[t$95$1], $MachinePrecision])), $MachinePrecision], If[LessEqual[d, -4e-310], N[(d * N[Power[N[Power[t$95$1, 3.0], $MachinePrecision], 0.16666666666666666], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.55e-160], t$95$2, If[LessEqual[d, 3.3e-84], t$95$3, If[LessEqual[d, 3.1e-39], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(M * N[(t$95$0 / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 6.8e+34], t$95$3, If[LessEqual[d, 2.8e+80], t$95$2, N[(d * N[(N[Power[h, -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(D \cdot D\right) \cdot -0.125\\
t_1 := \frac{\frac{1}{h}}{\ell}\\
t_2 := \frac{\sqrt{h}}{{\ell}^{1.5}} \cdot \frac{t_0}{\frac{\frac{d}{M}}{M}}\\
t_3 := d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\mathbf{if}\;d \leq -5.2 \cdot 10^{-72}:\\
\;\;\;\;d \cdot \left(-\sqrt{t_1}\right)\\
\mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\
\;\;\;\;d \cdot {\left({t_1}^{3}\right)}^{0.16666666666666666}\\
\mathbf{elif}\;d \leq 2.55 \cdot 10^{-160}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;d \leq 3.3 \cdot 10^{-84}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;d \leq 3.1 \cdot 10^{-39}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(M \cdot \frac{t_0}{\frac{d}{M}}\right)\\
\mathbf{elif}\;d \leq 6.8 \cdot 10^{+34}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;d \leq 2.8 \cdot 10^{+80}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if d < -5.19999999999999992e-72Initial program 72.3%
metadata-eval72.3%
unpow1/272.3%
metadata-eval72.3%
unpow1/272.3%
*-commutative72.3%
associate-*l*72.3%
times-frac72.4%
metadata-eval72.4%
Simplified72.4%
clear-num71.0%
sqrt-div70.9%
metadata-eval70.9%
Applied egg-rr70.9%
Taylor expanded in d around -inf 60.2%
mul-1-neg60.2%
associate-/l/60.9%
Simplified60.9%
if -5.19999999999999992e-72 < d < -3.999999999999988e-310Initial program 46.6%
metadata-eval46.6%
unpow1/246.6%
metadata-eval46.6%
unpow1/246.6%
*-commutative46.6%
associate-*l*46.6%
times-frac46.6%
metadata-eval46.6%
Simplified46.6%
Taylor expanded in d around inf 14.6%
*-commutative14.6%
add-cbrt-cube35.9%
pow1/335.9%
add-cube-cbrt35.9%
pow335.9%
add-cbrt-cube35.9%
*-commutative35.9%
associate-/r*35.9%
Applied egg-rr35.9%
sqrt-pow135.9%
associate-/l/35.9%
metadata-eval35.9%
Applied egg-rr35.9%
associate-/r*35.9%
Simplified35.9%
if -3.999999999999988e-310 < d < 2.55e-160 or 6.7999999999999999e34 < d < 2.79999999999999984e80Initial program 55.2%
metadata-eval55.2%
unpow1/255.2%
metadata-eval55.2%
unpow1/255.2%
*-commutative55.2%
associate-*l*55.2%
times-frac55.3%
metadata-eval55.3%
Simplified55.3%
clear-num55.3%
sqrt-div55.4%
metadata-eval55.4%
Applied egg-rr55.4%
Taylor expanded in d around 0 51.2%
associate-*r*51.2%
*-commutative51.2%
associate-/l*51.1%
associate-*r/51.1%
unpow251.1%
unpow251.1%
associate-/r*55.3%
Simplified55.3%
sqrt-div57.5%
Applied egg-rr57.5%
sqr-pow57.5%
rem-sqrt-square61.9%
sqr-pow61.8%
fabs-sqr61.8%
sqr-pow61.9%
metadata-eval61.9%
Simplified61.9%
if 2.55e-160 < d < 3.29999999999999984e-84 or 3.0999999999999997e-39 < d < 6.7999999999999999e34Initial program 71.8%
metadata-eval71.8%
unpow1/271.8%
metadata-eval71.8%
unpow1/271.8%
*-commutative71.8%
associate-*l*71.8%
times-frac71.9%
metadata-eval71.9%
Simplified71.9%
Taylor expanded in d around inf 59.2%
*-commutative59.2%
associate-/r*59.1%
Simplified59.1%
sqrt-div71.0%
Applied egg-rr71.0%
if 3.29999999999999984e-84 < d < 3.0999999999999997e-39Initial program 88.4%
metadata-eval88.4%
unpow1/288.4%
metadata-eval88.4%
unpow1/288.4%
*-commutative88.4%
associate-*l*88.4%
times-frac88.5%
metadata-eval88.5%
Simplified88.5%
clear-num88.5%
sqrt-div88.7%
metadata-eval88.7%
Applied egg-rr88.7%
Taylor expanded in d around 0 56.4%
associate-*r*56.4%
*-commutative56.4%
associate-/l*55.9%
associate-*r/55.9%
unpow255.9%
unpow255.9%
associate-/r*55.9%
Simplified55.9%
associate-/r/67.5%
Applied egg-rr67.5%
if 2.79999999999999984e80 < d Initial program 72.6%
metadata-eval72.6%
unpow1/272.6%
metadata-eval72.6%
unpow1/272.6%
*-commutative72.6%
associate-*l*72.6%
times-frac72.6%
metadata-eval72.6%
Simplified72.6%
Taylor expanded in d around inf 76.9%
*-commutative76.9%
add-cbrt-cube57.4%
expm1-log1p-u57.0%
expm1-udef48.1%
add-cbrt-cube55.6%
*-commutative55.6%
associate-/r*55.6%
Applied egg-rr55.6%
expm1-def76.6%
expm1-log1p77.8%
associate-/l/76.9%
unpow-176.9%
sqr-pow77.0%
rem-sqrt-square77.0%
sqr-pow76.9%
fabs-sqr76.9%
sqr-pow77.0%
metadata-eval77.0%
Simplified77.0%
unpow-prod-down81.9%
Applied egg-rr81.9%
Final simplification63.1%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (/ 1.0 h) l))
(t_1
(* -0.125 (/ (* (sqrt (/ h (pow l 3.0))) (* (* D D) (* M M))) d))))
(if (<= d -1.7e-74)
(* d (- (sqrt t_0)))
(if (<= d -4e-310)
(* d (pow (pow t_0 3.0) 0.16666666666666666))
(if (<= d 4.2e-161)
t_1
(if (<= d 1.65e-83)
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))
(if (<= d 5.8e-40) t_1 (* d (* (pow h -0.5) (pow l -0.5))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (1.0 / h) / l;
double t_1 = -0.125 * ((sqrt((h / pow(l, 3.0))) * ((D * D) * (M * M))) / d);
double tmp;
if (d <= -1.7e-74) {
tmp = d * -sqrt(t_0);
} else if (d <= -4e-310) {
tmp = d * pow(pow(t_0, 3.0), 0.16666666666666666);
} else if (d <= 4.2e-161) {
tmp = t_1;
} else if (d <= 1.65e-83) {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
} else if (d <= 5.8e-40) {
tmp = t_1;
} 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (1.0d0 / h) / l
t_1 = (-0.125d0) * ((sqrt((h / (l ** 3.0d0))) * ((d_1 * d_1) * (m * m))) / d)
if (d <= (-1.7d-74)) then
tmp = d * -sqrt(t_0)
else if (d <= (-4d-310)) then
tmp = d * ((t_0 ** 3.0d0) ** 0.16666666666666666d0)
else if (d <= 4.2d-161) then
tmp = t_1
else if (d <= 1.65d-83) then
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
else if (d <= 5.8d-40) then
tmp = t_1
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 t_0 = (1.0 / h) / l;
double t_1 = -0.125 * ((Math.sqrt((h / Math.pow(l, 3.0))) * ((D * D) * (M * M))) / d);
double tmp;
if (d <= -1.7e-74) {
tmp = d * -Math.sqrt(t_0);
} else if (d <= -4e-310) {
tmp = d * Math.pow(Math.pow(t_0, 3.0), 0.16666666666666666);
} else if (d <= 4.2e-161) {
tmp = t_1;
} else if (d <= 1.65e-83) {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
} else if (d <= 5.8e-40) {
tmp = t_1;
} else {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (1.0 / h) / l t_1 = -0.125 * ((math.sqrt((h / math.pow(l, 3.0))) * ((D * D) * (M * M))) / d) tmp = 0 if d <= -1.7e-74: tmp = d * -math.sqrt(t_0) elif d <= -4e-310: tmp = d * math.pow(math.pow(t_0, 3.0), 0.16666666666666666) elif d <= 4.2e-161: tmp = t_1 elif d <= 1.65e-83: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) elif d <= 5.8e-40: tmp = t_1 else: tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(1.0 / h) / l) t_1 = Float64(-0.125 * Float64(Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(Float64(D * D) * Float64(M * M))) / d)) tmp = 0.0 if (d <= -1.7e-74) tmp = Float64(d * Float64(-sqrt(t_0))); elseif (d <= -4e-310) tmp = Float64(d * ((t_0 ^ 3.0) ^ 0.16666666666666666)); elseif (d <= 4.2e-161) tmp = t_1; elseif (d <= 1.65e-83) tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); elseif (d <= 5.8e-40) tmp = t_1; else tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (1.0 / h) / l; t_1 = -0.125 * ((sqrt((h / (l ^ 3.0))) * ((D * D) * (M * M))) / d); tmp = 0.0; if (d <= -1.7e-74) tmp = d * -sqrt(t_0); elseif (d <= -4e-310) tmp = d * ((t_0 ^ 3.0) ^ 0.16666666666666666); elseif (d <= 4.2e-161) tmp = t_1; elseif (d <= 1.65e-83) tmp = d * (sqrt((1.0 / l)) / sqrt(h)); elseif (d <= 5.8e-40) tmp = t_1; else tmp = d * ((h ^ -0.5) * (l ^ -0.5)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$1 = N[(-0.125 * N[(N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D * D), $MachinePrecision] * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.7e-74], N[(d * (-N[Sqrt[t$95$0], $MachinePrecision])), $MachinePrecision], If[LessEqual[d, -4e-310], N[(d * N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.16666666666666666], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.2e-161], t$95$1, If[LessEqual[d, 1.65e-83], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 5.8e-40], t$95$1, N[(d * N[(N[Power[h, -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{1}{h}}{\ell}\\
t_1 := -0.125 \cdot \frac{\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot M\right)\right)}{d}\\
\mathbf{if}\;d \leq -1.7 \cdot 10^{-74}:\\
\;\;\;\;d \cdot \left(-\sqrt{t_0}\right)\\
\mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\
\;\;\;\;d \cdot {\left({t_0}^{3}\right)}^{0.16666666666666666}\\
\mathbf{elif}\;d \leq 4.2 \cdot 10^{-161}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d \leq 1.65 \cdot 10^{-83}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\mathbf{elif}\;d \leq 5.8 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if d < -1.7e-74Initial program 72.3%
metadata-eval72.3%
unpow1/272.3%
metadata-eval72.3%
unpow1/272.3%
*-commutative72.3%
associate-*l*72.3%
times-frac72.4%
metadata-eval72.4%
Simplified72.4%
clear-num71.0%
sqrt-div70.9%
metadata-eval70.9%
Applied egg-rr70.9%
Taylor expanded in d around -inf 60.2%
mul-1-neg60.2%
associate-/l/60.9%
Simplified60.9%
if -1.7e-74 < d < -3.999999999999988e-310Initial program 46.6%
metadata-eval46.6%
unpow1/246.6%
metadata-eval46.6%
unpow1/246.6%
*-commutative46.6%
associate-*l*46.6%
times-frac46.6%
metadata-eval46.6%
Simplified46.6%
Taylor expanded in d around inf 14.6%
*-commutative14.6%
add-cbrt-cube35.9%
pow1/335.9%
add-cube-cbrt35.9%
pow335.9%
add-cbrt-cube35.9%
*-commutative35.9%
associate-/r*35.9%
Applied egg-rr35.9%
sqrt-pow135.9%
associate-/l/35.9%
metadata-eval35.9%
Applied egg-rr35.9%
associate-/r*35.9%
Simplified35.9%
if -3.999999999999988e-310 < d < 4.2000000000000001e-161 or 1.65e-83 < d < 5.7999999999999998e-40Initial program 57.3%
metadata-eval57.3%
unpow1/257.3%
metadata-eval57.3%
unpow1/257.3%
*-commutative57.3%
associate-*l*57.3%
times-frac57.5%
metadata-eval57.5%
Simplified57.5%
Taylor expanded in d around 0 53.5%
associate-*l/53.5%
unpow253.5%
unpow253.5%
Simplified53.5%
if 4.2000000000000001e-161 < d < 1.65e-83Initial program 68.0%
metadata-eval68.0%
unpow1/268.0%
metadata-eval68.0%
unpow1/268.0%
*-commutative68.0%
associate-*l*68.0%
times-frac68.2%
metadata-eval68.2%
Simplified68.2%
Taylor expanded in d around inf 48.8%
*-commutative48.8%
associate-/r*48.6%
Simplified48.6%
sqrt-div66.9%
Applied egg-rr66.9%
if 5.7999999999999998e-40 < d Initial program 73.3%
metadata-eval73.3%
unpow1/273.3%
metadata-eval73.3%
unpow1/273.3%
*-commutative73.3%
associate-*l*73.3%
times-frac73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in d around inf 67.6%
*-commutative67.6%
add-cbrt-cube47.7%
expm1-log1p-u47.0%
expm1-udef39.9%
add-cbrt-cube48.1%
*-commutative48.1%
associate-/r*48.1%
Applied egg-rr48.1%
expm1-def66.8%
expm1-log1p68.2%
associate-/l/67.6%
unpow-167.6%
sqr-pow67.7%
rem-sqrt-square67.7%
sqr-pow67.6%
fabs-sqr67.6%
sqr-pow67.7%
metadata-eval67.7%
Simplified67.7%
unpow-prod-down72.1%
Applied egg-rr72.1%
Final simplification59.6%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (/ 1.0 h) l))
(t_1
(* (sqrt (/ h (pow l 3.0))) (* M (/ (* (* D D) -0.125) (/ d M))))))
(if (<= d -2.9e-74)
(* d (- (sqrt t_0)))
(if (<= d -4e-310)
(* d (pow (pow t_0 3.0) 0.16666666666666666))
(if (<= d 8e-137)
t_1
(if (<= d 2.2e-83)
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))
(if (<= d 9.8e-40) t_1 (* d (* (pow h -0.5) (pow l -0.5))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (1.0 / h) / l;
double t_1 = sqrt((h / pow(l, 3.0))) * (M * (((D * D) * -0.125) / (d / M)));
double tmp;
if (d <= -2.9e-74) {
tmp = d * -sqrt(t_0);
} else if (d <= -4e-310) {
tmp = d * pow(pow(t_0, 3.0), 0.16666666666666666);
} else if (d <= 8e-137) {
tmp = t_1;
} else if (d <= 2.2e-83) {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
} else if (d <= 9.8e-40) {
tmp = t_1;
} 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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (1.0d0 / h) / l
t_1 = sqrt((h / (l ** 3.0d0))) * (m * (((d_1 * d_1) * (-0.125d0)) / (d / m)))
if (d <= (-2.9d-74)) then
tmp = d * -sqrt(t_0)
else if (d <= (-4d-310)) then
tmp = d * ((t_0 ** 3.0d0) ** 0.16666666666666666d0)
else if (d <= 8d-137) then
tmp = t_1
else if (d <= 2.2d-83) then
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
else if (d <= 9.8d-40) then
tmp = t_1
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 t_0 = (1.0 / h) / l;
double t_1 = Math.sqrt((h / Math.pow(l, 3.0))) * (M * (((D * D) * -0.125) / (d / M)));
double tmp;
if (d <= -2.9e-74) {
tmp = d * -Math.sqrt(t_0);
} else if (d <= -4e-310) {
tmp = d * Math.pow(Math.pow(t_0, 3.0), 0.16666666666666666);
} else if (d <= 8e-137) {
tmp = t_1;
} else if (d <= 2.2e-83) {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
} else if (d <= 9.8e-40) {
tmp = t_1;
} else {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (1.0 / h) / l t_1 = math.sqrt((h / math.pow(l, 3.0))) * (M * (((D * D) * -0.125) / (d / M))) tmp = 0 if d <= -2.9e-74: tmp = d * -math.sqrt(t_0) elif d <= -4e-310: tmp = d * math.pow(math.pow(t_0, 3.0), 0.16666666666666666) elif d <= 8e-137: tmp = t_1 elif d <= 2.2e-83: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) elif d <= 9.8e-40: tmp = t_1 else: tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(1.0 / h) / l) t_1 = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(M * Float64(Float64(Float64(D * D) * -0.125) / Float64(d / M)))) tmp = 0.0 if (d <= -2.9e-74) tmp = Float64(d * Float64(-sqrt(t_0))); elseif (d <= -4e-310) tmp = Float64(d * ((t_0 ^ 3.0) ^ 0.16666666666666666)); elseif (d <= 8e-137) tmp = t_1; elseif (d <= 2.2e-83) tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); elseif (d <= 9.8e-40) tmp = t_1; else tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (1.0 / h) / l; t_1 = sqrt((h / (l ^ 3.0))) * (M * (((D * D) * -0.125) / (d / M))); tmp = 0.0; if (d <= -2.9e-74) tmp = d * -sqrt(t_0); elseif (d <= -4e-310) tmp = d * ((t_0 ^ 3.0) ^ 0.16666666666666666); elseif (d <= 8e-137) tmp = t_1; elseif (d <= 2.2e-83) tmp = d * (sqrt((1.0 / l)) / sqrt(h)); elseif (d <= 9.8e-40) tmp = t_1; else tmp = d * ((h ^ -0.5) * (l ^ -0.5)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(M * N[(N[(N[(D * D), $MachinePrecision] * -0.125), $MachinePrecision] / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -2.9e-74], N[(d * (-N[Sqrt[t$95$0], $MachinePrecision])), $MachinePrecision], If[LessEqual[d, -4e-310], N[(d * N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.16666666666666666], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 8e-137], t$95$1, If[LessEqual[d, 2.2e-83], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 9.8e-40], t$95$1, N[(d * N[(N[Power[h, -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{1}{h}}{\ell}\\
t_1 := \sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(M \cdot \frac{\left(D \cdot D\right) \cdot -0.125}{\frac{d}{M}}\right)\\
\mathbf{if}\;d \leq -2.9 \cdot 10^{-74}:\\
\;\;\;\;d \cdot \left(-\sqrt{t_0}\right)\\
\mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\
\;\;\;\;d \cdot {\left({t_0}^{3}\right)}^{0.16666666666666666}\\
\mathbf{elif}\;d \leq 8 \cdot 10^{-137}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d \leq 2.2 \cdot 10^{-83}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\mathbf{elif}\;d \leq 9.8 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if d < -2.9e-74Initial program 72.3%
metadata-eval72.3%
unpow1/272.3%
metadata-eval72.3%
unpow1/272.3%
*-commutative72.3%
associate-*l*72.3%
times-frac72.4%
metadata-eval72.4%
Simplified72.4%
clear-num71.0%
sqrt-div70.9%
metadata-eval70.9%
Applied egg-rr70.9%
Taylor expanded in d around -inf 60.2%
mul-1-neg60.2%
associate-/l/60.9%
Simplified60.9%
if -2.9e-74 < d < -3.999999999999988e-310Initial program 46.6%
metadata-eval46.6%
unpow1/246.6%
metadata-eval46.6%
unpow1/246.6%
*-commutative46.6%
associate-*l*46.6%
times-frac46.6%
metadata-eval46.6%
Simplified46.6%
Taylor expanded in d around inf 14.6%
*-commutative14.6%
add-cbrt-cube35.9%
pow1/335.9%
add-cube-cbrt35.9%
pow335.9%
add-cbrt-cube35.9%
*-commutative35.9%
associate-/r*35.9%
Applied egg-rr35.9%
sqrt-pow135.9%
associate-/l/35.9%
metadata-eval35.9%
Applied egg-rr35.9%
associate-/r*35.9%
Simplified35.9%
if -3.999999999999988e-310 < d < 7.99999999999999982e-137 or 2.20000000000000008e-83 < d < 9.7999999999999995e-40Initial program 59.7%
metadata-eval59.7%
unpow1/259.7%
metadata-eval59.7%
unpow1/259.7%
*-commutative59.7%
associate-*l*59.7%
times-frac59.9%
metadata-eval59.9%
Simplified59.9%
clear-num59.9%
sqrt-div59.9%
metadata-eval59.9%
Applied egg-rr59.9%
Taylor expanded in d around 0 52.3%
associate-*r*52.3%
*-commutative52.3%
associate-/l*52.1%
associate-*r/52.1%
unpow252.1%
unpow252.1%
associate-/r*56.0%
Simplified56.0%
associate-/r/60.3%
Applied egg-rr60.3%
if 7.99999999999999982e-137 < d < 2.20000000000000008e-83Initial program 61.6%
metadata-eval61.6%
unpow1/261.6%
metadata-eval61.6%
unpow1/261.6%
*-commutative61.6%
associate-*l*61.6%
times-frac61.8%
metadata-eval61.8%
Simplified61.8%
Taylor expanded in d around inf 52.4%
*-commutative52.4%
associate-/r*52.1%
Simplified52.1%
sqrt-div70.1%
Applied egg-rr70.1%
if 9.7999999999999995e-40 < d Initial program 73.3%
metadata-eval73.3%
unpow1/273.3%
metadata-eval73.3%
unpow1/273.3%
*-commutative73.3%
associate-*l*73.3%
times-frac73.3%
metadata-eval73.3%
Simplified73.3%
Taylor expanded in d around inf 67.6%
*-commutative67.6%
add-cbrt-cube47.7%
expm1-log1p-u47.0%
expm1-udef39.9%
add-cbrt-cube48.1%
*-commutative48.1%
associate-/r*48.1%
Applied egg-rr48.1%
expm1-def66.8%
expm1-log1p68.2%
associate-/l/67.6%
unpow-167.6%
sqr-pow67.7%
rem-sqrt-square67.7%
sqr-pow67.6%
fabs-sqr67.6%
sqr-pow67.7%
metadata-eval67.7%
Simplified67.7%
unpow-prod-down72.1%
Applied egg-rr72.1%
Final simplification60.8%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (/ (/ 1.0 h) l)))
(if (<= d -2.1e-84)
(* d (- (sqrt t_0)))
(if (<= d -4e-310)
(* d (pow (pow t_0 3.0) 0.16666666666666666))
(* d (* (pow h -0.5) (pow l -0.5)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = (1.0 / h) / l;
double tmp;
if (d <= -2.1e-84) {
tmp = d * -sqrt(t_0);
} else if (d <= -4e-310) {
tmp = d * pow(pow(t_0, 3.0), 0.16666666666666666);
} 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) :: t_0
real(8) :: tmp
t_0 = (1.0d0 / h) / l
if (d <= (-2.1d-84)) then
tmp = d * -sqrt(t_0)
else if (d <= (-4d-310)) then
tmp = d * ((t_0 ** 3.0d0) ** 0.16666666666666666d0)
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 t_0 = (1.0 / h) / l;
double tmp;
if (d <= -2.1e-84) {
tmp = d * -Math.sqrt(t_0);
} else if (d <= -4e-310) {
tmp = d * Math.pow(Math.pow(t_0, 3.0), 0.16666666666666666);
} else {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = (1.0 / h) / l tmp = 0 if d <= -2.1e-84: tmp = d * -math.sqrt(t_0) elif d <= -4e-310: tmp = d * math.pow(math.pow(t_0, 3.0), 0.16666666666666666) else: tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) return tmp
function code(d, h, l, M, D) t_0 = Float64(Float64(1.0 / h) / l) tmp = 0.0 if (d <= -2.1e-84) tmp = Float64(d * Float64(-sqrt(t_0))); elseif (d <= -4e-310) tmp = Float64(d * ((t_0 ^ 3.0) ^ 0.16666666666666666)); else tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = (1.0 / h) / l; tmp = 0.0; if (d <= -2.1e-84) tmp = d * -sqrt(t_0); elseif (d <= -4e-310) tmp = d * ((t_0 ^ 3.0) ^ 0.16666666666666666); else tmp = d * ((h ^ -0.5) * (l ^ -0.5)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[d, -2.1e-84], N[(d * (-N[Sqrt[t$95$0], $MachinePrecision])), $MachinePrecision], If[LessEqual[d, -4e-310], N[(d * N[Power[N[Power[t$95$0, 3.0], $MachinePrecision], 0.16666666666666666], $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}
t_0 := \frac{\frac{1}{h}}{\ell}\\
\mathbf{if}\;d \leq -2.1 \cdot 10^{-84}:\\
\;\;\;\;d \cdot \left(-\sqrt{t_0}\right)\\
\mathbf{elif}\;d \leq -4 \cdot 10^{-310}:\\
\;\;\;\;d \cdot {\left({t_0}^{3}\right)}^{0.16666666666666666}\\
\mathbf{else}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if d < -2.09999999999999998e-84Initial program 72.3%
metadata-eval72.3%
unpow1/272.3%
metadata-eval72.3%
unpow1/272.3%
*-commutative72.3%
associate-*l*72.3%
times-frac72.4%
metadata-eval72.4%
Simplified72.4%
clear-num71.0%
sqrt-div70.9%
metadata-eval70.9%
Applied egg-rr70.9%
Taylor expanded in d around -inf 60.2%
mul-1-neg60.2%
associate-/l/60.9%
Simplified60.9%
if -2.09999999999999998e-84 < d < -3.999999999999988e-310Initial program 46.6%
metadata-eval46.6%
unpow1/246.6%
metadata-eval46.6%
unpow1/246.6%
*-commutative46.6%
associate-*l*46.6%
times-frac46.6%
metadata-eval46.6%
Simplified46.6%
Taylor expanded in d around inf 14.6%
*-commutative14.6%
add-cbrt-cube35.9%
pow1/335.9%
add-cube-cbrt35.9%
pow335.9%
add-cbrt-cube35.9%
*-commutative35.9%
associate-/r*35.9%
Applied egg-rr35.9%
sqrt-pow135.9%
associate-/l/35.9%
metadata-eval35.9%
Applied egg-rr35.9%
associate-/r*35.9%
Simplified35.9%
if -3.999999999999988e-310 < d Initial program 67.8%
metadata-eval67.8%
unpow1/267.8%
metadata-eval67.8%
unpow1/267.8%
*-commutative67.8%
associate-*l*67.8%
times-frac67.9%
metadata-eval67.9%
Simplified67.9%
Taylor expanded in d around inf 52.1%
*-commutative52.1%
add-cbrt-cube37.0%
expm1-log1p-u36.5%
expm1-udef29.7%
add-cbrt-cube37.1%
*-commutative37.1%
associate-/r*37.1%
Applied egg-rr37.1%
expm1-def51.3%
expm1-log1p52.4%
associate-/l/52.1%
unpow-152.1%
sqr-pow52.1%
rem-sqrt-square52.1%
sqr-pow52.0%
fabs-sqr52.0%
sqr-pow52.1%
metadata-eval52.1%
Simplified52.1%
unpow-prod-down56.6%
Applied egg-rr56.6%
Final simplification54.5%
(FPCore (d h l M D) :precision binary64 (if (<= d 4.8e-204) (* d (- (sqrt (/ (/ 1.0 h) l)))) (* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 4.8e-204) {
tmp = d * -sqrt(((1.0 / h) / 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 <= 4.8d-204) then
tmp = d * -sqrt(((1.0d0 / h) / 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 <= 4.8e-204) {
tmp = d * -Math.sqrt(((1.0 / h) / 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 <= 4.8e-204: tmp = d * -math.sqrt(((1.0 / h) / 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 <= 4.8e-204) tmp = Float64(d * Float64(-sqrt(Float64(Float64(1.0 / h) / 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 <= 4.8e-204) tmp = d * -sqrt(((1.0 / h) / l)); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 4.8e-204], N[(d * (-N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / 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 4.8 \cdot 10^{-204}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < 4.8e-204Initial program 61.6%
metadata-eval61.6%
unpow1/261.6%
metadata-eval61.6%
unpow1/261.6%
*-commutative61.6%
associate-*l*61.6%
times-frac61.7%
metadata-eval61.7%
Simplified61.7%
clear-num60.2%
sqrt-div60.2%
metadata-eval60.2%
Applied egg-rr60.2%
Taylor expanded in d around -inf 40.6%
mul-1-neg40.6%
associate-/l/41.0%
Simplified41.0%
if 4.8e-204 < d Initial program 70.4%
metadata-eval70.4%
unpow1/270.4%
metadata-eval70.4%
unpow1/270.4%
*-commutative70.4%
associate-*l*70.4%
times-frac70.5%
metadata-eval70.5%
Simplified70.5%
Taylor expanded in d around inf 58.2%
*-commutative58.2%
associate-/r*58.6%
Simplified58.6%
sqrt-div63.6%
Applied egg-rr63.6%
Final simplification51.4%
(FPCore (d h l M D) :precision binary64 (if (<= d 2.7e-203) (* d (- (sqrt (/ (/ 1.0 h) l)))) (* 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 <= 2.7e-203) {
tmp = d * -sqrt(((1.0 / h) / l));
} 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 <= 2.7d-203) then
tmp = d * -sqrt(((1.0d0 / h) / l))
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 <= 2.7e-203) {
tmp = d * -Math.sqrt(((1.0 / h) / l));
} 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 <= 2.7e-203: tmp = d * -math.sqrt(((1.0 / h) / l)) 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 <= 2.7e-203) tmp = Float64(d * Float64(-sqrt(Float64(Float64(1.0 / h) / l)))); 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 <= 2.7e-203) tmp = d * -sqrt(((1.0 / h) / l)); else tmp = d * ((h ^ -0.5) * (l ^ -0.5)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 2.7e-203], N[(d * (-N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $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 2.7 \cdot 10^{-203}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{h}}{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\end{array}
\end{array}
if d < 2.69999999999999999e-203Initial program 61.6%
metadata-eval61.6%
unpow1/261.6%
metadata-eval61.6%
unpow1/261.6%
*-commutative61.6%
associate-*l*61.6%
times-frac61.7%
metadata-eval61.7%
Simplified61.7%
clear-num60.2%
sqrt-div60.2%
metadata-eval60.2%
Applied egg-rr60.2%
Taylor expanded in d around -inf 40.6%
mul-1-neg40.6%
associate-/l/41.0%
Simplified41.0%
if 2.69999999999999999e-203 < d Initial program 70.4%
metadata-eval70.4%
unpow1/270.4%
metadata-eval70.4%
unpow1/270.4%
*-commutative70.4%
associate-*l*70.4%
times-frac70.5%
metadata-eval70.5%
Simplified70.5%
Taylor expanded in d around inf 58.2%
*-commutative58.2%
add-cbrt-cube41.7%
expm1-log1p-u41.1%
expm1-udef32.9%
add-cbrt-cube40.2%
*-commutative40.2%
associate-/r*40.2%
Applied egg-rr40.2%
expm1-def57.3%
expm1-log1p58.6%
associate-/l/58.2%
unpow-158.2%
sqr-pow58.2%
rem-sqrt-square58.2%
sqr-pow58.1%
fabs-sqr58.1%
sqr-pow58.2%
metadata-eval58.2%
Simplified58.2%
unpow-prod-down63.6%
Applied egg-rr63.6%
Final simplification51.4%
(FPCore (d h l M D) :precision binary64 (let* ((t_0 (sqrt (/ (/ 1.0 h) l)))) (if (<= d -2.15e-114) (* d (- t_0)) (* d t_0))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt(((1.0 / h) / l));
double tmp;
if (d <= -2.15e-114) {
tmp = d * -t_0;
} else {
tmp = d * t_0;
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(((1.0d0 / h) / l))
if (d <= (-2.15d-114)) then
tmp = d * -t_0
else
tmp = d * t_0
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = Math.sqrt(((1.0 / h) / l));
double tmp;
if (d <= -2.15e-114) {
tmp = d * -t_0;
} else {
tmp = d * t_0;
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt(((1.0 / h) / l)) tmp = 0 if d <= -2.15e-114: tmp = d * -t_0 else: tmp = d * t_0 return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(Float64(1.0 / h) / l)) tmp = 0.0 if (d <= -2.15e-114) tmp = Float64(d * Float64(-t_0)); else tmp = Float64(d * t_0); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt(((1.0 / h) / l)); tmp = 0.0; if (d <= -2.15e-114) tmp = d * -t_0; else tmp = d * t_0; end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[d, -2.15e-114], N[(d * (-t$95$0)), $MachinePrecision], N[(d * t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{if}\;d \leq -2.15 \cdot 10^{-114}:\\
\;\;\;\;d \cdot \left(-t_0\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot t_0\\
\end{array}
\end{array}
if d < -2.15e-114Initial program 73.0%
metadata-eval73.0%
unpow1/273.0%
metadata-eval73.0%
unpow1/273.0%
*-commutative73.0%
associate-*l*73.0%
times-frac73.1%
metadata-eval73.1%
Simplified73.1%
clear-num71.7%
sqrt-div71.7%
metadata-eval71.7%
Applied egg-rr71.7%
Taylor expanded in d around -inf 60.0%
mul-1-neg60.0%
associate-/l/60.6%
Simplified60.6%
if -2.15e-114 < d Initial program 62.6%
metadata-eval62.6%
unpow1/262.6%
metadata-eval62.6%
unpow1/262.6%
*-commutative62.6%
associate-*l*62.6%
times-frac62.7%
metadata-eval62.7%
Simplified62.7%
Taylor expanded in d around inf 44.1%
*-commutative44.1%
associate-/r*44.4%
Simplified44.4%
add-cbrt-cube36.6%
associate-/l/36.6%
associate-/l/36.6%
associate-/l/36.6%
Applied egg-rr36.6%
add-cbrt-cube44.1%
associate-/r*44.4%
Applied egg-rr44.4%
Final simplification49.2%
(FPCore (d h l M D) :precision binary64 (* d (sqrt (/ (/ 1.0 h) l))))
double code(double d, double h, double l, double M, double D) {
return d * sqrt(((1.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 * sqrt(((1.0d0 / h) / l))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.sqrt(((1.0 / h) / l));
}
def code(d, h, l, M, D): return d * math.sqrt(((1.0 / h) / l))
function code(d, h, l, M, D) return Float64(d * sqrt(Float64(Float64(1.0 / h) / l))) end
function tmp = code(d, h, l, M, D) tmp = d * sqrt(((1.0 / h) / l)); end
code[d_, h_, l_, M_, D_] := N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}
\end{array}
Initial program 65.7%
metadata-eval65.7%
unpow1/265.7%
metadata-eval65.7%
unpow1/265.7%
*-commutative65.7%
associate-*l*65.7%
times-frac65.7%
metadata-eval65.7%
Simplified65.7%
Taylor expanded in d around inf 33.0%
*-commutative33.0%
associate-/r*33.1%
Simplified33.1%
add-cbrt-cube28.7%
associate-/l/28.7%
associate-/l/28.7%
associate-/l/28.7%
Applied egg-rr28.7%
add-cbrt-cube33.0%
associate-/r*33.1%
Applied egg-rr33.1%
Final simplification33.1%
(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 65.7%
metadata-eval65.7%
unpow1/265.7%
metadata-eval65.7%
unpow1/265.7%
*-commutative65.7%
associate-*l*65.7%
times-frac65.7%
metadata-eval65.7%
Simplified65.7%
Taylor expanded in d around inf 33.0%
*-commutative33.0%
add-cbrt-cube28.7%
expm1-log1p-u28.5%
expm1-udef24.7%
add-cbrt-cube24.7%
*-commutative24.7%
associate-/r*24.7%
Applied egg-rr24.7%
expm1-def32.5%
expm1-log1p33.1%
associate-/l/33.0%
unpow-133.0%
sqr-pow33.0%
rem-sqrt-square32.6%
sqr-pow32.5%
fabs-sqr32.5%
sqr-pow32.6%
metadata-eval32.6%
Simplified32.6%
Final simplification32.6%
herbie shell --seed 2023227
(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)))))