
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (d h l M D) :precision binary64 (* (* (pow (/ d h) (/ 1.0 2.0)) (pow (/ d l) (/ 1.0 2.0))) (- 1.0 (* (* (/ 1.0 2.0) (pow (/ (* M D) (* 2.0 d)) 2.0)) (/ h l)))))
double code(double d, double h, double l, double M, double D) {
return (pow((d / h), (1.0 / 2.0)) * pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = (((d / h) ** (1.0d0 / 2.0d0)) * ((d / l) ** (1.0d0 / 2.0d0))) * (1.0d0 - (((1.0d0 / 2.0d0) * (((m * d_1) / (2.0d0 * d)) ** 2.0d0)) * (h / l)))
end function
public static double code(double d, double h, double l, double M, double D) {
return (Math.pow((d / h), (1.0 / 2.0)) * Math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * Math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)));
}
def code(d, h, l, M, D): return (math.pow((d / h), (1.0 / 2.0)) * math.pow((d / l), (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * math.pow(((M * D) / (2.0 * d)), 2.0)) * (h / l)))
function code(d, h, l, M, D) return Float64(Float64((Float64(d / h) ^ Float64(1.0 / 2.0)) * (Float64(d / l) ^ Float64(1.0 / 2.0))) * Float64(1.0 - Float64(Float64(Float64(1.0 / 2.0) * (Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0)) * Float64(h / l)))) end
function tmp = code(d, h, l, M, D) tmp = (((d / h) ^ (1.0 / 2.0)) * ((d / l) ^ (1.0 / 2.0))) * (1.0 - (((1.0 / 2.0) * (((M * D) / (2.0 * d)) ^ 2.0)) * (h / l))); end
code[d_, h_, l_, M_, D_] := N[(N[(N[Power[N[(d / h), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision] * N[Power[N[(d / l), $MachinePrecision], N[(1.0 / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(N[(1.0 / 2.0), $MachinePrecision] * N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left({\left(\frac{d}{h}\right)}^{\left(\frac{1}{2}\right)} \cdot {\left(\frac{d}{\ell}\right)}^{\left(\frac{1}{2}\right)}\right) \cdot \left(1 - \left(\frac{1}{2} \cdot {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}\right) \cdot \frac{h}{\ell}\right)
\end{array}
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(*
(sqrt (/ d l))
(- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l)))))))
(if (<= h -1e-309)
(* (/ (sqrt (- d)) (sqrt (- h))) t_0)
(* t_0 (/ (sqrt d) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((d / l)) * (1.0 - (0.5 * (pow(((M / 2.0) * (D / d)), 2.0) * (h / l))));
double tmp;
if (h <= -1e-309) {
tmp = (sqrt(-d) / sqrt(-h)) * t_0;
} else {
tmp = t_0 * (sqrt(d) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((d / l)) * (1.0d0 - (0.5d0 * ((((m / 2.0d0) * (d_1 / d)) ** 2.0d0) * (h / l))))
if (h <= (-1d-309)) then
tmp = (sqrt(-d) / sqrt(-h)) * t_0
else
tmp = t_0 * (sqrt(d) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = Math.sqrt((d / l)) * (1.0 - (0.5 * (Math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l))));
double tmp;
if (h <= -1e-309) {
tmp = (Math.sqrt(-d) / Math.sqrt(-h)) * t_0;
} else {
tmp = t_0 * (Math.sqrt(d) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((d / l)) * (1.0 - (0.5 * (math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) tmp = 0 if h <= -1e-309: tmp = (math.sqrt(-d) / math.sqrt(-h)) * t_0 else: tmp = t_0 * (math.sqrt(d) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) t_0 = 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))))) tmp = 0.0 if (h <= -1e-309) tmp = Float64(Float64(sqrt(Float64(-d)) / sqrt(Float64(-h))) * t_0); else tmp = Float64(t_0 * Float64(sqrt(d) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((d / l)) * (1.0 - (0.5 * ((((M / 2.0) * (D / d)) ^ 2.0) * (h / l)))); tmp = 0.0; if (h <= -1e-309) tmp = (sqrt(-d) / sqrt(-h)) * t_0; else tmp = t_0 * (sqrt(d) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = 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]}, If[LessEqual[h, -1e-309], N[(N[(N[Sqrt[(-d)], $MachinePrecision] / N[Sqrt[(-h)], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(t$95$0 * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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)\\
\mathbf{if}\;h \leq -1 \cdot 10^{-309}:\\
\;\;\;\;\frac{\sqrt{-d}}{\sqrt{-h}} \cdot t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{\sqrt{d}}{\sqrt{h}}\\
\end{array}
\end{array}
if h < -1.000000000000002e-309Initial program 65.3%
associate-*l*65.3%
metadata-eval65.3%
unpow1/265.3%
metadata-eval65.3%
unpow1/265.3%
associate-*l*65.3%
metadata-eval65.3%
times-frac65.4%
Simplified65.4%
frac-2neg65.4%
sqrt-div76.3%
Applied egg-rr76.3%
if -1.000000000000002e-309 < h Initial program 67.2%
associate-*l*67.2%
metadata-eval67.2%
unpow1/267.2%
metadata-eval67.2%
unpow1/267.2%
associate-*l*67.2%
metadata-eval67.2%
times-frac67.2%
Simplified67.2%
sqrt-div74.2%
Applied egg-rr74.2%
Final simplification75.3%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ d h))))
(if (<= l -4.4e+25)
(*
t_0
(*
(- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l))))
(/ (sqrt (- d)) (sqrt (- l)))))
(if (<= l 6e+165)
(*
(/ t_0 (sqrt (/ l d)))
(- 1.0 (* h (* (pow (* D (/ (/ M d) 2.0)) 2.0) (/ 0.5 l)))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((d / h));
double tmp;
if (l <= -4.4e+25) {
tmp = t_0 * ((1.0 - (0.5 * (pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * (sqrt(-d) / sqrt(-l)));
} else if (l <= 6e+165) {
tmp = (t_0 / sqrt((l / d))) * (1.0 - (h * (pow((D * ((M / d) / 2.0)), 2.0) * (0.5 / 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) :: t_0
real(8) :: tmp
t_0 = sqrt((d / h))
if (l <= (-4.4d+25)) then
tmp = t_0 * ((1.0d0 - (0.5d0 * ((((m / 2.0d0) * (d_1 / d)) ** 2.0d0) * (h / l)))) * (sqrt(-d) / sqrt(-l)))
else if (l <= 6d+165) then
tmp = (t_0 / sqrt((l / d))) * (1.0d0 - (h * (((d_1 * ((m / d) / 2.0d0)) ** 2.0d0) * (0.5d0 / 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 t_0 = Math.sqrt((d / h));
double tmp;
if (l <= -4.4e+25) {
tmp = t_0 * ((1.0 - (0.5 * (Math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * (Math.sqrt(-d) / Math.sqrt(-l)));
} else if (l <= 6e+165) {
tmp = (t_0 / Math.sqrt((l / d))) * (1.0 - (h * (Math.pow((D * ((M / d) / 2.0)), 2.0) * (0.5 / l))));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((d / h)) tmp = 0 if l <= -4.4e+25: tmp = t_0 * ((1.0 - (0.5 * (math.pow(((M / 2.0) * (D / d)), 2.0) * (h / l)))) * (math.sqrt(-d) / math.sqrt(-l))) elif l <= 6e+165: tmp = (t_0 / math.sqrt((l / d))) * (1.0 - (h * (math.pow((D * ((M / d) / 2.0)), 2.0) * (0.5 / l)))) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(d / h)) tmp = 0.0 if (l <= -4.4e+25) tmp = Float64(t_0 * 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 (l <= 6e+165) tmp = Float64(Float64(t_0 / sqrt(Float64(l / d))) * Float64(1.0 - Float64(h * Float64((Float64(D * Float64(Float64(M / d) / 2.0)) ^ 2.0) * Float64(0.5 / 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) t_0 = sqrt((d / h)); tmp = 0.0; if (l <= -4.4e+25) tmp = t_0 * ((1.0 - (0.5 * ((((M / 2.0) * (D / d)) ^ 2.0) * (h / l)))) * (sqrt(-d) / sqrt(-l))); elseif (l <= 6e+165) tmp = (t_0 / sqrt((l / d))) * (1.0 - (h * (((D * ((M / d) / 2.0)) ^ 2.0) * (0.5 / l)))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -4.4e+25], N[(t$95$0 * 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[l, 6e+165], N[(N[(t$95$0 / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(h * N[(N[Power[N[(D * N[(N[(M / d), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h}}\\
\mathbf{if}\;\ell \leq -4.4 \cdot 10^{+25}:\\
\;\;\;\;t_0 \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}\;\ell \leq 6 \cdot 10^{+165}:\\
\;\;\;\;\frac{t_0}{\sqrt{\frac{\ell}{d}}} \cdot \left(1 - h \cdot \left({\left(D \cdot \frac{\frac{M}{d}}{2}\right)}^{2} \cdot \frac{0.5}{\ell}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -4.4000000000000001e25Initial program 59.5%
associate-*l*59.5%
metadata-eval59.5%
unpow1/259.5%
metadata-eval59.5%
unpow1/259.5%
associate-*l*59.5%
metadata-eval59.5%
times-frac59.6%
Simplified59.6%
frac-2neg59.6%
sqrt-div65.2%
Applied egg-rr65.2%
if -4.4000000000000001e25 < l < 5.99999999999999981e165Initial program 73.0%
metadata-eval73.0%
unpow1/273.0%
metadata-eval73.0%
unpow1/273.0%
*-commutative73.0%
associate-*l*73.0%
times-frac72.5%
metadata-eval72.5%
Simplified72.5%
frac-times73.0%
associate-/l*72.5%
*-commutative72.5%
Applied egg-rr72.5%
associate-/r/71.3%
*-commutative71.3%
Simplified71.3%
clear-num71.3%
sqrt-div71.7%
metadata-eval71.7%
Applied egg-rr71.7%
pow171.7%
un-div-inv71.7%
*-commutative71.7%
associate-*r/71.7%
Applied egg-rr71.7%
unpow171.7%
associate-/l*71.8%
*-commutative71.8%
*-commutative71.8%
Simplified71.8%
expm1-log1p-u71.4%
expm1-udef71.4%
associate-/r/71.4%
Applied egg-rr71.4%
expm1-def71.4%
expm1-log1p71.8%
associate-*r*76.5%
*-commutative76.5%
*-commutative76.5%
associate-/r*76.5%
Simplified76.5%
if 5.99999999999999981e165 < l Initial program 42.6%
Taylor expanded in d around inf 48.3%
*-commutative48.3%
associate-/r*48.2%
Simplified48.2%
sqrt-div64.6%
Applied egg-rr64.6%
Final simplification72.4%
(FPCore (d h l M D)
:precision binary64
(if (<= l 2.4e+165)
(*
(*
(sqrt (/ d l))
(- 1.0 (* 0.5 (* (pow (* (/ M 2.0) (/ D d)) 2.0) (/ h l)))))
(sqrt (/ d h)))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 2.4e+165) {
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((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= 2.4d+165) 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((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 2.4e+165) {
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((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 2.4e+165: 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((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 2.4e+165) 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(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 2.4e+165) tmp = (sqrt((d / l)) * (1.0 - (0.5 * ((((M / 2.0) * (D / d)) ^ 2.0) * (h / l))))) * sqrt((d / h)); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 2.4e+165], 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[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.4 \cdot 10^{+165}:\\
\;\;\;\;\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}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < 2.4e165Initial program 69.3%
associate-*l*69.3%
metadata-eval69.3%
unpow1/269.3%
metadata-eval69.3%
unpow1/269.3%
associate-*l*69.3%
metadata-eval69.3%
times-frac68.9%
Simplified68.9%
if 2.4e165 < l Initial program 42.6%
Taylor expanded in d around inf 48.3%
*-commutative48.3%
associate-/r*48.2%
Simplified48.2%
sqrt-div64.6%
Applied egg-rr64.6%
Final simplification68.4%
(FPCore (d h l M D)
:precision binary64
(if (<= l 3e+165)
(*
(- 1.0 (* (pow (* D (/ M (* d 2.0))) 2.0) (* 0.5 (/ h l))))
(* (sqrt (/ d l)) (sqrt (/ d h))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 3e+165) {
tmp = (1.0 - (pow((D * (M / (d * 2.0))), 2.0) * (0.5 * (h / l)))) * (sqrt((d / l)) * sqrt((d / h)));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= 3d+165) then
tmp = (1.0d0 - (((d_1 * (m / (d * 2.0d0))) ** 2.0d0) * (0.5d0 * (h / l)))) * (sqrt((d / l)) * sqrt((d / h)))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 3e+165) {
tmp = (1.0 - (Math.pow((D * (M / (d * 2.0))), 2.0) * (0.5 * (h / l)))) * (Math.sqrt((d / l)) * Math.sqrt((d / h)));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 3e+165: tmp = (1.0 - (math.pow((D * (M / (d * 2.0))), 2.0) * (0.5 * (h / l)))) * (math.sqrt((d / l)) * math.sqrt((d / h))) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 3e+165) tmp = Float64(Float64(1.0 - Float64((Float64(D * Float64(M / Float64(d * 2.0))) ^ 2.0) * Float64(0.5 * Float64(h / l)))) * Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 3e+165) tmp = (1.0 - (((D * (M / (d * 2.0))) ^ 2.0) * (0.5 * (h / l)))) * (sqrt((d / l)) * sqrt((d / h))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 3e+165], N[(N[(1.0 - N[(N[Power[N[(D * N[(M / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3 \cdot 10^{+165}:\\
\;\;\;\;\left(1 - {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < 2.9999999999999999e165Initial program 69.3%
metadata-eval69.3%
unpow1/269.3%
metadata-eval69.3%
unpow1/269.3%
*-commutative69.3%
associate-*l*69.3%
times-frac68.9%
metadata-eval68.9%
Simplified68.9%
frac-times69.3%
associate-/l*68.9%
*-commutative68.9%
Applied egg-rr68.9%
associate-/r/68.0%
*-commutative68.0%
Simplified68.0%
if 2.9999999999999999e165 < l Initial program 42.6%
Taylor expanded in d around inf 48.3%
*-commutative48.3%
associate-/r*48.2%
Simplified48.2%
sqrt-div64.6%
Applied egg-rr64.6%
Final simplification67.6%
(FPCore (d h l M D)
:precision binary64
(if (<= l 1.1e+159)
(*
(- 1.0 (/ (* h (* 0.5 (pow (* (/ D d) (* 0.5 M)) 2.0))) l))
(* (sqrt (/ d l)) (sqrt (/ d h))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 1.1e+159) {
tmp = (1.0 - ((h * (0.5 * pow(((D / d) * (0.5 * M)), 2.0))) / l)) * (sqrt((d / l)) * sqrt((d / h)));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= 1.1d+159) then
tmp = (1.0d0 - ((h * (0.5d0 * (((d_1 / d) * (0.5d0 * m)) ** 2.0d0))) / l)) * (sqrt((d / l)) * sqrt((d / h)))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 1.1e+159) {
tmp = (1.0 - ((h * (0.5 * Math.pow(((D / d) * (0.5 * M)), 2.0))) / l)) * (Math.sqrt((d / l)) * Math.sqrt((d / h)));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 1.1e+159: tmp = (1.0 - ((h * (0.5 * math.pow(((D / d) * (0.5 * M)), 2.0))) / l)) * (math.sqrt((d / l)) * math.sqrt((d / h))) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= 1.1e+159) tmp = Float64(Float64(1.0 - Float64(Float64(h * Float64(0.5 * (Float64(Float64(D / d) * Float64(0.5 * M)) ^ 2.0))) / l)) * Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h)))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= 1.1e+159) tmp = (1.0 - ((h * (0.5 * (((D / d) * (0.5 * M)) ^ 2.0))) / l)) * (sqrt((d / l)) * sqrt((d / h))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 1.1e+159], N[(N[(1.0 - N[(N[(h * N[(0.5 * N[Power[N[(N[(D / d), $MachinePrecision] * N[(0.5 * M), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.1 \cdot 10^{+159}:\\
\;\;\;\;\left(1 - \frac{h \cdot \left(0.5 \cdot {\left(\frac{D}{d} \cdot \left(0.5 \cdot M\right)\right)}^{2}\right)}{\ell}\right) \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < 1.1e159Initial program 69.3%
metadata-eval69.3%
unpow1/269.3%
metadata-eval69.3%
unpow1/269.3%
*-commutative69.3%
associate-*l*69.3%
times-frac68.9%
metadata-eval68.9%
Simplified68.9%
associate-*r*68.9%
frac-times69.3%
*-commutative69.3%
metadata-eval69.3%
associate-*r/71.2%
metadata-eval71.2%
*-commutative71.2%
frac-times70.8%
div-inv70.8%
metadata-eval70.8%
Applied egg-rr70.8%
if 1.1e159 < l Initial program 45.0%
Taylor expanded in d around inf 50.0%
*-commutative50.0%
associate-/r*50.0%
Simplified50.0%
sqrt-div64.8%
Applied egg-rr64.8%
Final simplification70.0%
(FPCore (d h l M D)
:precision binary64
(if (<= l 2.1e+165)
(*
(/ (sqrt (/ d h)) (sqrt (/ l d)))
(- 1.0 (* h (* (pow (* D (/ (/ M d) 2.0)) 2.0) (/ 0.5 l)))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= 2.1e+165) {
tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0 - (h * (pow((D * ((M / d) / 2.0)), 2.0) * (0.5 / 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 (l <= 2.1d+165) then
tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0d0 - (h * (((d_1 * ((m / d) / 2.0d0)) ** 2.0d0) * (0.5d0 / 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 (l <= 2.1e+165) {
tmp = (Math.sqrt((d / h)) / Math.sqrt((l / d))) * (1.0 - (h * (Math.pow((D * ((M / d) / 2.0)), 2.0) * (0.5 / l))));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= 2.1e+165: tmp = (math.sqrt((d / h)) / math.sqrt((l / d))) * (1.0 - (h * (math.pow((D * ((M / d) / 2.0)), 2.0) * (0.5 / 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 (l <= 2.1e+165) tmp = Float64(Float64(sqrt(Float64(d / h)) / sqrt(Float64(l / d))) * Float64(1.0 - Float64(h * Float64((Float64(D * Float64(Float64(M / d) / 2.0)) ^ 2.0) * Float64(0.5 / 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 (l <= 2.1e+165) tmp = (sqrt((d / h)) / sqrt((l / d))) * (1.0 - (h * (((D * ((M / d) / 2.0)) ^ 2.0) * (0.5 / l)))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, 2.1e+165], N[(N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(h * N[(N[Power[N[(D * N[(N[(M / d), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.1 \cdot 10^{+165}:\\
\;\;\;\;\frac{\sqrt{\frac{d}{h}}}{\sqrt{\frac{\ell}{d}}} \cdot \left(1 - h \cdot \left({\left(D \cdot \frac{\frac{M}{d}}{2}\right)}^{2} \cdot \frac{0.5}{\ell}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < 2.1000000000000001e165Initial program 69.3%
metadata-eval69.3%
unpow1/269.3%
metadata-eval69.3%
unpow1/269.3%
*-commutative69.3%
associate-*l*69.3%
times-frac68.9%
metadata-eval68.9%
Simplified68.9%
frac-times69.3%
associate-/l*68.9%
*-commutative68.9%
Applied egg-rr68.9%
associate-/r/68.0%
*-commutative68.0%
Simplified68.0%
clear-num67.6%
sqrt-div67.9%
metadata-eval67.9%
Applied egg-rr67.9%
pow167.9%
un-div-inv67.9%
*-commutative67.9%
associate-*r/67.9%
Applied egg-rr67.9%
unpow167.9%
associate-/l*67.9%
*-commutative67.9%
*-commutative67.9%
Simplified67.9%
expm1-log1p-u67.5%
expm1-udef67.5%
associate-/r/67.5%
Applied egg-rr67.5%
expm1-def67.5%
expm1-log1p67.9%
associate-*r*71.3%
*-commutative71.3%
*-commutative71.3%
associate-/r*71.3%
Simplified71.3%
if 2.1000000000000001e165 < l Initial program 42.6%
Taylor expanded in d around inf 48.3%
*-commutative48.3%
associate-/r*48.2%
Simplified48.2%
sqrt-div64.6%
Applied egg-rr64.6%
Final simplification70.5%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (/ d h))))
(if (<= M 7.8e-169)
(* (sqrt (/ d l)) t_0)
(if (<= M 2.7e-16)
(*
(/ t_0 (sqrt (/ l d)))
(- 1.0 (* 0.125 (* (* D (* (* M D) (/ M l))) (/ h (* d d))))))
(*
(sqrt (* (/ d l) (/ d h)))
(- 1.0 (* (* h (/ 0.5 l)) (pow (* M (* 0.5 (/ D d))) 2.0))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt((d / h));
double tmp;
if (M <= 7.8e-169) {
tmp = sqrt((d / l)) * t_0;
} else if (M <= 2.7e-16) {
tmp = (t_0 / sqrt((l / d))) * (1.0 - (0.125 * ((D * ((M * D) * (M / l))) * (h / (d * d)))));
} else {
tmp = sqrt(((d / l) * (d / h))) * (1.0 - ((h * (0.5 / l)) * pow((M * (0.5 * (D / d))), 2.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((d / h))
if (m <= 7.8d-169) then
tmp = sqrt((d / l)) * t_0
else if (m <= 2.7d-16) then
tmp = (t_0 / sqrt((l / d))) * (1.0d0 - (0.125d0 * ((d_1 * ((m * d_1) * (m / l))) * (h / (d * d)))))
else
tmp = sqrt(((d / l) * (d / h))) * (1.0d0 - ((h * (0.5d0 / l)) * ((m * (0.5d0 * (d_1 / d))) ** 2.0d0)))
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 (M <= 7.8e-169) {
tmp = Math.sqrt((d / l)) * t_0;
} else if (M <= 2.7e-16) {
tmp = (t_0 / Math.sqrt((l / d))) * (1.0 - (0.125 * ((D * ((M * D) * (M / l))) * (h / (d * d)))));
} else {
tmp = Math.sqrt(((d / l) * (d / h))) * (1.0 - ((h * (0.5 / l)) * Math.pow((M * (0.5 * (D / d))), 2.0)));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt((d / h)) tmp = 0 if M <= 7.8e-169: tmp = math.sqrt((d / l)) * t_0 elif M <= 2.7e-16: tmp = (t_0 / math.sqrt((l / d))) * (1.0 - (0.125 * ((D * ((M * D) * (M / l))) * (h / (d * d))))) else: tmp = math.sqrt(((d / l) * (d / h))) * (1.0 - ((h * (0.5 / l)) * math.pow((M * (0.5 * (D / d))), 2.0))) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(d / h)) tmp = 0.0 if (M <= 7.8e-169) tmp = Float64(sqrt(Float64(d / l)) * t_0); elseif (M <= 2.7e-16) tmp = Float64(Float64(t_0 / sqrt(Float64(l / d))) * Float64(1.0 - Float64(0.125 * Float64(Float64(D * Float64(Float64(M * D) * Float64(M / l))) * Float64(h / Float64(d * d)))))); else tmp = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(1.0 - Float64(Float64(h * Float64(0.5 / l)) * (Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt((d / h)); tmp = 0.0; if (M <= 7.8e-169) tmp = sqrt((d / l)) * t_0; elseif (M <= 2.7e-16) tmp = (t_0 / sqrt((l / d))) * (1.0 - (0.125 * ((D * ((M * D) * (M / l))) * (h / (d * d))))); else tmp = sqrt(((d / l) * (d / h))) * (1.0 - ((h * (0.5 / l)) * ((M * (0.5 * (D / d))) ^ 2.0))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[M, 7.8e-169], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[M, 2.7e-16], N[(N[(t$95$0 / N[Sqrt[N[(l / d), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.125 * N[(N[(D * N[(N[(M * D), $MachinePrecision] * N[(M / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(h / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[(h * N[(0.5 / l), $MachinePrecision]), $MachinePrecision] * N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{h}}\\
\mathbf{if}\;M \leq 7.8 \cdot 10^{-169}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot t_0\\
\mathbf{elif}\;M \leq 2.7 \cdot 10^{-16}:\\
\;\;\;\;\frac{t_0}{\sqrt{\frac{\ell}{d}}} \cdot \left(1 - 0.125 \cdot \left(\left(D \cdot \left(\left(M \cdot D\right) \cdot \frac{M}{\ell}\right)\right) \cdot \frac{h}{d \cdot d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \left(h \cdot \frac{0.5}{\ell}\right) \cdot {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\right)\\
\end{array}
\end{array}
if M < 7.79999999999999954e-169Initial program 63.7%
associate-*l*63.7%
metadata-eval63.7%
unpow1/263.7%
metadata-eval63.7%
unpow1/263.7%
sub-neg63.7%
+-commutative63.7%
*-commutative63.7%
distribute-rgt-neg-in63.7%
fma-def63.7%
Simplified62.4%
Taylor expanded in h around 0 44.7%
if 7.79999999999999954e-169 < M < 2.69999999999999999e-16Initial program 71.5%
metadata-eval71.5%
unpow1/271.5%
metadata-eval71.5%
unpow1/271.5%
*-commutative71.5%
associate-*l*71.5%
times-frac71.6%
metadata-eval71.6%
Simplified71.6%
frac-times71.5%
associate-/l*71.6%
*-commutative71.6%
Applied egg-rr71.6%
associate-/r/71.5%
*-commutative71.5%
Simplified71.5%
clear-num71.5%
sqrt-div73.8%
metadata-eval73.8%
Applied egg-rr73.8%
pow173.8%
un-div-inv73.8%
*-commutative73.8%
associate-*r/73.8%
Applied egg-rr73.8%
unpow173.8%
associate-/l*73.8%
*-commutative73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in D around 0 59.6%
associate-*r/59.6%
*-commutative59.6%
associate-*r/59.6%
associate-*r*56.4%
*-commutative56.4%
times-frac59.5%
unpow259.5%
unpow259.5%
swap-sqr63.2%
*-commutative63.2%
associate-*r*62.9%
*-commutative62.9%
associate-*r/66.0%
associate-*l*69.7%
unpow269.7%
Simplified69.7%
if 2.69999999999999999e-16 < M Initial program 69.0%
expm1-log1p-u23.6%
expm1-udef18.7%
Applied egg-rr15.6%
expm1-def19.3%
expm1-log1p59.2%
*-commutative59.2%
associate-*r/58.0%
*-commutative58.0%
*-commutative58.0%
Simplified58.0%
pow158.0%
*-commutative58.0%
associate-*r/58.0%
associate-/l*59.1%
Applied egg-rr59.1%
unpow159.1%
unpow259.1%
associate-*r*62.4%
associate-/r/62.4%
associate-*l/60.4%
*-commutative60.4%
associate-*r*60.4%
associate-*r/62.4%
associate-*l*62.4%
metadata-eval62.4%
times-frac62.4%
*-lft-identity62.4%
*-commutative62.4%
*-commutative62.4%
associate-/r/62.3%
associate-*l/60.4%
*-commutative60.4%
associate-*r*60.4%
associate-*r/62.3%
associate-*l*62.3%
metadata-eval62.3%
times-frac62.3%
Simplified59.2%
Final simplification52.1%
(FPCore (d h l M D)
:precision binary64
(if (<= M 2.2e-163)
(* (sqrt (/ d l)) (sqrt (/ d h)))
(*
(sqrt (* d (/ d (* h l))))
(- 1.0 (* h (* (/ 0.5 l) (pow (* D (/ M (* d 2.0))) 2.0)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (M <= 2.2e-163) {
tmp = sqrt((d / l)) * sqrt((d / h));
} else {
tmp = sqrt((d * (d / (h * l)))) * (1.0 - (h * ((0.5 / l) * pow((D * (M / (d * 2.0))), 2.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) :: tmp
if (m <= 2.2d-163) then
tmp = sqrt((d / l)) * sqrt((d / h))
else
tmp = sqrt((d * (d / (h * l)))) * (1.0d0 - (h * ((0.5d0 / l) * ((d_1 * (m / (d * 2.0d0))) ** 2.0d0))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (M <= 2.2e-163) {
tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
} else {
tmp = Math.sqrt((d * (d / (h * l)))) * (1.0 - (h * ((0.5 / l) * Math.pow((D * (M / (d * 2.0))), 2.0))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if M <= 2.2e-163: tmp = math.sqrt((d / l)) * math.sqrt((d / h)) else: tmp = math.sqrt((d * (d / (h * l)))) * (1.0 - (h * ((0.5 / l) * math.pow((D * (M / (d * 2.0))), 2.0)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (M <= 2.2e-163) tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))); else tmp = Float64(sqrt(Float64(d * Float64(d / Float64(h * l)))) * Float64(1.0 - Float64(h * Float64(Float64(0.5 / l) * (Float64(D * Float64(M / Float64(d * 2.0))) ^ 2.0))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (M <= 2.2e-163) tmp = sqrt((d / l)) * sqrt((d / h)); else tmp = sqrt((d * (d / (h * l)))) * (1.0 - (h * ((0.5 / l) * ((D * (M / (d * 2.0))) ^ 2.0)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[M, 2.2e-163], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d * N[(d / N[(h * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(h * N[(N[(0.5 / l), $MachinePrecision] * N[Power[N[(D * N[(M / N[(d * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq 2.2 \cdot 10^{-163}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{d \cdot \frac{d}{h \cdot \ell}} \cdot \left(1 - h \cdot \left(\frac{0.5}{\ell} \cdot {\left(D \cdot \frac{M}{d \cdot 2}\right)}^{2}\right)\right)\\
\end{array}
\end{array}
if M < 2.20000000000000011e-163Initial program 64.2%
associate-*l*64.2%
metadata-eval64.2%
unpow1/264.2%
metadata-eval64.2%
unpow1/264.2%
sub-neg64.2%
+-commutative64.2%
*-commutative64.2%
distribute-rgt-neg-in64.2%
fma-def64.2%
Simplified62.9%
Taylor expanded in h around 0 45.4%
if 2.20000000000000011e-163 < M Initial program 69.1%
metadata-eval69.1%
unpow1/269.1%
metadata-eval69.1%
unpow1/269.1%
*-commutative69.1%
associate-*l*69.1%
times-frac70.0%
metadata-eval70.0%
Simplified70.0%
frac-times69.1%
associate-/l*70.0%
*-commutative70.0%
Applied egg-rr70.0%
associate-/r/69.0%
*-commutative69.0%
Simplified69.0%
clear-num69.1%
sqrt-div69.6%
metadata-eval69.6%
Applied egg-rr69.6%
pow169.6%
un-div-inv69.7%
*-commutative69.7%
associate-*r/69.7%
Applied egg-rr69.7%
unpow169.7%
associate-/l*69.7%
*-commutative69.7%
*-commutative69.7%
Simplified69.7%
expm1-log1p-u30.2%
expm1-udef22.8%
sqrt-undiv17.5%
associate-/r/17.5%
Applied egg-rr17.5%
expm1-def22.7%
expm1-log1p56.1%
associate-/r/55.2%
*-commutative55.2%
associate-/l/49.8%
*-commutative49.8%
associate-*r*50.8%
*-commutative50.8%
Simplified50.8%
Final simplification47.6%
(FPCore (d h l M D)
:precision binary64
(if (<= M 1.4e-165)
(* (sqrt (/ d l)) (sqrt (/ d h)))
(*
(sqrt (* (/ d l) (/ d h)))
(- 1.0 (* (* h (/ 0.5 l)) (pow (* M (* 0.5 (/ D d))) 2.0))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (M <= 1.4e-165) {
tmp = sqrt((d / l)) * sqrt((d / h));
} else {
tmp = sqrt(((d / l) * (d / h))) * (1.0 - ((h * (0.5 / l)) * pow((M * (0.5 * (D / d))), 2.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) :: tmp
if (m <= 1.4d-165) then
tmp = sqrt((d / l)) * sqrt((d / h))
else
tmp = sqrt(((d / l) * (d / h))) * (1.0d0 - ((h * (0.5d0 / l)) * ((m * (0.5d0 * (d_1 / d))) ** 2.0d0)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (M <= 1.4e-165) {
tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
} else {
tmp = Math.sqrt(((d / l) * (d / h))) * (1.0 - ((h * (0.5 / l)) * Math.pow((M * (0.5 * (D / d))), 2.0)));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if M <= 1.4e-165: tmp = math.sqrt((d / l)) * math.sqrt((d / h)) else: tmp = math.sqrt(((d / l) * (d / h))) * (1.0 - ((h * (0.5 / l)) * math.pow((M * (0.5 * (D / d))), 2.0))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (M <= 1.4e-165) tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))); else tmp = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(1.0 - Float64(Float64(h * Float64(0.5 / l)) * (Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (M <= 1.4e-165) tmp = sqrt((d / l)) * sqrt((d / h)); else tmp = sqrt(((d / l) * (d / h))) * (1.0 - ((h * (0.5 / l)) * ((M * (0.5 * (D / d))) ^ 2.0))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[M, 1.4e-165], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[(h * N[(0.5 / l), $MachinePrecision]), $MachinePrecision] * N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq 1.4 \cdot 10^{-165}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \left(h \cdot \frac{0.5}{\ell}\right) \cdot {\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}\right)\\
\end{array}
\end{array}
if M < 1.4e-165Initial program 63.9%
associate-*l*63.9%
metadata-eval63.9%
unpow1/263.9%
metadata-eval63.9%
unpow1/263.9%
sub-neg63.9%
+-commutative63.9%
*-commutative63.9%
distribute-rgt-neg-in63.9%
fma-def63.9%
Simplified62.7%
Taylor expanded in h around 0 45.1%
if 1.4e-165 < M Initial program 69.4%
expm1-log1p-u31.2%
expm1-udef23.0%
Applied egg-rr18.4%
expm1-def23.6%
expm1-log1p56.7%
*-commutative56.7%
associate-*r/55.8%
*-commutative55.8%
*-commutative55.8%
Simplified55.8%
pow155.8%
*-commutative55.8%
associate-*r/55.8%
associate-/l*56.6%
Applied egg-rr56.6%
unpow156.6%
unpow256.6%
associate-*r*59.9%
associate-/r/59.9%
associate-*l/58.5%
*-commutative58.5%
associate-*r*58.5%
associate-*r/59.9%
associate-*l*59.9%
metadata-eval59.9%
times-frac59.9%
*-lft-identity59.9%
*-commutative59.9%
*-commutative59.9%
associate-/r/59.9%
associate-*l/58.5%
*-commutative58.5%
associate-*r*58.5%
associate-*r/59.9%
associate-*l*59.9%
metadata-eval59.9%
times-frac59.9%
Simplified56.7%
Final simplification50.0%
(FPCore (d h l M D)
:precision binary64
(if (<= M 2.6e-164)
(* (sqrt (/ d l)) (sqrt (/ d h)))
(*
(sqrt (/ d (/ h (/ d l))))
(- 1.0 (* (* 0.5 (/ h l)) (pow (/ (* D (* 0.5 M)) d) 2.0))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (M <= 2.6e-164) {
tmp = sqrt((d / l)) * sqrt((d / h));
} else {
tmp = sqrt((d / (h / (d / l)))) * (1.0 - ((0.5 * (h / l)) * pow(((D * (0.5 * M)) / d), 2.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) :: tmp
if (m <= 2.6d-164) then
tmp = sqrt((d / l)) * sqrt((d / h))
else
tmp = sqrt((d / (h / (d / l)))) * (1.0d0 - ((0.5d0 * (h / l)) * (((d_1 * (0.5d0 * m)) / d) ** 2.0d0)))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (M <= 2.6e-164) {
tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
} else {
tmp = Math.sqrt((d / (h / (d / l)))) * (1.0 - ((0.5 * (h / l)) * Math.pow(((D * (0.5 * M)) / d), 2.0)));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if M <= 2.6e-164: tmp = math.sqrt((d / l)) * math.sqrt((d / h)) else: tmp = math.sqrt((d / (h / (d / l)))) * (1.0 - ((0.5 * (h / l)) * math.pow(((D * (0.5 * M)) / d), 2.0))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (M <= 2.6e-164) tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))); else tmp = Float64(sqrt(Float64(d / Float64(h / Float64(d / l)))) * Float64(1.0 - Float64(Float64(0.5 * Float64(h / l)) * (Float64(Float64(D * Float64(0.5 * M)) / d) ^ 2.0)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (M <= 2.6e-164) tmp = sqrt((d / l)) * sqrt((d / h)); else tmp = sqrt((d / (h / (d / l)))) * (1.0 - ((0.5 * (h / l)) * (((D * (0.5 * M)) / d) ^ 2.0))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[M, 2.6e-164], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(d / N[(h / N[(d / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[(0.5 * N[(h / l), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(D * N[(0.5 * M), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq 2.6 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{d}{\frac{h}{\frac{d}{\ell}}}} \cdot \left(1 - \left(0.5 \cdot \frac{h}{\ell}\right) \cdot {\left(\frac{D \cdot \left(0.5 \cdot M\right)}{d}\right)}^{2}\right)\\
\end{array}
\end{array}
if M < 2.6000000000000002e-164Initial program 64.2%
associate-*l*64.2%
metadata-eval64.2%
unpow1/264.2%
metadata-eval64.2%
unpow1/264.2%
sub-neg64.2%
+-commutative64.2%
*-commutative64.2%
distribute-rgt-neg-in64.2%
fma-def64.2%
Simplified62.9%
Taylor expanded in h around 0 45.4%
if 2.6000000000000002e-164 < M Initial program 69.1%
expm1-log1p-u30.6%
expm1-udef22.4%
Applied egg-rr17.7%
expm1-def22.9%
expm1-log1p56.3%
*-commutative56.3%
associate-*r/55.4%
*-commutative55.4%
*-commutative55.4%
Simplified55.4%
*-un-lft-identity55.4%
*-commutative55.4%
Applied egg-rr55.4%
*-lft-identity55.4%
associate-*l/52.6%
associate-/l*54.5%
Simplified54.5%
Final simplification49.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(*
(sqrt (* (/ d l) (/ d h)))
(* -0.125 (* (* (/ D d) (/ D d)) (/ (* M M) (/ l h)))))))
(if (<= M 7.5e-77)
(* (sqrt (/ d l)) (sqrt (/ d h)))
(if (<= M 1.25e-46)
t_0
(if (<= M 7.2e-7)
(* d (sqrt (/ (/ 1.0 h) l)))
(if (<= M 4.5e+15)
(* -0.125 (* (sqrt (/ h (pow l 3.0))) (/ (* D D) (/ d (* M M)))))
t_0))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h))));
double tmp;
if (M <= 7.5e-77) {
tmp = sqrt((d / l)) * sqrt((d / h));
} else if (M <= 1.25e-46) {
tmp = t_0;
} else if (M <= 7.2e-7) {
tmp = d * sqrt(((1.0 / h) / l));
} else if (M <= 4.5e+15) {
tmp = -0.125 * (sqrt((h / pow(l, 3.0))) * ((D * D) / (d / (M * M))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(((d / l) * (d / h))) * ((-0.125d0) * (((d_1 / d) * (d_1 / d)) * ((m * m) / (l / h))))
if (m <= 7.5d-77) then
tmp = sqrt((d / l)) * sqrt((d / h))
else if (m <= 1.25d-46) then
tmp = t_0
else if (m <= 7.2d-7) then
tmp = d * sqrt(((1.0d0 / h) / l))
else if (m <= 4.5d+15) then
tmp = (-0.125d0) * (sqrt((h / (l ** 3.0d0))) * ((d_1 * d_1) / (d / (m * m))))
else
tmp = 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(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h))));
double tmp;
if (M <= 7.5e-77) {
tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
} else if (M <= 1.25e-46) {
tmp = t_0;
} else if (M <= 7.2e-7) {
tmp = d * Math.sqrt(((1.0 / h) / l));
} else if (M <= 4.5e+15) {
tmp = -0.125 * (Math.sqrt((h / Math.pow(l, 3.0))) * ((D * D) / (d / (M * M))));
} else {
tmp = t_0;
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h)))) tmp = 0 if M <= 7.5e-77: tmp = math.sqrt((d / l)) * math.sqrt((d / h)) elif M <= 1.25e-46: tmp = t_0 elif M <= 7.2e-7: tmp = d * math.sqrt(((1.0 / h) / l)) elif M <= 4.5e+15: tmp = -0.125 * (math.sqrt((h / math.pow(l, 3.0))) * ((D * D) / (d / (M * M)))) else: tmp = t_0 return tmp
function code(d, h, l, M, D) t_0 = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(-0.125 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(Float64(M * M) / Float64(l / h))))) tmp = 0.0 if (M <= 7.5e-77) tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))); elseif (M <= 1.25e-46) tmp = t_0; elseif (M <= 7.2e-7) tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); elseif (M <= 4.5e+15) tmp = Float64(-0.125 * Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(Float64(D * D) / Float64(d / Float64(M * M))))); else tmp = t_0; end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h)))); tmp = 0.0; if (M <= 7.5e-77) tmp = sqrt((d / l)) * sqrt((d / h)); elseif (M <= 1.25e-46) tmp = t_0; elseif (M <= 7.2e-7) tmp = d * sqrt(((1.0 / h) / l)); elseif (M <= 4.5e+15) tmp = -0.125 * (sqrt((h / (l ^ 3.0))) * ((D * D) / (d / (M * M)))); else tmp = t_0; end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M, 7.5e-77], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 1.25e-46], t$95$0, If[LessEqual[M, 7.2e-7], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 4.5e+15], N[(-0.125 * N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / N[(d / N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(-0.125 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{M \cdot M}{\frac{\ell}{h}}\right)\right)\\
\mathbf{if}\;M \leq 7.5 \cdot 10^{-77}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\mathbf{elif}\;M \leq 1.25 \cdot 10^{-46}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;M \leq 7.2 \cdot 10^{-7}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;M \leq 4.5 \cdot 10^{+15}:\\
\;\;\;\;-0.125 \cdot \left(\sqrt{\frac{h}{{\ell}^{3}}} \cdot \frac{D \cdot D}{\frac{d}{M \cdot M}}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if M < 7.5000000000000006e-77Initial program 64.6%
associate-*l*64.6%
metadata-eval64.6%
unpow1/264.6%
metadata-eval64.6%
unpow1/264.6%
sub-neg64.6%
+-commutative64.6%
*-commutative64.6%
distribute-rgt-neg-in64.6%
fma-def64.6%
Simplified63.5%
Taylor expanded in h around 0 46.9%
if 7.5000000000000006e-77 < M < 1.24999999999999998e-46 or 4.5e15 < M Initial program 71.2%
expm1-log1p-u22.0%
expm1-udef18.2%
Applied egg-rr13.8%
expm1-def16.2%
expm1-log1p59.4%
*-commutative59.4%
sub-neg59.4%
+-commutative59.4%
distribute-rgt-neg-in59.4%
fma-def59.4%
associate-*r/58.2%
associate-*l*58.2%
associate-/l*59.4%
*-commutative59.4%
distribute-rgt-neg-in59.4%
metadata-eval59.4%
Simplified59.4%
Taylor expanded in M around inf 28.5%
times-frac27.2%
unpow227.2%
unpow227.2%
times-frac35.5%
associate-/l*36.7%
unpow236.7%
Simplified36.7%
if 1.24999999999999998e-46 < M < 7.19999999999999989e-7Initial program 46.6%
Taylor expanded in d around inf 18.2%
*-commutative18.2%
associate-/r*18.2%
Simplified18.2%
Taylor expanded in d around 0 18.2%
*-commutative18.2%
associate-/l/18.2%
Simplified18.2%
if 7.19999999999999989e-7 < M < 4.5e15Initial program 69.6%
Taylor expanded in d around 0 31.8%
associate-/l*31.8%
unpow231.8%
unpow231.8%
Simplified31.8%
Final simplification42.5%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0
(*
(sqrt (* (/ d l) (/ d h)))
(* -0.125 (* (* (/ D d) (/ D d)) (/ (* M M) (/ l h)))))))
(if (<= M 6.6e-77)
(* (sqrt (/ d l)) (sqrt (/ d h)))
(if (<= M 1.1e-47)
t_0
(if (<= M 1.5e-8)
(* d (sqrt (/ (/ 1.0 h) l)))
(if (<= M 2.3e+15)
(* -0.125 (/ (* D (* M (* M D))) (/ d (sqrt (/ h (pow l 3.0))))))
t_0))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h))));
double tmp;
if (M <= 6.6e-77) {
tmp = sqrt((d / l)) * sqrt((d / h));
} else if (M <= 1.1e-47) {
tmp = t_0;
} else if (M <= 1.5e-8) {
tmp = d * sqrt(((1.0 / h) / l));
} else if (M <= 2.3e+15) {
tmp = -0.125 * ((D * (M * (M * D))) / (d / sqrt((h / pow(l, 3.0)))));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(((d / l) * (d / h))) * ((-0.125d0) * (((d_1 / d) * (d_1 / d)) * ((m * m) / (l / h))))
if (m <= 6.6d-77) then
tmp = sqrt((d / l)) * sqrt((d / h))
else if (m <= 1.1d-47) then
tmp = t_0
else if (m <= 1.5d-8) then
tmp = d * sqrt(((1.0d0 / h) / l))
else if (m <= 2.3d+15) then
tmp = (-0.125d0) * ((d_1 * (m * (m * d_1))) / (d / sqrt((h / (l ** 3.0d0)))))
else
tmp = 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(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h))));
double tmp;
if (M <= 6.6e-77) {
tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
} else if (M <= 1.1e-47) {
tmp = t_0;
} else if (M <= 1.5e-8) {
tmp = d * Math.sqrt(((1.0 / h) / l));
} else if (M <= 2.3e+15) {
tmp = -0.125 * ((D * (M * (M * D))) / (d / Math.sqrt((h / Math.pow(l, 3.0)))));
} else {
tmp = t_0;
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h)))) tmp = 0 if M <= 6.6e-77: tmp = math.sqrt((d / l)) * math.sqrt((d / h)) elif M <= 1.1e-47: tmp = t_0 elif M <= 1.5e-8: tmp = d * math.sqrt(((1.0 / h) / l)) elif M <= 2.3e+15: tmp = -0.125 * ((D * (M * (M * D))) / (d / math.sqrt((h / math.pow(l, 3.0))))) else: tmp = t_0 return tmp
function code(d, h, l, M, D) t_0 = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(-0.125 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(Float64(M * M) / Float64(l / h))))) tmp = 0.0 if (M <= 6.6e-77) tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))); elseif (M <= 1.1e-47) tmp = t_0; elseif (M <= 1.5e-8) tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); elseif (M <= 2.3e+15) tmp = Float64(-0.125 * Float64(Float64(D * Float64(M * Float64(M * D))) / Float64(d / sqrt(Float64(h / (l ^ 3.0)))))); else tmp = t_0; end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h)))); tmp = 0.0; if (M <= 6.6e-77) tmp = sqrt((d / l)) * sqrt((d / h)); elseif (M <= 1.1e-47) tmp = t_0; elseif (M <= 1.5e-8) tmp = d * sqrt(((1.0 / h) / l)); elseif (M <= 2.3e+15) tmp = -0.125 * ((D * (M * (M * D))) / (d / sqrt((h / (l ^ 3.0))))); else tmp = t_0; end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[M, 6.6e-77], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 1.1e-47], t$95$0, If[LessEqual[M, 1.5e-8], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 2.3e+15], N[(-0.125 * N[(N[(D * N[(M * N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d / N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(-0.125 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{M \cdot M}{\frac{\ell}{h}}\right)\right)\\
\mathbf{if}\;M \leq 6.6 \cdot 10^{-77}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\mathbf{elif}\;M \leq 1.1 \cdot 10^{-47}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;M \leq 1.5 \cdot 10^{-8}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;M \leq 2.3 \cdot 10^{+15}:\\
\;\;\;\;-0.125 \cdot \frac{D \cdot \left(M \cdot \left(M \cdot D\right)\right)}{\frac{d}{\sqrt{\frac{h}{{\ell}^{3}}}}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if M < 6.59999999999999982e-77Initial program 64.6%
associate-*l*64.6%
metadata-eval64.6%
unpow1/264.6%
metadata-eval64.6%
unpow1/264.6%
sub-neg64.6%
+-commutative64.6%
*-commutative64.6%
distribute-rgt-neg-in64.6%
fma-def64.6%
Simplified63.5%
Taylor expanded in h around 0 46.9%
if 6.59999999999999982e-77 < M < 1.10000000000000009e-47 or 2.3e15 < M Initial program 71.2%
expm1-log1p-u22.0%
expm1-udef18.2%
Applied egg-rr13.8%
expm1-def16.2%
expm1-log1p59.4%
*-commutative59.4%
sub-neg59.4%
+-commutative59.4%
distribute-rgt-neg-in59.4%
fma-def59.4%
associate-*r/58.2%
associate-*l*58.2%
associate-/l*59.4%
*-commutative59.4%
distribute-rgt-neg-in59.4%
metadata-eval59.4%
Simplified59.4%
Taylor expanded in M around inf 28.5%
times-frac27.2%
unpow227.2%
unpow227.2%
times-frac35.5%
associate-/l*36.7%
unpow236.7%
Simplified36.7%
if 1.10000000000000009e-47 < M < 1.49999999999999987e-8Initial program 46.6%
Taylor expanded in d around inf 18.2%
*-commutative18.2%
associate-/r*18.2%
Simplified18.2%
Taylor expanded in d around 0 18.2%
*-commutative18.2%
associate-/l/18.2%
Simplified18.2%
if 1.49999999999999987e-8 < M < 2.3e15Initial program 69.6%
Taylor expanded in d around 0 31.8%
associate-*l/31.8%
*-commutative31.8%
unpow231.8%
unpow231.8%
swap-sqr31.8%
associate-/l*31.9%
*-commutative31.9%
associate-*l*31.9%
*-commutative31.9%
Simplified31.9%
Final simplification42.5%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (* (/ d l) (/ d h)))))
(if (<= l -1.85e-118)
(* d (- (sqrt (/ (/ 1.0 l) h))))
(if (<= l -2.7e-169)
(* t_0 (* -0.125 (* (/ (* D D) (* d d)) (/ (* h (* M M)) l))))
(if (<= l -8e-206)
(* d (- (pow (* h l) -0.5)))
(if (<= l 8.5e-286)
(* t_0 (* -0.125 (* (* (/ D d) (/ D d)) (/ (* M M) (/ l h)))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt(((d / l) * (d / h)));
double tmp;
if (l <= -1.85e-118) {
tmp = d * -sqrt(((1.0 / l) / h));
} else if (l <= -2.7e-169) {
tmp = t_0 * (-0.125 * (((D * D) / (d * d)) * ((h * (M * M)) / l)));
} else if (l <= -8e-206) {
tmp = d * -pow((h * l), -0.5);
} else if (l <= 8.5e-286) {
tmp = t_0 * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h))));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(((d / l) * (d / h)))
if (l <= (-1.85d-118)) then
tmp = d * -sqrt(((1.0d0 / l) / h))
else if (l <= (-2.7d-169)) then
tmp = t_0 * ((-0.125d0) * (((d_1 * d_1) / (d * d)) * ((h * (m * m)) / l)))
else if (l <= (-8d-206)) then
tmp = d * -((h * l) ** (-0.5d0))
else if (l <= 8.5d-286) then
tmp = t_0 * ((-0.125d0) * (((d_1 / d) * (d_1 / d)) * ((m * m) / (l / h))))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double t_0 = Math.sqrt(((d / l) * (d / h)));
double tmp;
if (l <= -1.85e-118) {
tmp = d * -Math.sqrt(((1.0 / l) / h));
} else if (l <= -2.7e-169) {
tmp = t_0 * (-0.125 * (((D * D) / (d * d)) * ((h * (M * M)) / l)));
} else if (l <= -8e-206) {
tmp = d * -Math.pow((h * l), -0.5);
} else if (l <= 8.5e-286) {
tmp = t_0 * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h))));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt(((d / l) * (d / h))) tmp = 0 if l <= -1.85e-118: tmp = d * -math.sqrt(((1.0 / l) / h)) elif l <= -2.7e-169: tmp = t_0 * (-0.125 * (((D * D) / (d * d)) * ((h * (M * M)) / l))) elif l <= -8e-206: tmp = d * -math.pow((h * l), -0.5) elif l <= 8.5e-286: tmp = t_0 * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h)))) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(Float64(d / l) * Float64(d / h))) tmp = 0.0 if (l <= -1.85e-118) tmp = Float64(d * Float64(-sqrt(Float64(Float64(1.0 / l) / h)))); elseif (l <= -2.7e-169) tmp = Float64(t_0 * Float64(-0.125 * Float64(Float64(Float64(D * D) / Float64(d * d)) * Float64(Float64(h * Float64(M * M)) / l)))); elseif (l <= -8e-206) tmp = Float64(d * Float64(-(Float64(h * l) ^ -0.5))); elseif (l <= 8.5e-286) tmp = Float64(t_0 * Float64(-0.125 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(Float64(M * M) / Float64(l / h))))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt(((d / l) * (d / h))); tmp = 0.0; if (l <= -1.85e-118) tmp = d * -sqrt(((1.0 / l) / h)); elseif (l <= -2.7e-169) tmp = t_0 * (-0.125 * (((D * D) / (d * d)) * ((h * (M * M)) / l))); elseif (l <= -8e-206) tmp = d * -((h * l) ^ -0.5); elseif (l <= 8.5e-286) tmp = t_0 * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h)))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l, -1.85e-118], N[(d * (-N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[l, -2.7e-169], N[(t$95$0 * N[(-0.125 * N[(N[(N[(D * D), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -8e-206], N[(d * (-N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision])), $MachinePrecision], If[LessEqual[l, 8.5e-286], N[(t$95$0 * N[(-0.125 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{if}\;\ell \leq -1.85 \cdot 10^{-118}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\
\mathbf{elif}\;\ell \leq -2.7 \cdot 10^{-169}:\\
\;\;\;\;t_0 \cdot \left(-0.125 \cdot \left(\frac{D \cdot D}{d \cdot d} \cdot \frac{h \cdot \left(M \cdot M\right)}{\ell}\right)\right)\\
\mathbf{elif}\;\ell \leq -8 \cdot 10^{-206}:\\
\;\;\;\;d \cdot \left(-{\left(h \cdot \ell\right)}^{-0.5}\right)\\
\mathbf{elif}\;\ell \leq 8.5 \cdot 10^{-286}:\\
\;\;\;\;t_0 \cdot \left(-0.125 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{M \cdot M}{\frac{\ell}{h}}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -1.85000000000000007e-118Initial program 63.9%
metadata-eval63.9%
unpow1/263.9%
metadata-eval63.9%
unpow1/263.9%
*-commutative63.9%
associate-*l*63.9%
times-frac64.0%
metadata-eval64.0%
Simplified64.0%
frac-times63.9%
associate-/l*64.0%
*-commutative64.0%
Applied egg-rr64.0%
associate-/r/63.9%
*-commutative63.9%
Simplified63.9%
clear-num62.8%
sqrt-div62.7%
metadata-eval62.7%
Applied egg-rr62.7%
Taylor expanded in d around -inf 49.4%
mul-1-neg49.4%
distribute-rgt-neg-in49.4%
associate-/r*50.5%
Simplified50.5%
if -1.85000000000000007e-118 < l < -2.7000000000000002e-169Initial program 64.3%
expm1-log1p-u7.1%
expm1-udef7.1%
Applied egg-rr7.1%
expm1-def7.1%
expm1-log1p64.3%
*-commutative64.3%
sub-neg64.3%
+-commutative64.3%
distribute-rgt-neg-in64.3%
fma-def64.3%
associate-*r/64.3%
associate-*l*64.3%
associate-/l*64.3%
*-commutative64.3%
distribute-rgt-neg-in64.3%
metadata-eval64.3%
Simplified64.3%
Taylor expanded in M around inf 64.4%
times-frac50.4%
unpow250.4%
unpow250.4%
unpow250.4%
Simplified50.4%
if -2.7000000000000002e-169 < l < -8.00000000000000023e-206Initial program 87.5%
metadata-eval87.5%
unpow1/287.5%
metadata-eval87.5%
unpow1/287.5%
*-commutative87.5%
associate-*l*87.5%
times-frac87.5%
metadata-eval87.5%
Simplified87.5%
frac-times87.5%
associate-/l*87.5%
*-commutative87.5%
Applied egg-rr87.5%
associate-/r/87.5%
*-commutative87.5%
Simplified87.5%
clear-num87.5%
sqrt-div87.5%
metadata-eval87.5%
Applied egg-rr87.5%
pow187.5%
un-div-inv87.5%
*-commutative87.5%
associate-*r/87.5%
Applied egg-rr87.5%
unpow187.5%
associate-/l*87.5%
*-commutative87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in d around -inf 75.7%
mul-1-neg75.7%
distribute-rgt-neg-in75.7%
unpow-175.7%
sqr-pow75.7%
rem-sqrt-square75.7%
sqr-pow75.5%
fabs-sqr75.5%
sqr-pow75.7%
*-commutative75.7%
metadata-eval75.7%
Simplified75.7%
if -8.00000000000000023e-206 < l < 8.4999999999999998e-286Initial program 66.9%
expm1-log1p-u4.0%
expm1-udef4.0%
Applied egg-rr0.6%
expm1-def0.6%
expm1-log1p63.0%
*-commutative63.0%
sub-neg63.0%
+-commutative63.0%
distribute-rgt-neg-in63.0%
fma-def63.0%
associate-*r/63.0%
associate-*l*63.0%
associate-/l*63.0%
*-commutative63.0%
distribute-rgt-neg-in63.0%
metadata-eval63.0%
Simplified63.0%
Taylor expanded in M around inf 37.5%
times-frac41.7%
unpow241.7%
unpow241.7%
times-frac58.3%
associate-/l*58.3%
unpow258.3%
Simplified58.3%
if 8.4999999999999998e-286 < l Initial program 66.7%
Taylor expanded in d around inf 41.9%
*-commutative41.9%
associate-/r*41.9%
Simplified41.9%
sqrt-div50.4%
Applied egg-rr50.4%
Final simplification52.0%
(FPCore (d h l M D)
:precision binary64
(if (<= M 6.6e-77)
(* (sqrt (/ d l)) (sqrt (/ d h)))
(*
(sqrt (* (/ d l) (/ d h)))
(* -0.125 (* (* (/ D d) (/ D d)) (/ (* M M) (/ l h)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (M <= 6.6e-77) {
tmp = sqrt((d / l)) * sqrt((d / h));
} else {
tmp = sqrt(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (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 (m <= 6.6d-77) then
tmp = sqrt((d / l)) * sqrt((d / h))
else
tmp = sqrt(((d / l) * (d / h))) * ((-0.125d0) * (((d_1 / d) * (d_1 / d)) * ((m * m) / (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 (M <= 6.6e-77) {
tmp = Math.sqrt((d / l)) * Math.sqrt((d / h));
} else {
tmp = Math.sqrt(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if M <= 6.6e-77: tmp = math.sqrt((d / l)) * math.sqrt((d / h)) else: tmp = math.sqrt(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (M <= 6.6e-77) tmp = Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))); else tmp = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(-0.125 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(Float64(M * M) / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (M <= 6.6e-77) tmp = sqrt((d / l)) * sqrt((d / h)); else tmp = sqrt(((d / l) * (d / h))) * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[M, 6.6e-77], N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;M \leq 6.6 \cdot 10^{-77}:\\
\;\;\;\;\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(-0.125 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{M \cdot M}{\frac{\ell}{h}}\right)\right)\\
\end{array}
\end{array}
if M < 6.59999999999999982e-77Initial program 64.6%
associate-*l*64.6%
metadata-eval64.6%
unpow1/264.6%
metadata-eval64.6%
unpow1/264.6%
sub-neg64.6%
+-commutative64.6%
*-commutative64.6%
distribute-rgt-neg-in64.6%
fma-def64.6%
Simplified63.5%
Taylor expanded in h around 0 46.9%
if 6.59999999999999982e-77 < M Initial program 69.2%
expm1-log1p-u25.6%
expm1-udef19.4%
Applied egg-rr14.9%
expm1-def18.9%
expm1-log1p56.5%
*-commutative56.5%
sub-neg56.5%
+-commutative56.5%
distribute-rgt-neg-in56.5%
fma-def56.5%
associate-*r/55.4%
associate-*l*55.4%
associate-/l*56.4%
*-commutative56.4%
distribute-rgt-neg-in56.4%
metadata-eval56.4%
Simplified56.4%
Taylor expanded in M around inf 23.4%
times-frac23.4%
unpow223.4%
unpow223.4%
times-frac31.4%
associate-/l*32.5%
unpow232.5%
Simplified32.5%
Final simplification41.7%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (* (/ d l) (/ d h)))))
(if (<= M 1.1e-213)
t_0
(if (<= M 5.4e-197)
(* d (sqrt (/ (/ 1.0 h) l)))
(if (<= M 2.45e-77)
t_0
(* t_0 (* -0.125 (* (* (/ D d) (/ D d)) (/ (* M M) (/ l h))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt(((d / l) * (d / h)));
double tmp;
if (M <= 1.1e-213) {
tmp = t_0;
} else if (M <= 5.4e-197) {
tmp = d * sqrt(((1.0 / h) / l));
} else if (M <= 2.45e-77) {
tmp = t_0;
} else {
tmp = t_0 * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (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) :: t_0
real(8) :: tmp
t_0 = sqrt(((d / l) * (d / h)))
if (m <= 1.1d-213) then
tmp = t_0
else if (m <= 5.4d-197) then
tmp = d * sqrt(((1.0d0 / h) / l))
else if (m <= 2.45d-77) then
tmp = t_0
else
tmp = t_0 * ((-0.125d0) * (((d_1 / d) * (d_1 / d)) * ((m * m) / (l / h))))
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) * (d / h)));
double tmp;
if (M <= 1.1e-213) {
tmp = t_0;
} else if (M <= 5.4e-197) {
tmp = d * Math.sqrt(((1.0 / h) / l));
} else if (M <= 2.45e-77) {
tmp = t_0;
} else {
tmp = t_0 * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h))));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt(((d / l) * (d / h))) tmp = 0 if M <= 1.1e-213: tmp = t_0 elif M <= 5.4e-197: tmp = d * math.sqrt(((1.0 / h) / l)) elif M <= 2.45e-77: tmp = t_0 else: tmp = t_0 * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h)))) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(Float64(d / l) * Float64(d / h))) tmp = 0.0 if (M <= 1.1e-213) tmp = t_0; elseif (M <= 5.4e-197) tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); elseif (M <= 2.45e-77) tmp = t_0; else tmp = Float64(t_0 * Float64(-0.125 * Float64(Float64(Float64(D / d) * Float64(D / d)) * Float64(Float64(M * M) / Float64(l / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt(((d / l) * (d / h))); tmp = 0.0; if (M <= 1.1e-213) tmp = t_0; elseif (M <= 5.4e-197) tmp = d * sqrt(((1.0 / h) / l)); elseif (M <= 2.45e-77) tmp = t_0; else tmp = t_0 * (-0.125 * (((D / d) * (D / d)) * ((M * M) / (l / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := Block[{t$95$0 = N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[M, 1.1e-213], t$95$0, If[LessEqual[M, 5.4e-197], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[M, 2.45e-77], t$95$0, N[(t$95$0 * N[(-0.125 * N[(N[(N[(D / d), $MachinePrecision] * N[(D / d), $MachinePrecision]), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / N[(l / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
\mathbf{if}\;M \leq 1.1 \cdot 10^{-213}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;M \leq 5.4 \cdot 10^{-197}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\mathbf{elif}\;M \leq 2.45 \cdot 10^{-77}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(-0.125 \cdot \left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \frac{M \cdot M}{\frac{\ell}{h}}\right)\right)\\
\end{array}
\end{array}
if M < 1.10000000000000005e-213 or 5.40000000000000034e-197 < M < 2.4499999999999999e-77Initial program 65.1%
expm1-log1p-u42.5%
expm1-udef30.2%
Applied egg-rr24.3%
expm1-def31.0%
expm1-log1p52.2%
*-commutative52.2%
sub-neg52.2%
+-commutative52.2%
distribute-rgt-neg-in52.2%
fma-def52.2%
associate-*r/52.9%
associate-*l*52.9%
associate-/l*52.3%
*-commutative52.3%
distribute-rgt-neg-in52.3%
metadata-eval52.3%
Simplified52.3%
Taylor expanded in M around 0 35.9%
if 1.10000000000000005e-213 < M < 5.40000000000000034e-197Initial program 53.0%
Taylor expanded in d around inf 69.5%
*-commutative69.5%
associate-/r*69.5%
Simplified69.5%
Taylor expanded in d around 0 69.5%
*-commutative69.5%
associate-/l/69.5%
Simplified69.5%
if 2.4499999999999999e-77 < M Initial program 69.2%
expm1-log1p-u25.6%
expm1-udef19.4%
Applied egg-rr14.9%
expm1-def18.9%
expm1-log1p56.5%
*-commutative56.5%
sub-neg56.5%
+-commutative56.5%
distribute-rgt-neg-in56.5%
fma-def56.5%
associate-*r/55.4%
associate-*l*55.4%
associate-/l*56.4%
*-commutative56.4%
distribute-rgt-neg-in56.4%
metadata-eval56.4%
Simplified56.4%
Taylor expanded in M around inf 23.4%
times-frac23.4%
unpow223.4%
unpow223.4%
times-frac31.4%
associate-/l*32.5%
unpow232.5%
Simplified32.5%
Final simplification35.4%
(FPCore (d h l M D) :precision binary64 (if (<= l -1.18e-216) (* d (- (sqrt (/ (/ 1.0 l) h)))) (* d (sqrt (/ (/ 1.0 h) l)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.18e-216) {
tmp = d * -sqrt(((1.0 / l) / h));
} else {
tmp = d * sqrt(((1.0 / h) / 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 (l <= (-1.18d-216)) then
tmp = d * -sqrt(((1.0d0 / l) / h))
else
tmp = d * sqrt(((1.0d0 / h) / l))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.18e-216) {
tmp = d * -Math.sqrt(((1.0 / l) / h));
} else {
tmp = d * Math.sqrt(((1.0 / h) / l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.18e-216: tmp = d * -math.sqrt(((1.0 / l) / h)) else: tmp = d * math.sqrt(((1.0 / h) / l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.18e-216) tmp = Float64(d * Float64(-sqrt(Float64(Float64(1.0 / l) / h)))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.18e-216) tmp = d * -sqrt(((1.0 / l) / h)); else tmp = d * sqrt(((1.0 / h) / l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.18e-216], N[(d * (-N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.18 \cdot 10^{-216}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{\frac{1}{\ell}}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\end{array}
\end{array}
if l < -1.18e-216Initial 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%
frac-times65.7%
associate-/l*65.7%
*-commutative65.7%
Applied egg-rr65.7%
associate-/r/65.7%
*-commutative65.7%
Simplified65.7%
clear-num64.8%
sqrt-div64.7%
metadata-eval64.7%
Applied egg-rr64.7%
Taylor expanded in d around -inf 47.0%
mul-1-neg47.0%
distribute-rgt-neg-in47.0%
associate-/r*47.8%
Simplified47.8%
if -1.18e-216 < l Initial program 66.7%
Taylor expanded in d around inf 38.7%
*-commutative38.7%
associate-/r*38.7%
Simplified38.7%
Taylor expanded in d around 0 38.7%
*-commutative38.7%
associate-/l/38.7%
Simplified38.7%
Final simplification42.6%
(FPCore (d h l M D) :precision binary64 (let* ((t_0 (pow (* h l) -0.5))) (if (<= d 5.8e-204) (* d (- t_0)) (* d t_0))))
double code(double d, double h, double l, double M, double D) {
double t_0 = pow((h * l), -0.5);
double tmp;
if (d <= 5.8e-204) {
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 = (h * l) ** (-0.5d0)
if (d <= 5.8d-204) 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.pow((h * l), -0.5);
double tmp;
if (d <= 5.8e-204) {
tmp = d * -t_0;
} else {
tmp = d * t_0;
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.pow((h * l), -0.5) tmp = 0 if d <= 5.8e-204: tmp = d * -t_0 else: tmp = d * t_0 return tmp
function code(d, h, l, M, D) t_0 = Float64(h * l) ^ -0.5 tmp = 0.0 if (d <= 5.8e-204) 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 = (h * l) ^ -0.5; tmp = 0.0; if (d <= 5.8e-204) 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[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[d, 5.8e-204], N[(d * (-t$95$0)), $MachinePrecision], N[(d * t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(h \cdot \ell\right)}^{-0.5}\\
\mathbf{if}\;d \leq 5.8 \cdot 10^{-204}:\\
\;\;\;\;d \cdot \left(-t_0\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot t_0\\
\end{array}
\end{array}
if d < 5.80000000000000018e-204Initial program 62.9%
metadata-eval62.9%
unpow1/262.9%
metadata-eval62.9%
unpow1/262.9%
*-commutative62.9%
associate-*l*62.9%
times-frac62.9%
metadata-eval62.9%
Simplified62.9%
frac-times62.9%
associate-/l*62.9%
*-commutative62.9%
Applied egg-rr62.9%
associate-/r/61.6%
*-commutative61.6%
Simplified61.6%
clear-num61.0%
sqrt-div60.9%
metadata-eval60.9%
Applied egg-rr60.9%
pow160.9%
un-div-inv60.9%
*-commutative60.9%
associate-*r/60.9%
Applied egg-rr60.9%
unpow160.9%
associate-/l*61.0%
*-commutative61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in d around -inf 38.3%
mul-1-neg38.3%
distribute-rgt-neg-in38.3%
unpow-138.3%
sqr-pow38.3%
rem-sqrt-square38.3%
sqr-pow38.2%
fabs-sqr38.2%
sqr-pow38.3%
*-commutative38.3%
metadata-eval38.3%
Simplified38.3%
if 5.80000000000000018e-204 < d Initial program 71.1%
Taylor expanded in d around inf 48.0%
expm1-log1p-u47.2%
expm1-udef26.9%
Applied egg-rr26.9%
expm1-def47.2%
expm1-log1p48.0%
unpow-148.0%
sqr-pow48.0%
rem-sqrt-square48.0%
sqr-pow47.8%
fabs-sqr47.8%
sqr-pow48.0%
*-commutative48.0%
metadata-eval48.0%
Simplified48.0%
Final simplification42.3%
(FPCore (d h l M D) :precision binary64 (if (<= d 1.16e-200) (* d (- (pow (* h l) -0.5))) (* d (sqrt (/ (/ 1.0 h) l)))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 1.16e-200) {
tmp = d * -pow((h * l), -0.5);
} else {
tmp = d * sqrt(((1.0 / h) / 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 <= 1.16d-200) then
tmp = d * -((h * l) ** (-0.5d0))
else
tmp = d * sqrt(((1.0d0 / h) / 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 <= 1.16e-200) {
tmp = d * -Math.pow((h * l), -0.5);
} else {
tmp = d * Math.sqrt(((1.0 / h) / l));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= 1.16e-200: tmp = d * -math.pow((h * l), -0.5) else: tmp = d * math.sqrt(((1.0 / h) / l)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= 1.16e-200) tmp = Float64(d * Float64(-(Float64(h * l) ^ -0.5))); else tmp = Float64(d * sqrt(Float64(Float64(1.0 / h) / l))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= 1.16e-200) tmp = d * -((h * l) ^ -0.5); else tmp = d * sqrt(((1.0 / h) / l)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 1.16e-200], N[(d * (-N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision])), $MachinePrecision], N[(d * N[Sqrt[N[(N[(1.0 / h), $MachinePrecision] / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq 1.16 \cdot 10^{-200}:\\
\;\;\;\;d \cdot \left(-{\left(h \cdot \ell\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{\frac{1}{h}}{\ell}}\\
\end{array}
\end{array}
if d < 1.1600000000000001e-200Initial program 62.9%
metadata-eval62.9%
unpow1/262.9%
metadata-eval62.9%
unpow1/262.9%
*-commutative62.9%
associate-*l*62.9%
times-frac62.9%
metadata-eval62.9%
Simplified62.9%
frac-times62.9%
associate-/l*62.9%
*-commutative62.9%
Applied egg-rr62.9%
associate-/r/61.6%
*-commutative61.6%
Simplified61.6%
clear-num61.0%
sqrt-div60.9%
metadata-eval60.9%
Applied egg-rr60.9%
pow160.9%
un-div-inv60.9%
*-commutative60.9%
associate-*r/60.9%
Applied egg-rr60.9%
unpow160.9%
associate-/l*61.0%
*-commutative61.0%
*-commutative61.0%
Simplified61.0%
Taylor expanded in d around -inf 38.3%
mul-1-neg38.3%
distribute-rgt-neg-in38.3%
unpow-138.3%
sqr-pow38.3%
rem-sqrt-square38.3%
sqr-pow38.2%
fabs-sqr38.2%
sqr-pow38.3%
*-commutative38.3%
metadata-eval38.3%
Simplified38.3%
if 1.1600000000000001e-200 < d Initial program 71.1%
Taylor expanded in d around inf 48.0%
*-commutative48.0%
associate-/r*48.0%
Simplified48.0%
Taylor expanded in d around 0 48.0%
*-commutative48.0%
associate-/l/48.0%
Simplified48.0%
Final simplification42.3%
(FPCore (d h l M D) :precision binary64 (* d (pow (* h l) -0.5)))
double code(double d, double h, double l, double M, double D) {
return d * pow((h * l), -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 * ((h * l) ** (-0.5d0))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.pow((h * l), -0.5);
}
def code(d, h, l, M, D): return d * math.pow((h * l), -0.5)
function code(d, h, l, M, D) return Float64(d * (Float64(h * l) ^ -0.5)) end
function tmp = code(d, h, l, M, D) tmp = d * ((h * l) ^ -0.5); end
code[d_, h_, l_, M_, D_] := N[(d * N[Power[N[(h * l), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot {\left(h \cdot \ell\right)}^{-0.5}
\end{array}
Initial program 66.2%
Taylor expanded in d around inf 24.9%
expm1-log1p-u24.6%
expm1-udef16.3%
Applied egg-rr16.3%
expm1-def24.6%
expm1-log1p24.9%
unpow-124.9%
sqr-pow24.9%
rem-sqrt-square24.2%
sqr-pow24.1%
fabs-sqr24.1%
sqr-pow24.2%
*-commutative24.2%
metadata-eval24.2%
Simplified24.2%
Final simplification24.2%
herbie shell --seed 2023230
(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)))))