
(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 22 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 -2e-310)
(*
d
(*
(/ 1.0 (sqrt (* l h)))
(+ (/ (* (pow (* M (* 0.5 (/ D d))) 2.0) (* h 0.5)) l) -1.0)))
(if (<= l 1.02e+127)
(*
(* (/ (sqrt d) (sqrt h)) (sqrt (/ d l)))
(- 1.0 (/ (* h (* 0.5 (pow (* (/ D d) (* M 0.5)) 2.0))) l)))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -2e-310) {
tmp = d * ((1.0 / sqrt((l * h))) * (((pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 1.02e+127) {
tmp = ((sqrt(d) / sqrt(h)) * sqrt((d / l))) * (1.0 - ((h * (0.5 * pow(((D / d) * (M * 0.5)), 2.0))) / 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 <= (-2d-310)) then
tmp = d * ((1.0d0 / sqrt((l * h))) * (((((m * (0.5d0 * (d_1 / d))) ** 2.0d0) * (h * 0.5d0)) / l) + (-1.0d0)))
else if (l <= 1.02d+127) then
tmp = ((sqrt(d) / sqrt(h)) * sqrt((d / l))) * (1.0d0 - ((h * (0.5d0 * (((d_1 / d) * (m * 0.5d0)) ** 2.0d0))) / 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 <= -2e-310) {
tmp = d * ((1.0 / Math.sqrt((l * h))) * (((Math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 1.02e+127) {
tmp = ((Math.sqrt(d) / Math.sqrt(h)) * Math.sqrt((d / l))) * (1.0 - ((h * (0.5 * Math.pow(((D / d) * (M * 0.5)), 2.0))) / 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 <= -2e-310: tmp = d * ((1.0 / math.sqrt((l * h))) * (((math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0)) elif l <= 1.02e+127: tmp = ((math.sqrt(d) / math.sqrt(h)) * math.sqrt((d / l))) * (1.0 - ((h * (0.5 * math.pow(((D / d) * (M * 0.5)), 2.0))) / 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 <= -2e-310) tmp = Float64(d * Float64(Float64(1.0 / sqrt(Float64(l * h))) * Float64(Float64(Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) * Float64(h * 0.5)) / l) + -1.0))); elseif (l <= 1.02e+127) tmp = Float64(Float64(Float64(sqrt(d) / sqrt(h)) * sqrt(Float64(d / l))) * Float64(1.0 - Float64(Float64(h * Float64(0.5 * (Float64(Float64(D / d) * Float64(M * 0.5)) ^ 2.0))) / 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 <= -2e-310) tmp = d * ((1.0 / sqrt((l * h))) * (((((M * (0.5 * (D / d))) ^ 2.0) * (h * 0.5)) / l) + -1.0)); elseif (l <= 1.02e+127) tmp = ((sqrt(d) / sqrt(h)) * sqrt((d / l))) * (1.0 - ((h * (0.5 * (((D / d) * (M * 0.5)) ^ 2.0))) / l)); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -2e-310], N[(d * N[(N[(1.0 / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.02e+127], N[(N[(N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(N[(h * N[(0.5 * N[Power[N[(N[(D / d), $MachinePrecision] * N[(M * 0.5), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $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}\;\ell \leq -2 \cdot 10^{-310}:\\
\;\;\;\;d \cdot \left(\frac{1}{\sqrt{\ell \cdot h}} \cdot \left(\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell} + -1\right)\right)\\
\mathbf{elif}\;\ell \leq 1.02 \cdot 10^{+127}:\\
\;\;\;\;\left(\frac{\sqrt{d}}{\sqrt{h}} \cdot \sqrt{\frac{d}{\ell}}\right) \cdot \left(1 - \frac{h \cdot \left(0.5 \cdot {\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2}\right)}{\ell}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 60.0%
metadata-eval60.0%
unpow1/260.0%
metadata-eval60.0%
unpow1/260.0%
*-commutative60.0%
associate-*l*60.0%
times-frac60.6%
metadata-eval60.6%
Simplified60.6%
associate-*r*60.6%
frac-times60.0%
*-commutative60.0%
metadata-eval60.0%
associate-*r/62.6%
metadata-eval62.6%
*-commutative62.6%
frac-times63.1%
div-inv63.1%
metadata-eval63.1%
Applied egg-rr63.1%
pow163.1%
sqrt-unprod48.7%
associate-*l*48.7%
associate-*l*48.7%
Applied egg-rr48.7%
unpow148.7%
associate-/l*45.7%
*-commutative45.7%
Simplified45.7%
Taylor expanded in d around -inf 62.3%
associate-*r*62.3%
mul-1-neg62.3%
Simplified62.3%
pow162.3%
associate-*l*62.6%
sqrt-div63.3%
metadata-eval63.3%
associate-/r/72.1%
Applied egg-rr72.1%
unpow172.1%
*-commutative72.1%
associate-*l/72.2%
Simplified72.2%
if -1.999999999999994e-310 < l < 1.02e127Initial 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%
associate-*r*73.0%
frac-times73.0%
*-commutative73.0%
metadata-eval73.0%
associate-*r/77.3%
metadata-eval77.3%
*-commutative77.3%
frac-times77.4%
div-inv77.4%
metadata-eval77.4%
Applied egg-rr77.4%
sqrt-div85.7%
Applied egg-rr85.7%
if 1.02e127 < l Initial program 53.2%
metadata-eval53.2%
unpow1/253.2%
metadata-eval53.2%
unpow1/253.2%
*-commutative53.2%
associate-*l*53.2%
times-frac53.4%
metadata-eval53.4%
Simplified53.4%
Taylor expanded in d around inf 68.8%
*-un-lft-identity68.8%
*-commutative68.8%
Applied egg-rr68.8%
*-lft-identity68.8%
*-commutative68.8%
associate-/r*68.8%
Simplified68.8%
sqrt-div78.1%
Applied egg-rr78.1%
Final simplification77.9%
(FPCore (d h l M D)
:precision binary64
(if (<= l -2e-310)
(*
d
(*
(/ 1.0 (sqrt (* l h)))
(+ (/ (* (pow (* M (* 0.5 (/ D d))) 2.0) (* h 0.5)) l) -1.0)))
(if (<= l 3.2e+127)
(*
(- 1.0 (/ (* h (* 0.5 (pow (* (/ D d) (* M 0.5)) 2.0))) l))
(* (sqrt (/ d h)) (/ (sqrt d) (sqrt l))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -2e-310) {
tmp = d * ((1.0 / sqrt((l * h))) * (((pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 3.2e+127) {
tmp = (1.0 - ((h * (0.5 * pow(((D / d) * (M * 0.5)), 2.0))) / l)) * (sqrt((d / h)) * (sqrt(d) / sqrt(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 <= (-2d-310)) then
tmp = d * ((1.0d0 / sqrt((l * h))) * (((((m * (0.5d0 * (d_1 / d))) ** 2.0d0) * (h * 0.5d0)) / l) + (-1.0d0)))
else if (l <= 3.2d+127) then
tmp = (1.0d0 - ((h * (0.5d0 * (((d_1 / d) * (m * 0.5d0)) ** 2.0d0))) / l)) * (sqrt((d / h)) * (sqrt(d) / sqrt(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 <= -2e-310) {
tmp = d * ((1.0 / Math.sqrt((l * h))) * (((Math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 3.2e+127) {
tmp = (1.0 - ((h * (0.5 * Math.pow(((D / d) * (M * 0.5)), 2.0))) / l)) * (Math.sqrt((d / h)) * (Math.sqrt(d) / Math.sqrt(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 <= -2e-310: tmp = d * ((1.0 / math.sqrt((l * h))) * (((math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0)) elif l <= 3.2e+127: tmp = (1.0 - ((h * (0.5 * math.pow(((D / d) * (M * 0.5)), 2.0))) / l)) * (math.sqrt((d / h)) * (math.sqrt(d) / math.sqrt(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 <= -2e-310) tmp = Float64(d * Float64(Float64(1.0 / sqrt(Float64(l * h))) * Float64(Float64(Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) * Float64(h * 0.5)) / l) + -1.0))); elseif (l <= 3.2e+127) tmp = Float64(Float64(1.0 - Float64(Float64(h * Float64(0.5 * (Float64(Float64(D / d) * Float64(M * 0.5)) ^ 2.0))) / l)) * Float64(sqrt(Float64(d / h)) * Float64(sqrt(d) / sqrt(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 <= -2e-310) tmp = d * ((1.0 / sqrt((l * h))) * (((((M * (0.5 * (D / d))) ^ 2.0) * (h * 0.5)) / l) + -1.0)); elseif (l <= 3.2e+127) tmp = (1.0 - ((h * (0.5 * (((D / d) * (M * 0.5)) ^ 2.0))) / l)) * (sqrt((d / h)) * (sqrt(d) / sqrt(l))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -2e-310], N[(d * N[(N[(1.0 / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.2e+127], N[(N[(1.0 - N[(N[(h * N[(0.5 * N[Power[N[(N[(D / d), $MachinePrecision] * N[(M * 0.5), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[d], $MachinePrecision] / N[Sqrt[l], $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 \cdot 10^{-310}:\\
\;\;\;\;d \cdot \left(\frac{1}{\sqrt{\ell \cdot h}} \cdot \left(\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell} + -1\right)\right)\\
\mathbf{elif}\;\ell \leq 3.2 \cdot 10^{+127}:\\
\;\;\;\;\left(1 - \frac{h \cdot \left(0.5 \cdot {\left(\frac{D}{d} \cdot \left(M \cdot 0.5\right)\right)}^{2}\right)}{\ell}\right) \cdot \left(\sqrt{\frac{d}{h}} \cdot \frac{\sqrt{d}}{\sqrt{\ell}}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -1.999999999999994e-310Initial program 60.0%
metadata-eval60.0%
unpow1/260.0%
metadata-eval60.0%
unpow1/260.0%
*-commutative60.0%
associate-*l*60.0%
times-frac60.6%
metadata-eval60.6%
Simplified60.6%
associate-*r*60.6%
frac-times60.0%
*-commutative60.0%
metadata-eval60.0%
associate-*r/62.6%
metadata-eval62.6%
*-commutative62.6%
frac-times63.1%
div-inv63.1%
metadata-eval63.1%
Applied egg-rr63.1%
pow163.1%
sqrt-unprod48.7%
associate-*l*48.7%
associate-*l*48.7%
Applied egg-rr48.7%
unpow148.7%
associate-/l*45.7%
*-commutative45.7%
Simplified45.7%
Taylor expanded in d around -inf 62.3%
associate-*r*62.3%
mul-1-neg62.3%
Simplified62.3%
pow162.3%
associate-*l*62.6%
sqrt-div63.3%
metadata-eval63.3%
associate-/r/72.1%
Applied egg-rr72.1%
unpow172.1%
*-commutative72.1%
associate-*l/72.2%
Simplified72.2%
if -1.999999999999994e-310 < l < 3.19999999999999976e127Initial 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%
associate-*r*73.0%
frac-times73.0%
*-commutative73.0%
metadata-eval73.0%
associate-*r/77.3%
metadata-eval77.3%
*-commutative77.3%
frac-times77.4%
div-inv77.4%
metadata-eval77.4%
Applied egg-rr77.4%
sqrt-div79.3%
Applied egg-rr79.3%
if 3.19999999999999976e127 < l Initial program 53.2%
metadata-eval53.2%
unpow1/253.2%
metadata-eval53.2%
unpow1/253.2%
*-commutative53.2%
associate-*l*53.2%
times-frac53.4%
metadata-eval53.4%
Simplified53.4%
Taylor expanded in d around inf 68.8%
*-un-lft-identity68.8%
*-commutative68.8%
Applied egg-rr68.8%
*-lft-identity68.8%
*-commutative68.8%
associate-/r*68.8%
Simplified68.8%
sqrt-div78.1%
Applied egg-rr78.1%
Final simplification75.7%
(FPCore (d h l M D)
:precision binary64
(if (<= l -6.5e-296)
(*
d
(*
(/ 1.0 (sqrt (* l h)))
(+ (/ (* (pow (* M (* 0.5 (/ D d))) 2.0) (* h 0.5)) l) -1.0)))
(if (<= l 1.55e+120)
(*
(sqrt (/ d h))
(*
(sqrt (/ d l))
(- 1.0 (* 0.5 (* (/ h l) (pow (* (/ D d) (/ M 2.0)) 2.0))))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -6.5e-296) {
tmp = d * ((1.0 / sqrt((l * h))) * (((pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 1.55e+120) {
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (0.5 * ((h / l) * pow(((D / d) * (M / 2.0)), 2.0)))));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-6.5d-296)) then
tmp = d * ((1.0d0 / sqrt((l * h))) * (((((m * (0.5d0 * (d_1 / d))) ** 2.0d0) * (h * 0.5d0)) / l) + (-1.0d0)))
else if (l <= 1.55d+120) then
tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0d0 - (0.5d0 * ((h / l) * (((d_1 / d) * (m / 2.0d0)) ** 2.0d0)))))
else
tmp = d * (sqrt((1.0d0 / l)) / sqrt(h))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -6.5e-296) {
tmp = d * ((1.0 / Math.sqrt((l * h))) * (((Math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 1.55e+120) {
tmp = Math.sqrt((d / h)) * (Math.sqrt((d / l)) * (1.0 - (0.5 * ((h / l) * Math.pow(((D / d) * (M / 2.0)), 2.0)))));
} else {
tmp = d * (Math.sqrt((1.0 / l)) / Math.sqrt(h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -6.5e-296: tmp = d * ((1.0 / math.sqrt((l * h))) * (((math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0)) elif l <= 1.55e+120: tmp = math.sqrt((d / h)) * (math.sqrt((d / l)) * (1.0 - (0.5 * ((h / l) * math.pow(((D / d) * (M / 2.0)), 2.0))))) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -6.5e-296) tmp = Float64(d * Float64(Float64(1.0 / sqrt(Float64(l * h))) * Float64(Float64(Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) * Float64(h * 0.5)) / l) + -1.0))); elseif (l <= 1.55e+120) tmp = Float64(sqrt(Float64(d / h)) * Float64(sqrt(Float64(d / l)) * Float64(1.0 - Float64(0.5 * Float64(Float64(h / l) * (Float64(Float64(D / d) * Float64(M / 2.0)) ^ 2.0)))))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -6.5e-296) tmp = d * ((1.0 / sqrt((l * h))) * (((((M * (0.5 * (D / d))) ^ 2.0) * (h * 0.5)) / l) + -1.0)); elseif (l <= 1.55e+120) tmp = sqrt((d / h)) * (sqrt((d / l)) * (1.0 - (0.5 * ((h / l) * (((D / d) * (M / 2.0)) ^ 2.0))))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -6.5e-296], N[(d * N[(N[(1.0 / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.55e+120], N[(N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision] * N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.5 * N[(N[(h / l), $MachinePrecision] * N[Power[N[(N[(D / d), $MachinePrecision] * N[(M / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -6.5 \cdot 10^{-296}:\\
\;\;\;\;d \cdot \left(\frac{1}{\sqrt{\ell \cdot h}} \cdot \left(\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell} + -1\right)\right)\\
\mathbf{elif}\;\ell \leq 1.55 \cdot 10^{+120}:\\
\;\;\;\;\sqrt{\frac{d}{h}} \cdot \left(\sqrt{\frac{d}{\ell}} \cdot \left(1 - 0.5 \cdot \left(\frac{h}{\ell} \cdot {\left(\frac{D}{d} \cdot \frac{M}{2}\right)}^{2}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -6.49999999999999963e-296Initial program 59.4%
metadata-eval59.4%
unpow1/259.4%
metadata-eval59.4%
unpow1/259.4%
*-commutative59.4%
associate-*l*59.4%
times-frac60.0%
metadata-eval60.0%
Simplified60.0%
associate-*r*60.0%
frac-times59.4%
*-commutative59.4%
metadata-eval59.4%
associate-*r/62.0%
metadata-eval62.0%
*-commutative62.0%
frac-times62.5%
div-inv62.5%
metadata-eval62.5%
Applied egg-rr62.5%
pow162.5%
sqrt-unprod47.9%
associate-*l*47.9%
associate-*l*47.9%
Applied egg-rr47.9%
unpow147.9%
associate-/l*44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in d around -inf 61.7%
associate-*r*61.7%
mul-1-neg61.7%
Simplified61.7%
pow161.7%
associate-*l*62.0%
sqrt-div62.7%
metadata-eval62.7%
associate-/r/71.7%
Applied egg-rr71.7%
unpow171.7%
*-commutative71.7%
associate-*l/71.7%
Simplified71.7%
if -6.49999999999999963e-296 < l < 1.54999999999999987e120Initial program 74.4%
associate-*l*74.4%
metadata-eval74.4%
unpow1/274.4%
metadata-eval74.4%
unpow1/274.4%
associate-*l*74.4%
metadata-eval74.4%
times-frac74.4%
Simplified74.4%
if 1.54999999999999987e120 < l Initial program 51.9%
metadata-eval51.9%
unpow1/251.9%
metadata-eval51.9%
unpow1/251.9%
*-commutative51.9%
associate-*l*51.9%
times-frac52.2%
metadata-eval52.2%
Simplified52.2%
Taylor expanded in d around inf 67.2%
*-un-lft-identity67.2%
*-commutative67.2%
Applied egg-rr67.2%
*-lft-identity67.2%
*-commutative67.2%
associate-/r*67.2%
Simplified67.2%
sqrt-div76.3%
Applied egg-rr76.3%
Final simplification73.4%
(FPCore (d h l M D)
:precision binary64
(if (<= l -6.5e-296)
(*
d
(*
(/ 1.0 (sqrt (* l h)))
(+ (/ (* (pow (* M (* 0.5 (/ D d))) 2.0) (* h 0.5)) l) -1.0)))
(if (<= l 1.25e+125)
(*
(* (sqrt (/ d l)) (sqrt (/ d h)))
(- 1.0 (* (pow (* (/ M d) (/ D 2.0)) 2.0) (* 0.5 (/ h l)))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -6.5e-296) {
tmp = d * ((1.0 / sqrt((l * h))) * (((pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 1.25e+125) {
tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (pow(((M / d) * (D / 2.0)), 2.0) * (0.5 * (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 (l <= (-6.5d-296)) then
tmp = d * ((1.0d0 / sqrt((l * h))) * (((((m * (0.5d0 * (d_1 / d))) ** 2.0d0) * (h * 0.5d0)) / l) + (-1.0d0)))
else if (l <= 1.25d+125) then
tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - ((((m / d) * (d_1 / 2.0d0)) ** 2.0d0) * (0.5d0 * (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 (l <= -6.5e-296) {
tmp = d * ((1.0 / Math.sqrt((l * h))) * (((Math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 1.25e+125) {
tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - (Math.pow(((M / d) * (D / 2.0)), 2.0) * (0.5 * (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 l <= -6.5e-296: tmp = d * ((1.0 / math.sqrt((l * h))) * (((math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0)) elif l <= 1.25e+125: tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - (math.pow(((M / d) * (D / 2.0)), 2.0) * (0.5 * (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 (l <= -6.5e-296) tmp = Float64(d * Float64(Float64(1.0 / sqrt(Float64(l * h))) * Float64(Float64(Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) * Float64(h * 0.5)) / l) + -1.0))); elseif (l <= 1.25e+125) tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64((Float64(Float64(M / d) * Float64(D / 2.0)) ^ 2.0) * Float64(0.5 * Float64(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 (l <= -6.5e-296) tmp = d * ((1.0 / sqrt((l * h))) * (((((M * (0.5 * (D / d))) ^ 2.0) * (h * 0.5)) / l) + -1.0)); elseif (l <= 1.25e+125) tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - ((((M / d) * (D / 2.0)) ^ 2.0) * (0.5 * (h / l)))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -6.5e-296], N[(d * N[(N[(1.0 / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.25e+125], 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 / d), $MachinePrecision] * N[(D / 2.0), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(0.5 * N[(h / 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 -6.5 \cdot 10^{-296}:\\
\;\;\;\;d \cdot \left(\frac{1}{\sqrt{\ell \cdot h}} \cdot \left(\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell} + -1\right)\right)\\
\mathbf{elif}\;\ell \leq 1.25 \cdot 10^{+125}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - {\left(\frac{M}{d} \cdot \frac{D}{2}\right)}^{2} \cdot \left(0.5 \cdot \frac{h}{\ell}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -6.49999999999999963e-296Initial program 59.4%
metadata-eval59.4%
unpow1/259.4%
metadata-eval59.4%
unpow1/259.4%
*-commutative59.4%
associate-*l*59.4%
times-frac60.0%
metadata-eval60.0%
Simplified60.0%
associate-*r*60.0%
frac-times59.4%
*-commutative59.4%
metadata-eval59.4%
associate-*r/62.0%
metadata-eval62.0%
*-commutative62.0%
frac-times62.5%
div-inv62.5%
metadata-eval62.5%
Applied egg-rr62.5%
pow162.5%
sqrt-unprod47.9%
associate-*l*47.9%
associate-*l*47.9%
Applied egg-rr47.9%
unpow147.9%
associate-/l*44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in d around -inf 61.7%
associate-*r*61.7%
mul-1-neg61.7%
Simplified61.7%
pow161.7%
associate-*l*62.0%
sqrt-div62.7%
metadata-eval62.7%
associate-/r/71.7%
Applied egg-rr71.7%
unpow171.7%
*-commutative71.7%
associate-*l/71.7%
Simplified71.7%
if -6.49999999999999963e-296 < l < 1.24999999999999991e125Initial program 74.4%
metadata-eval74.4%
unpow1/274.4%
metadata-eval74.4%
unpow1/274.4%
*-commutative74.4%
associate-*l*74.4%
times-frac74.4%
metadata-eval74.4%
Simplified74.4%
frac-times74.4%
associate-/l*74.4%
*-commutative74.4%
Applied egg-rr74.4%
associate-/l*74.4%
times-frac72.3%
Simplified72.3%
if 1.24999999999999991e125 < l Initial program 51.9%
metadata-eval51.9%
unpow1/251.9%
metadata-eval51.9%
unpow1/251.9%
*-commutative51.9%
associate-*l*51.9%
times-frac52.2%
metadata-eval52.2%
Simplified52.2%
Taylor expanded in d around inf 67.2%
*-un-lft-identity67.2%
*-commutative67.2%
Applied egg-rr67.2%
*-lft-identity67.2%
*-commutative67.2%
associate-/r*67.2%
Simplified67.2%
sqrt-div76.3%
Applied egg-rr76.3%
Final simplification72.7%
(FPCore (d h l M D)
:precision binary64
(if (<= l -6.5e-296)
(*
d
(*
(/ 1.0 (sqrt (* l h)))
(+ (/ (* (pow (* M (* 0.5 (/ D d))) 2.0) (* h 0.5)) l) -1.0)))
(if (<= l 4.1e+126)
(*
(- 1.0 (/ (* h (* 0.5 (pow (* (/ D d) (* M 0.5)) 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 <= -6.5e-296) {
tmp = d * ((1.0 / sqrt((l * h))) * (((pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 4.1e+126) {
tmp = (1.0 - ((h * (0.5 * pow(((D / d) * (M * 0.5)), 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 <= (-6.5d-296)) then
tmp = d * ((1.0d0 / sqrt((l * h))) * (((((m * (0.5d0 * (d_1 / d))) ** 2.0d0) * (h * 0.5d0)) / l) + (-1.0d0)))
else if (l <= 4.1d+126) then
tmp = (1.0d0 - ((h * (0.5d0 * (((d_1 / d) * (m * 0.5d0)) ** 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 <= -6.5e-296) {
tmp = d * ((1.0 / Math.sqrt((l * h))) * (((Math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 4.1e+126) {
tmp = (1.0 - ((h * (0.5 * Math.pow(((D / d) * (M * 0.5)), 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 <= -6.5e-296: tmp = d * ((1.0 / math.sqrt((l * h))) * (((math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0)) elif l <= 4.1e+126: tmp = (1.0 - ((h * (0.5 * math.pow(((D / d) * (M * 0.5)), 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 <= -6.5e-296) tmp = Float64(d * Float64(Float64(1.0 / sqrt(Float64(l * h))) * Float64(Float64(Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) * Float64(h * 0.5)) / l) + -1.0))); elseif (l <= 4.1e+126) tmp = Float64(Float64(1.0 - Float64(Float64(h * Float64(0.5 * (Float64(Float64(D / d) * Float64(M * 0.5)) ^ 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 <= -6.5e-296) tmp = d * ((1.0 / sqrt((l * h))) * (((((M * (0.5 * (D / d))) ^ 2.0) * (h * 0.5)) / l) + -1.0)); elseif (l <= 4.1e+126) tmp = (1.0 - ((h * (0.5 * (((D / d) * (M * 0.5)) ^ 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, -6.5e-296], N[(d * N[(N[(1.0 / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.1e+126], N[(N[(1.0 - N[(N[(h * N[(0.5 * N[Power[N[(N[(D / d), $MachinePrecision] * N[(M * 0.5), $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 -6.5 \cdot 10^{-296}:\\
\;\;\;\;d \cdot \left(\frac{1}{\sqrt{\ell \cdot h}} \cdot \left(\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell} + -1\right)\right)\\
\mathbf{elif}\;\ell \leq 4.1 \cdot 10^{+126}:\\
\;\;\;\;\left(1 - \frac{h \cdot \left(0.5 \cdot {\left(\frac{D}{d} \cdot \left(M \cdot 0.5\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 < -6.49999999999999963e-296Initial program 59.4%
metadata-eval59.4%
unpow1/259.4%
metadata-eval59.4%
unpow1/259.4%
*-commutative59.4%
associate-*l*59.4%
times-frac60.0%
metadata-eval60.0%
Simplified60.0%
associate-*r*60.0%
frac-times59.4%
*-commutative59.4%
metadata-eval59.4%
associate-*r/62.0%
metadata-eval62.0%
*-commutative62.0%
frac-times62.5%
div-inv62.5%
metadata-eval62.5%
Applied egg-rr62.5%
pow162.5%
sqrt-unprod47.9%
associate-*l*47.9%
associate-*l*47.9%
Applied egg-rr47.9%
unpow147.9%
associate-/l*44.8%
*-commutative44.8%
Simplified44.8%
Taylor expanded in d around -inf 61.7%
associate-*r*61.7%
mul-1-neg61.7%
Simplified61.7%
pow161.7%
associate-*l*62.0%
sqrt-div62.7%
metadata-eval62.7%
associate-/r/71.7%
Applied egg-rr71.7%
unpow171.7%
*-commutative71.7%
associate-*l/71.7%
Simplified71.7%
if -6.49999999999999963e-296 < l < 4.1000000000000001e126Initial program 73.6%
metadata-eval73.6%
unpow1/273.6%
metadata-eval73.6%
unpow1/273.6%
*-commutative73.6%
associate-*l*73.6%
times-frac73.6%
metadata-eval73.6%
Simplified73.6%
associate-*r*73.6%
frac-times73.6%
*-commutative73.6%
metadata-eval73.6%
associate-*r/77.8%
metadata-eval77.8%
*-commutative77.8%
frac-times77.8%
div-inv77.8%
metadata-eval77.8%
Applied egg-rr77.8%
if 4.1000000000000001e126 < l Initial program 53.2%
metadata-eval53.2%
unpow1/253.2%
metadata-eval53.2%
unpow1/253.2%
*-commutative53.2%
associate-*l*53.2%
times-frac53.4%
metadata-eval53.4%
Simplified53.4%
Taylor expanded in d around inf 68.8%
*-un-lft-identity68.8%
*-commutative68.8%
Applied egg-rr68.8%
*-lft-identity68.8%
*-commutative68.8%
associate-/r*68.8%
Simplified68.8%
sqrt-div78.1%
Applied egg-rr78.1%
Final simplification75.0%
(FPCore (d h l M D)
:precision binary64
(if (<= l -2.95e-295)
(*
d
(*
(/ 1.0 (sqrt (* l h)))
(+ (/ (* (pow (* M (* 0.5 (/ D d))) 2.0) (* h 0.5)) l) -1.0)))
(if (<= l 1e-122)
(*
(sqrt (* d (/ (/ d h) l)))
(- 1.0 (* 0.5 (* h (/ (pow (* D (/ (* M 0.5) d)) 2.0) l)))))
(if (<= l 2.8e+53)
(*
(* (sqrt (/ d l)) (sqrt (/ d h)))
(- 1.0 (* 0.125 (* (/ (* D (* h D)) d) (/ (* M M) (* l d))))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -2.95e-295) {
tmp = d * ((1.0 / sqrt((l * h))) * (((pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 1e-122) {
tmp = sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (pow((D * ((M * 0.5) / d)), 2.0) / l))));
} else if (l <= 2.8e+53) {
tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (0.125 * (((D * (h * D)) / d) * ((M * M) / (l * d)))));
} else {
tmp = d * (sqrt((1.0 / l)) / sqrt(h));
}
return tmp;
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
real(8) :: tmp
if (l <= (-2.95d-295)) then
tmp = d * ((1.0d0 / sqrt((l * h))) * (((((m * (0.5d0 * (d_1 / d))) ** 2.0d0) * (h * 0.5d0)) / l) + (-1.0d0)))
else if (l <= 1d-122) then
tmp = sqrt((d * ((d / h) / l))) * (1.0d0 - (0.5d0 * (h * (((d_1 * ((m * 0.5d0) / d)) ** 2.0d0) / l))))
else if (l <= 2.8d+53) then
tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0d0 - (0.125d0 * (((d_1 * (h * d_1)) / d) * ((m * m) / (l * d)))))
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.95e-295) {
tmp = d * ((1.0 / Math.sqrt((l * h))) * (((Math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 1e-122) {
tmp = Math.sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (Math.pow((D * ((M * 0.5) / d)), 2.0) / l))));
} else if (l <= 2.8e+53) {
tmp = (Math.sqrt((d / l)) * Math.sqrt((d / h))) * (1.0 - (0.125 * (((D * (h * D)) / d) * ((M * M) / (l * d)))));
} 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.95e-295: tmp = d * ((1.0 / math.sqrt((l * h))) * (((math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0)) elif l <= 1e-122: tmp = math.sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (math.pow((D * ((M * 0.5) / d)), 2.0) / l)))) elif l <= 2.8e+53: tmp = (math.sqrt((d / l)) * math.sqrt((d / h))) * (1.0 - (0.125 * (((D * (h * D)) / d) * ((M * M) / (l * d))))) else: tmp = d * (math.sqrt((1.0 / l)) / math.sqrt(h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -2.95e-295) tmp = Float64(d * Float64(Float64(1.0 / sqrt(Float64(l * h))) * Float64(Float64(Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) * Float64(h * 0.5)) / l) + -1.0))); elseif (l <= 1e-122) tmp = Float64(sqrt(Float64(d * Float64(Float64(d / h) / l))) * Float64(1.0 - Float64(0.5 * Float64(h * Float64((Float64(D * Float64(Float64(M * 0.5) / d)) ^ 2.0) / l))))); elseif (l <= 2.8e+53) tmp = Float64(Float64(sqrt(Float64(d / l)) * sqrt(Float64(d / h))) * Float64(1.0 - Float64(0.125 * Float64(Float64(Float64(D * Float64(h * D)) / d) * Float64(Float64(M * M) / Float64(l * d)))))); else tmp = Float64(d * Float64(sqrt(Float64(1.0 / l)) / sqrt(h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -2.95e-295) tmp = d * ((1.0 / sqrt((l * h))) * (((((M * (0.5 * (D / d))) ^ 2.0) * (h * 0.5)) / l) + -1.0)); elseif (l <= 1e-122) tmp = sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (((D * ((M * 0.5) / d)) ^ 2.0) / l)))); elseif (l <= 2.8e+53) tmp = (sqrt((d / l)) * sqrt((d / h))) * (1.0 - (0.125 * (((D * (h * D)) / d) * ((M * M) / (l * d))))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -2.95e-295], N[(d * N[(N[(1.0 / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1e-122], N[(N[Sqrt[N[(d * N[(N[(d / h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.5 * N[(h * N[(N[Power[N[(D * N[(N[(M * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.8e+53], N[(N[(N[Sqrt[N[(d / l), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(d / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(0.125 * N[(N[(N[(D * N[(h * D), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(M * M), $MachinePrecision] / N[(l * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d * N[(N[Sqrt[N[(1.0 / l), $MachinePrecision]], $MachinePrecision] / N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -2.95 \cdot 10^{-295}:\\
\;\;\;\;d \cdot \left(\frac{1}{\sqrt{\ell \cdot h}} \cdot \left(\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell} + -1\right)\right)\\
\mathbf{elif}\;\ell \leq 10^{-122}:\\
\;\;\;\;\sqrt{d \cdot \frac{\frac{d}{h}}{\ell}} \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\left(D \cdot \frac{M \cdot 0.5}{d}\right)}^{2}}{\ell}\right)\right)\\
\mathbf{elif}\;\ell \leq 2.8 \cdot 10^{+53}:\\
\;\;\;\;\left(\sqrt{\frac{d}{\ell}} \cdot \sqrt{\frac{d}{h}}\right) \cdot \left(1 - 0.125 \cdot \left(\frac{D \cdot \left(h \cdot D\right)}{d} \cdot \frac{M \cdot M}{\ell \cdot d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -2.95000000000000006e-295Initial program 59.9%
metadata-eval59.9%
unpow1/259.9%
metadata-eval59.9%
unpow1/259.9%
*-commutative59.9%
associate-*l*59.9%
times-frac60.5%
metadata-eval60.5%
Simplified60.5%
associate-*r*60.5%
frac-times59.9%
*-commutative59.9%
metadata-eval59.9%
associate-*r/61.7%
metadata-eval61.7%
*-commutative61.7%
frac-times62.2%
div-inv62.2%
metadata-eval62.2%
Applied egg-rr62.2%
pow162.2%
sqrt-unprod47.4%
associate-*l*47.4%
associate-*l*47.4%
Applied egg-rr47.4%
unpow147.4%
associate-/l*45.2%
*-commutative45.2%
Simplified45.2%
Taylor expanded in d around -inf 62.2%
associate-*r*62.2%
mul-1-neg62.2%
Simplified62.2%
pow162.2%
associate-*l*62.5%
sqrt-div63.2%
metadata-eval63.2%
associate-/r/71.4%
Applied egg-rr71.4%
unpow171.4%
*-commutative71.4%
associate-*l/71.5%
Simplified71.5%
if -2.95000000000000006e-295 < l < 1.00000000000000006e-122Initial program 74.9%
metadata-eval74.9%
unpow1/274.9%
metadata-eval74.9%
unpow1/274.9%
*-commutative74.9%
associate-*l*74.9%
times-frac74.9%
metadata-eval74.9%
Simplified74.9%
associate-*r*74.9%
frac-times74.9%
*-commutative74.9%
metadata-eval74.9%
associate-*r/83.6%
metadata-eval83.6%
*-commutative83.6%
frac-times83.6%
div-inv83.6%
metadata-eval83.6%
Applied egg-rr83.6%
pow1/283.6%
sqr-pow83.5%
pow283.5%
metadata-eval83.5%
Applied egg-rr83.5%
pow183.5%
*-commutative83.5%
associate-*l*83.5%
associate-*r*83.5%
*-commutative83.5%
pow-pow83.6%
metadata-eval83.6%
pow1/283.6%
sqrt-prod77.2%
associate-*r/70.5%
Applied egg-rr70.5%
unpow170.5%
*-commutative70.5%
associate-/l*77.2%
associate-/r/77.3%
associate-*l/75.1%
*-commutative75.1%
*-commutative75.1%
associate-*l*75.1%
associate-*r*75.1%
associate-*r/75.1%
associate-/l*75.1%
associate-/r/73.0%
Simplified73.0%
if 1.00000000000000006e-122 < l < 2.8e53Initial program 75.5%
metadata-eval75.5%
unpow1/275.5%
metadata-eval75.5%
unpow1/275.5%
*-commutative75.5%
associate-*l*75.5%
times-frac75.5%
metadata-eval75.5%
Simplified75.5%
frac-times75.5%
associate-/l*75.5%
*-commutative75.5%
Applied egg-rr75.5%
associate-/l*75.5%
times-frac72.9%
Simplified72.9%
Taylor expanded in M around 0 52.1%
*-commutative52.1%
*-commutative52.1%
associate-*r*54.9%
unpow254.9%
associate-*l*55.2%
times-frac63.2%
unpow263.2%
associate-*l*66.1%
unpow266.1%
Simplified66.1%
if 2.8e53 < l Initial program 54.8%
metadata-eval54.8%
unpow1/254.8%
metadata-eval54.8%
unpow1/254.8%
*-commutative54.8%
associate-*l*54.8%
times-frac55.0%
metadata-eval55.0%
Simplified55.0%
Taylor expanded in d around inf 63.1%
*-un-lft-identity63.1%
*-commutative63.1%
Applied egg-rr63.1%
*-lft-identity63.1%
*-commutative63.1%
associate-/r*63.0%
Simplified63.0%
sqrt-div72.9%
Applied egg-rr72.9%
Final simplification71.3%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1e-215)
(/
(* d (- -1.0 (/ -0.5 (/ (/ l h) (pow (/ (* D (* M 0.5)) d) 2.0)))))
(sqrt (* l h)))
(if (<= l 1.35e+53)
(*
(sqrt (* (/ d l) (/ d h)))
(- 1.0 (* (* h 0.5) (/ (pow (* M (* 0.5 (/ D d))) 2.0) l))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1e-215) {
tmp = (d * (-1.0 - (-0.5 / ((l / h) / pow(((D * (M * 0.5)) / d), 2.0))))) / sqrt((l * h));
} else if (l <= 1.35e+53) {
tmp = sqrt(((d / l) * (d / h))) * (1.0 - ((h * 0.5) * (pow((M * (0.5 * (D / d))), 2.0) / 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 <= (-1d-215)) then
tmp = (d * ((-1.0d0) - ((-0.5d0) / ((l / h) / (((d_1 * (m * 0.5d0)) / d) ** 2.0d0))))) / sqrt((l * h))
else if (l <= 1.35d+53) then
tmp = sqrt(((d / l) * (d / h))) * (1.0d0 - ((h * 0.5d0) * (((m * (0.5d0 * (d_1 / d))) ** 2.0d0) / 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 <= -1e-215) {
tmp = (d * (-1.0 - (-0.5 / ((l / h) / Math.pow(((D * (M * 0.5)) / d), 2.0))))) / Math.sqrt((l * h));
} else if (l <= 1.35e+53) {
tmp = Math.sqrt(((d / l) * (d / h))) * (1.0 - ((h * 0.5) * (Math.pow((M * (0.5 * (D / d))), 2.0) / 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 <= -1e-215: tmp = (d * (-1.0 - (-0.5 / ((l / h) / math.pow(((D * (M * 0.5)) / d), 2.0))))) / math.sqrt((l * h)) elif l <= 1.35e+53: tmp = math.sqrt(((d / l) * (d / h))) * (1.0 - ((h * 0.5) * (math.pow((M * (0.5 * (D / d))), 2.0) / 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 <= -1e-215) tmp = Float64(Float64(d * Float64(-1.0 - Float64(-0.5 / Float64(Float64(l / h) / (Float64(Float64(D * Float64(M * 0.5)) / d) ^ 2.0))))) / sqrt(Float64(l * h))); elseif (l <= 1.35e+53) tmp = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(1.0 - Float64(Float64(h * 0.5) * Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) / 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 <= -1e-215) tmp = (d * (-1.0 - (-0.5 / ((l / h) / (((D * (M * 0.5)) / d) ^ 2.0))))) / sqrt((l * h)); elseif (l <= 1.35e+53) tmp = sqrt(((d / l) * (d / h))) * (1.0 - ((h * 0.5) * (((M * (0.5 * (D / d))) ^ 2.0) / l))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1e-215], N[(N[(d * N[(-1.0 - N[(-0.5 / N[(N[(l / h), $MachinePrecision] / N[Power[N[(N[(D * N[(M * 0.5), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.35e+53], N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(N[(h * 0.5), $MachinePrecision] * N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / l), $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 \cdot 10^{-215}:\\
\;\;\;\;\frac{d \cdot \left(-1 - \frac{-0.5}{\frac{\frac{\ell}{h}}{{\left(\frac{D \cdot \left(M \cdot 0.5\right)}{d}\right)}^{2}}}\right)}{\sqrt{\ell \cdot h}}\\
\mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+53}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - \left(h \cdot 0.5\right) \cdot \frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}}{\ell}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -1.00000000000000004e-215Initial program 58.9%
metadata-eval58.9%
unpow1/258.9%
metadata-eval58.9%
unpow1/258.9%
*-commutative58.9%
associate-*l*58.9%
times-frac59.0%
metadata-eval59.0%
Simplified59.0%
associate-*r*59.0%
frac-times58.9%
*-commutative58.9%
metadata-eval58.9%
associate-*r/58.9%
metadata-eval58.9%
*-commutative58.9%
frac-times59.0%
div-inv59.0%
metadata-eval59.0%
Applied egg-rr59.0%
pow159.0%
sqrt-unprod42.4%
associate-*l*42.4%
associate-*l*42.4%
Applied egg-rr42.4%
unpow142.4%
associate-/l*41.8%
*-commutative41.8%
Simplified41.8%
Taylor expanded in d around -inf 61.0%
associate-*r*61.0%
mul-1-neg61.0%
Simplified61.0%
pow161.0%
associate-*l*62.0%
sqrt-div62.9%
metadata-eval62.9%
associate-/r/68.8%
Applied egg-rr68.8%
unpow168.8%
associate-*l/68.7%
*-lft-identity68.7%
associate-*r/68.7%
Simplified61.9%
if -1.00000000000000004e-215 < l < 1.3500000000000001e53Initial program 73.2%
metadata-eval73.2%
unpow1/273.2%
metadata-eval73.2%
unpow1/273.2%
*-commutative73.2%
associate-*l*73.2%
times-frac73.9%
metadata-eval73.9%
Simplified73.9%
associate-*r*73.9%
frac-times73.2%
*-commutative73.2%
metadata-eval73.2%
associate-*r/79.3%
metadata-eval79.3%
*-commutative79.3%
frac-times80.0%
div-inv80.0%
metadata-eval80.0%
Applied egg-rr80.0%
pow180.0%
sqrt-unprod67.8%
associate-*l*67.8%
associate-*l*67.8%
Applied egg-rr67.8%
unpow167.8%
associate-/l*61.8%
*-commutative61.8%
Simplified61.8%
associate-/r/66.8%
Applied egg-rr66.8%
if 1.3500000000000001e53 < l Initial program 54.8%
metadata-eval54.8%
unpow1/254.8%
metadata-eval54.8%
unpow1/254.8%
*-commutative54.8%
associate-*l*54.8%
times-frac55.0%
metadata-eval55.0%
Simplified55.0%
Taylor expanded in d around inf 63.1%
*-un-lft-identity63.1%
*-commutative63.1%
Applied egg-rr63.1%
*-lft-identity63.1%
*-commutative63.1%
associate-/r*63.0%
Simplified63.0%
sqrt-div72.9%
Applied egg-rr72.9%
Final simplification66.2%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.07e-215)
(/
(* d (- -1.0 (/ -0.5 (/ (/ l h) (pow (/ (* D (* M 0.5)) d) 2.0)))))
(sqrt (* l h)))
(if (<= l 1.4e+52)
(*
(sqrt (* d (/ (/ d h) l)))
(- 1.0 (* 0.5 (* h (/ (pow (* D (/ (* M 0.5) d)) 2.0) l)))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.07e-215) {
tmp = (d * (-1.0 - (-0.5 / ((l / h) / pow(((D * (M * 0.5)) / d), 2.0))))) / sqrt((l * h));
} else if (l <= 1.4e+52) {
tmp = sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (pow((D * ((M * 0.5) / d)), 2.0) / 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 <= (-1.07d-215)) then
tmp = (d * ((-1.0d0) - ((-0.5d0) / ((l / h) / (((d_1 * (m * 0.5d0)) / d) ** 2.0d0))))) / sqrt((l * h))
else if (l <= 1.4d+52) then
tmp = sqrt((d * ((d / h) / l))) * (1.0d0 - (0.5d0 * (h * (((d_1 * ((m * 0.5d0) / d)) ** 2.0d0) / 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 <= -1.07e-215) {
tmp = (d * (-1.0 - (-0.5 / ((l / h) / Math.pow(((D * (M * 0.5)) / d), 2.0))))) / Math.sqrt((l * h));
} else if (l <= 1.4e+52) {
tmp = Math.sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (Math.pow((D * ((M * 0.5) / d)), 2.0) / 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 <= -1.07e-215: tmp = (d * (-1.0 - (-0.5 / ((l / h) / math.pow(((D * (M * 0.5)) / d), 2.0))))) / math.sqrt((l * h)) elif l <= 1.4e+52: tmp = math.sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (math.pow((D * ((M * 0.5) / d)), 2.0) / 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 <= -1.07e-215) tmp = Float64(Float64(d * Float64(-1.0 - Float64(-0.5 / Float64(Float64(l / h) / (Float64(Float64(D * Float64(M * 0.5)) / d) ^ 2.0))))) / sqrt(Float64(l * h))); elseif (l <= 1.4e+52) tmp = Float64(sqrt(Float64(d * Float64(Float64(d / h) / l))) * Float64(1.0 - Float64(0.5 * Float64(h * Float64((Float64(D * Float64(Float64(M * 0.5) / d)) ^ 2.0) / 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 <= -1.07e-215) tmp = (d * (-1.0 - (-0.5 / ((l / h) / (((D * (M * 0.5)) / d) ^ 2.0))))) / sqrt((l * h)); elseif (l <= 1.4e+52) tmp = sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (((D * ((M * 0.5) / d)) ^ 2.0) / l)))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.07e-215], N[(N[(d * N[(-1.0 - N[(-0.5 / N[(N[(l / h), $MachinePrecision] / N[Power[N[(N[(D * N[(M * 0.5), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 1.4e+52], N[(N[Sqrt[N[(d * N[(N[(d / h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.5 * N[(h * N[(N[Power[N[(D * N[(N[(M * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / 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 -1.07 \cdot 10^{-215}:\\
\;\;\;\;\frac{d \cdot \left(-1 - \frac{-0.5}{\frac{\frac{\ell}{h}}{{\left(\frac{D \cdot \left(M \cdot 0.5\right)}{d}\right)}^{2}}}\right)}{\sqrt{\ell \cdot h}}\\
\mathbf{elif}\;\ell \leq 1.4 \cdot 10^{+52}:\\
\;\;\;\;\sqrt{d \cdot \frac{\frac{d}{h}}{\ell}} \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\left(D \cdot \frac{M \cdot 0.5}{d}\right)}^{2}}{\ell}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -1.07000000000000003e-215Initial program 58.9%
metadata-eval58.9%
unpow1/258.9%
metadata-eval58.9%
unpow1/258.9%
*-commutative58.9%
associate-*l*58.9%
times-frac59.0%
metadata-eval59.0%
Simplified59.0%
associate-*r*59.0%
frac-times58.9%
*-commutative58.9%
metadata-eval58.9%
associate-*r/58.9%
metadata-eval58.9%
*-commutative58.9%
frac-times59.0%
div-inv59.0%
metadata-eval59.0%
Applied egg-rr59.0%
pow159.0%
sqrt-unprod42.4%
associate-*l*42.4%
associate-*l*42.4%
Applied egg-rr42.4%
unpow142.4%
associate-/l*41.8%
*-commutative41.8%
Simplified41.8%
Taylor expanded in d around -inf 61.0%
associate-*r*61.0%
mul-1-neg61.0%
Simplified61.0%
pow161.0%
associate-*l*62.0%
sqrt-div62.9%
metadata-eval62.9%
associate-/r/68.8%
Applied egg-rr68.8%
unpow168.8%
associate-*l/68.7%
*-lft-identity68.7%
associate-*r/68.7%
Simplified61.9%
if -1.07000000000000003e-215 < l < 1.4e52Initial program 73.2%
metadata-eval73.2%
unpow1/273.2%
metadata-eval73.2%
unpow1/273.2%
*-commutative73.2%
associate-*l*73.2%
times-frac73.9%
metadata-eval73.9%
Simplified73.9%
associate-*r*73.9%
frac-times73.2%
*-commutative73.2%
metadata-eval73.2%
associate-*r/79.3%
metadata-eval79.3%
*-commutative79.3%
frac-times80.0%
div-inv80.0%
metadata-eval80.0%
Applied egg-rr80.0%
pow1/280.0%
sqr-pow79.7%
pow279.7%
metadata-eval79.7%
Applied egg-rr79.7%
pow179.7%
*-commutative79.7%
associate-*l*79.7%
associate-*r*79.7%
*-commutative79.7%
pow-pow80.0%
metadata-eval80.0%
pow1/280.0%
sqrt-prod67.8%
associate-*r/59.4%
Applied egg-rr59.4%
unpow159.4%
*-commutative59.4%
associate-/l*67.7%
associate-/r/67.8%
associate-*l/66.8%
*-commutative66.8%
*-commutative66.8%
associate-*l*66.8%
associate-*r*66.8%
associate-*r/66.2%
associate-/l*66.8%
associate-/r/64.9%
Simplified64.9%
if 1.4e52 < l Initial program 54.8%
metadata-eval54.8%
unpow1/254.8%
metadata-eval54.8%
unpow1/254.8%
*-commutative54.8%
associate-*l*54.8%
times-frac55.0%
metadata-eval55.0%
Simplified55.0%
Taylor expanded in d around inf 63.1%
*-un-lft-identity63.1%
*-commutative63.1%
Applied egg-rr63.1%
*-lft-identity63.1%
*-commutative63.1%
associate-/r*63.0%
Simplified63.0%
sqrt-div72.9%
Applied egg-rr72.9%
Final simplification65.4%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1e-215)
(*
(* d (pow (* l h) -0.5))
(+ (/ (pow (* M (* 0.5 (/ D d))) 2.0) (/ l (* h 0.5))) -1.0))
(if (<= l 9.5e+50)
(*
(sqrt (* d (/ (/ d h) l)))
(- 1.0 (* 0.5 (* h (/ (pow (* D (/ (* M 0.5) d)) 2.0) l)))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1e-215) {
tmp = (d * pow((l * h), -0.5)) * ((pow((M * (0.5 * (D / d))), 2.0) / (l / (h * 0.5))) + -1.0);
} else if (l <= 9.5e+50) {
tmp = sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (pow((D * ((M * 0.5) / d)), 2.0) / 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 <= (-1d-215)) then
tmp = (d * ((l * h) ** (-0.5d0))) * ((((m * (0.5d0 * (d_1 / d))) ** 2.0d0) / (l / (h * 0.5d0))) + (-1.0d0))
else if (l <= 9.5d+50) then
tmp = sqrt((d * ((d / h) / l))) * (1.0d0 - (0.5d0 * (h * (((d_1 * ((m * 0.5d0) / d)) ** 2.0d0) / 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 <= -1e-215) {
tmp = (d * Math.pow((l * h), -0.5)) * ((Math.pow((M * (0.5 * (D / d))), 2.0) / (l / (h * 0.5))) + -1.0);
} else if (l <= 9.5e+50) {
tmp = Math.sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (Math.pow((D * ((M * 0.5) / d)), 2.0) / 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 <= -1e-215: tmp = (d * math.pow((l * h), -0.5)) * ((math.pow((M * (0.5 * (D / d))), 2.0) / (l / (h * 0.5))) + -1.0) elif l <= 9.5e+50: tmp = math.sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (math.pow((D * ((M * 0.5) / d)), 2.0) / 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 <= -1e-215) tmp = Float64(Float64(d * (Float64(l * h) ^ -0.5)) * Float64(Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) / Float64(l / Float64(h * 0.5))) + -1.0)); elseif (l <= 9.5e+50) tmp = Float64(sqrt(Float64(d * Float64(Float64(d / h) / l))) * Float64(1.0 - Float64(0.5 * Float64(h * Float64((Float64(D * Float64(Float64(M * 0.5) / d)) ^ 2.0) / 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 <= -1e-215) tmp = (d * ((l * h) ^ -0.5)) * ((((M * (0.5 * (D / d))) ^ 2.0) / (l / (h * 0.5))) + -1.0); elseif (l <= 9.5e+50) tmp = sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (((D * ((M * 0.5) / d)) ^ 2.0) / l)))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1e-215], N[(N[(d * N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(l / N[(h * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 9.5e+50], N[(N[Sqrt[N[(d * N[(N[(d / h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.5 * N[(h * N[(N[Power[N[(D * N[(N[(M * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / 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 -1 \cdot 10^{-215}:\\
\;\;\;\;\left(d \cdot {\left(\ell \cdot h\right)}^{-0.5}\right) \cdot \left(\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2}}{\frac{\ell}{h \cdot 0.5}} + -1\right)\\
\mathbf{elif}\;\ell \leq 9.5 \cdot 10^{+50}:\\
\;\;\;\;\sqrt{d \cdot \frac{\frac{d}{h}}{\ell}} \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\left(D \cdot \frac{M \cdot 0.5}{d}\right)}^{2}}{\ell}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -1.00000000000000004e-215Initial program 58.9%
metadata-eval58.9%
unpow1/258.9%
metadata-eval58.9%
unpow1/258.9%
*-commutative58.9%
associate-*l*58.9%
times-frac59.0%
metadata-eval59.0%
Simplified59.0%
associate-*r*59.0%
frac-times58.9%
*-commutative58.9%
metadata-eval58.9%
associate-*r/58.9%
metadata-eval58.9%
*-commutative58.9%
frac-times59.0%
div-inv59.0%
metadata-eval59.0%
Applied egg-rr59.0%
pow159.0%
sqrt-unprod42.4%
associate-*l*42.4%
associate-*l*42.4%
Applied egg-rr42.4%
unpow142.4%
associate-/l*41.8%
*-commutative41.8%
Simplified41.8%
Taylor expanded in d around -inf 61.0%
mul-1-neg61.0%
associate-/l/61.5%
distribute-rgt-neg-in61.5%
associate-/l/61.0%
unpow-161.0%
metadata-eval61.0%
pow-sqr61.0%
rem-sqrt-square61.9%
rem-square-sqrt61.8%
fabs-sqr61.8%
rem-square-sqrt61.9%
Simplified61.9%
if -1.00000000000000004e-215 < l < 9.4999999999999993e50Initial program 73.2%
metadata-eval73.2%
unpow1/273.2%
metadata-eval73.2%
unpow1/273.2%
*-commutative73.2%
associate-*l*73.2%
times-frac73.9%
metadata-eval73.9%
Simplified73.9%
associate-*r*73.9%
frac-times73.2%
*-commutative73.2%
metadata-eval73.2%
associate-*r/79.3%
metadata-eval79.3%
*-commutative79.3%
frac-times80.0%
div-inv80.0%
metadata-eval80.0%
Applied egg-rr80.0%
pow1/280.0%
sqr-pow79.7%
pow279.7%
metadata-eval79.7%
Applied egg-rr79.7%
pow179.7%
*-commutative79.7%
associate-*l*79.7%
associate-*r*79.7%
*-commutative79.7%
pow-pow80.0%
metadata-eval80.0%
pow1/280.0%
sqrt-prod67.8%
associate-*r/59.4%
Applied egg-rr59.4%
unpow159.4%
*-commutative59.4%
associate-/l*67.7%
associate-/r/67.8%
associate-*l/66.8%
*-commutative66.8%
*-commutative66.8%
associate-*l*66.8%
associate-*r*66.8%
associate-*r/66.2%
associate-/l*66.8%
associate-/r/64.9%
Simplified64.9%
if 9.4999999999999993e50 < l Initial program 54.8%
metadata-eval54.8%
unpow1/254.8%
metadata-eval54.8%
unpow1/254.8%
*-commutative54.8%
associate-*l*54.8%
times-frac55.0%
metadata-eval55.0%
Simplified55.0%
Taylor expanded in d around inf 63.1%
*-un-lft-identity63.1%
*-commutative63.1%
Applied egg-rr63.1%
*-lft-identity63.1%
*-commutative63.1%
associate-/r*63.0%
Simplified63.0%
sqrt-div72.9%
Applied egg-rr72.9%
Final simplification65.4%
(FPCore (d h l M D)
:precision binary64
(if (<= l -6.4e-295)
(*
d
(*
(/ 1.0 (sqrt (* l h)))
(+ (/ (* (pow (* M (* 0.5 (/ D d))) 2.0) (* h 0.5)) l) -1.0)))
(if (<= l 3.8e+51)
(*
(sqrt (* d (/ (/ d h) l)))
(- 1.0 (* 0.5 (* h (/ (pow (* D (/ (* M 0.5) d)) 2.0) l)))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -6.4e-295) {
tmp = d * ((1.0 / sqrt((l * h))) * (((pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 3.8e+51) {
tmp = sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (pow((D * ((M * 0.5) / d)), 2.0) / 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 <= (-6.4d-295)) then
tmp = d * ((1.0d0 / sqrt((l * h))) * (((((m * (0.5d0 * (d_1 / d))) ** 2.0d0) * (h * 0.5d0)) / l) + (-1.0d0)))
else if (l <= 3.8d+51) then
tmp = sqrt((d * ((d / h) / l))) * (1.0d0 - (0.5d0 * (h * (((d_1 * ((m * 0.5d0) / d)) ** 2.0d0) / 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 <= -6.4e-295) {
tmp = d * ((1.0 / Math.sqrt((l * h))) * (((Math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0));
} else if (l <= 3.8e+51) {
tmp = Math.sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (Math.pow((D * ((M * 0.5) / d)), 2.0) / 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 <= -6.4e-295: tmp = d * ((1.0 / math.sqrt((l * h))) * (((math.pow((M * (0.5 * (D / d))), 2.0) * (h * 0.5)) / l) + -1.0)) elif l <= 3.8e+51: tmp = math.sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (math.pow((D * ((M * 0.5) / d)), 2.0) / 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 <= -6.4e-295) tmp = Float64(d * Float64(Float64(1.0 / sqrt(Float64(l * h))) * Float64(Float64(Float64((Float64(M * Float64(0.5 * Float64(D / d))) ^ 2.0) * Float64(h * 0.5)) / l) + -1.0))); elseif (l <= 3.8e+51) tmp = Float64(sqrt(Float64(d * Float64(Float64(d / h) / l))) * Float64(1.0 - Float64(0.5 * Float64(h * Float64((Float64(D * Float64(Float64(M * 0.5) / d)) ^ 2.0) / 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 <= -6.4e-295) tmp = d * ((1.0 / sqrt((l * h))) * (((((M * (0.5 * (D / d))) ^ 2.0) * (h * 0.5)) / l) + -1.0)); elseif (l <= 3.8e+51) tmp = sqrt((d * ((d / h) / l))) * (1.0 - (0.5 * (h * (((D * ((M * 0.5) / d)) ^ 2.0) / l)))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -6.4e-295], N[(d * N[(N[(1.0 / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[Power[N[(M * N[(0.5 * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h * 0.5), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.8e+51], N[(N[Sqrt[N[(d * N[(N[(d / h), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.5 * N[(h * N[(N[Power[N[(D * N[(N[(M * 0.5), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / 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 -6.4 \cdot 10^{-295}:\\
\;\;\;\;d \cdot \left(\frac{1}{\sqrt{\ell \cdot h}} \cdot \left(\frac{{\left(M \cdot \left(0.5 \cdot \frac{D}{d}\right)\right)}^{2} \cdot \left(h \cdot 0.5\right)}{\ell} + -1\right)\right)\\
\mathbf{elif}\;\ell \leq 3.8 \cdot 10^{+51}:\\
\;\;\;\;\sqrt{d \cdot \frac{\frac{d}{h}}{\ell}} \cdot \left(1 - 0.5 \cdot \left(h \cdot \frac{{\left(D \cdot \frac{M \cdot 0.5}{d}\right)}^{2}}{\ell}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if l < -6.4e-295Initial program 59.9%
metadata-eval59.9%
unpow1/259.9%
metadata-eval59.9%
unpow1/259.9%
*-commutative59.9%
associate-*l*59.9%
times-frac60.5%
metadata-eval60.5%
Simplified60.5%
associate-*r*60.5%
frac-times59.9%
*-commutative59.9%
metadata-eval59.9%
associate-*r/61.7%
metadata-eval61.7%
*-commutative61.7%
frac-times62.2%
div-inv62.2%
metadata-eval62.2%
Applied egg-rr62.2%
pow162.2%
sqrt-unprod47.4%
associate-*l*47.4%
associate-*l*47.4%
Applied egg-rr47.4%
unpow147.4%
associate-/l*45.2%
*-commutative45.2%
Simplified45.2%
Taylor expanded in d around -inf 62.2%
associate-*r*62.2%
mul-1-neg62.2%
Simplified62.2%
pow162.2%
associate-*l*62.5%
sqrt-div63.2%
metadata-eval63.2%
associate-/r/71.4%
Applied egg-rr71.4%
unpow171.4%
*-commutative71.4%
associate-*l/71.5%
Simplified71.5%
if -6.4e-295 < l < 3.7999999999999997e51Initial program 75.2%
metadata-eval75.2%
unpow1/275.2%
metadata-eval75.2%
unpow1/275.2%
*-commutative75.2%
associate-*l*75.2%
times-frac75.2%
metadata-eval75.2%
Simplified75.2%
associate-*r*75.2%
frac-times75.2%
*-commutative75.2%
metadata-eval75.2%
associate-*r/80.0%
metadata-eval80.0%
*-commutative80.0%
frac-times80.0%
div-inv80.0%
metadata-eval80.0%
Applied egg-rr80.0%
pow1/280.0%
sqr-pow79.8%
pow279.8%
metadata-eval79.8%
Applied egg-rr79.8%
pow179.8%
*-commutative79.8%
associate-*l*79.8%
associate-*r*79.8%
*-commutative79.8%
pow-pow80.0%
metadata-eval80.0%
pow1/280.0%
sqrt-prod66.1%
associate-*r/60.8%
Applied egg-rr60.8%
unpow160.8%
*-commutative60.8%
associate-/l*66.1%
associate-/r/66.1%
associate-*l/65.0%
*-commutative65.0%
*-commutative65.0%
associate-*l*65.0%
associate-*r*65.0%
associate-*r/65.0%
associate-/l*65.0%
associate-/r/62.6%
Simplified62.6%
if 3.7999999999999997e51 < l Initial program 54.8%
metadata-eval54.8%
unpow1/254.8%
metadata-eval54.8%
unpow1/254.8%
*-commutative54.8%
associate-*l*54.8%
times-frac55.0%
metadata-eval55.0%
Simplified55.0%
Taylor expanded in d around inf 63.1%
*-un-lft-identity63.1%
*-commutative63.1%
Applied egg-rr63.1%
*-lft-identity63.1%
*-commutative63.1%
associate-/r*63.0%
Simplified63.0%
sqrt-div72.9%
Applied egg-rr72.9%
Final simplification69.0%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (* (/ d l) (/ d h))))
(t_1 (* d (- (pow (* l h) -0.5))))
(t_2 (* 0.125 (* (/ (* D D) l) (/ (* h (* M M)) (* d d))))))
(if (<= d -6e+153)
t_1
(if (<= d -2.5e+93)
(* t_0 (- 1.0 t_2))
(if (<= d -2e-5)
t_1
(if (<= d -5e-310)
(* (* d (sqrt (/ 1.0 (* l h)))) (+ t_2 -1.0))
(if (<= d 1.05e-125)
(* (sqrt (/ h (pow l 3.0))) (* -0.125 (/ D (/ (/ (/ d M) M) D))))
(if (<= d 4.6e+37)
(*
t_0
(- 1.0 (* 0.125 (/ (* D (* D (* M M))) (/ (* l (* d d)) 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 t_1 = d * -pow((l * h), -0.5);
double t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)));
double tmp;
if (d <= -6e+153) {
tmp = t_1;
} else if (d <= -2.5e+93) {
tmp = t_0 * (1.0 - t_2);
} else if (d <= -2e-5) {
tmp = t_1;
} else if (d <= -5e-310) {
tmp = (d * sqrt((1.0 / (l * h)))) * (t_2 + -1.0);
} else if (d <= 1.05e-125) {
tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D / (((d / M) / M) / D)));
} else if (d <= 4.6e+37) {
tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * 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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = sqrt(((d / l) * (d / h)))
t_1 = d * -((l * h) ** (-0.5d0))
t_2 = 0.125d0 * (((d_1 * d_1) / l) * ((h * (m * m)) / (d * d)))
if (d <= (-6d+153)) then
tmp = t_1
else if (d <= (-2.5d+93)) then
tmp = t_0 * (1.0d0 - t_2)
else if (d <= (-2d-5)) then
tmp = t_1
else if (d <= (-5d-310)) then
tmp = (d * sqrt((1.0d0 / (l * h)))) * (t_2 + (-1.0d0))
else if (d <= 1.05d-125) then
tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 / (((d / m) / m) / d_1)))
else if (d <= 4.6d+37) then
tmp = t_0 * (1.0d0 - (0.125d0 * ((d_1 * (d_1 * (m * m))) / ((l * (d * 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 t_0 = Math.sqrt(((d / l) * (d / h)));
double t_1 = d * -Math.pow((l * h), -0.5);
double t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)));
double tmp;
if (d <= -6e+153) {
tmp = t_1;
} else if (d <= -2.5e+93) {
tmp = t_0 * (1.0 - t_2);
} else if (d <= -2e-5) {
tmp = t_1;
} else if (d <= -5e-310) {
tmp = (d * Math.sqrt((1.0 / (l * h)))) * (t_2 + -1.0);
} else if (d <= 1.05e-125) {
tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D / (((d / M) / M) / D)));
} else if (d <= 4.6e+37) {
tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / 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))) t_1 = d * -math.pow((l * h), -0.5) t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d))) tmp = 0 if d <= -6e+153: tmp = t_1 elif d <= -2.5e+93: tmp = t_0 * (1.0 - t_2) elif d <= -2e-5: tmp = t_1 elif d <= -5e-310: tmp = (d * math.sqrt((1.0 / (l * h)))) * (t_2 + -1.0) elif d <= 1.05e-125: tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D / (((d / M) / M) / D))) elif d <= 4.6e+37: tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / 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))) t_1 = Float64(d * Float64(-(Float64(l * h) ^ -0.5))) t_2 = Float64(0.125 * Float64(Float64(Float64(D * D) / l) * Float64(Float64(h * Float64(M * M)) / Float64(d * d)))) tmp = 0.0 if (d <= -6e+153) tmp = t_1; elseif (d <= -2.5e+93) tmp = Float64(t_0 * Float64(1.0 - t_2)); elseif (d <= -2e-5) tmp = t_1; elseif (d <= -5e-310) tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(l * h)))) * Float64(t_2 + -1.0)); elseif (d <= 1.05e-125) tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D / Float64(Float64(Float64(d / M) / M) / D)))); elseif (d <= 4.6e+37) tmp = Float64(t_0 * Float64(1.0 - Float64(0.125 * Float64(Float64(D * Float64(D * Float64(M * M))) / Float64(Float64(l * Float64(d * 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) t_0 = sqrt(((d / l) * (d / h))); t_1 = d * -((l * h) ^ -0.5); t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d))); tmp = 0.0; if (d <= -6e+153) tmp = t_1; elseif (d <= -2.5e+93) tmp = t_0 * (1.0 - t_2); elseif (d <= -2e-5) tmp = t_1; elseif (d <= -5e-310) tmp = (d * sqrt((1.0 / (l * h)))) * (t_2 + -1.0); elseif (d <= 1.05e-125) tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D / (((d / M) / M) / D))); elseif (d <= 4.6e+37) tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / 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]}, Block[{t$95$1 = N[(d * (-N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$2 = N[(0.125 * N[(N[(N[(D * D), $MachinePrecision] / l), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -6e+153], t$95$1, If[LessEqual[d, -2.5e+93], N[(t$95$0 * N[(1.0 - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2e-5], t$95$1, If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 1.05e-125], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D / N[(N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 4.6e+37], N[(t$95$0 * N[(1.0 - N[(0.125 * N[(N[(D * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision] / 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}}\\
t_1 := d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)\\
t_2 := 0.125 \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)\\
\mathbf{if}\;d \leq -6 \cdot 10^{+153}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d \leq -2.5 \cdot 10^{+93}:\\
\;\;\;\;t_0 \cdot \left(1 - t_2\right)\\
\mathbf{elif}\;d \leq -2 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot \left(t_2 + -1\right)\\
\mathbf{elif}\;d \leq 1.05 \cdot 10^{-125}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{D}{\frac{\frac{\frac{d}{M}}{M}}{D}}\right)\\
\mathbf{elif}\;d \leq 4.6 \cdot 10^{+37}:\\
\;\;\;\;t_0 \cdot \left(1 - 0.125 \cdot \frac{D \cdot \left(D \cdot \left(M \cdot M\right)\right)}{\frac{\ell \cdot \left(d \cdot d\right)}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < -6.00000000000000037e153 or -2.5000000000000001e93 < d < -2.00000000000000016e-5Initial program 64.0%
metadata-eval64.0%
unpow1/264.0%
metadata-eval64.0%
unpow1/264.0%
*-commutative64.0%
associate-*l*64.0%
times-frac64.2%
metadata-eval64.2%
Simplified64.2%
associate-*r*64.2%
frac-times64.0%
*-commutative64.0%
metadata-eval64.0%
associate-*r/72.8%
metadata-eval72.8%
*-commutative72.8%
frac-times73.0%
div-inv73.0%
metadata-eval73.0%
Applied egg-rr73.0%
pow173.0%
sqrt-unprod54.7%
associate-*l*54.7%
associate-*l*54.7%
Applied egg-rr54.7%
unpow154.7%
associate-/l*45.8%
*-commutative45.8%
Simplified45.8%
Taylor expanded in d around -inf 65.8%
associate-*r*65.8%
mul-1-neg65.8%
Simplified65.8%
Taylor expanded in d around inf 65.6%
mul-1-neg65.6%
*-commutative65.6%
distribute-rgt-neg-in65.6%
unpow-165.6%
metadata-eval65.6%
pow-sqr65.6%
rem-sqrt-square67.6%
unpow167.6%
sqr-pow67.5%
fabs-sqr67.5%
sqr-pow67.6%
unpow167.6%
*-commutative67.6%
Simplified67.6%
if -6.00000000000000037e153 < d < -2.5000000000000001e93Initial program 78.8%
metadata-eval78.8%
unpow1/278.8%
metadata-eval78.8%
unpow1/278.8%
*-commutative78.8%
associate-*l*78.8%
times-frac78.8%
metadata-eval78.8%
Simplified78.8%
associate-*r*78.8%
frac-times78.8%
*-commutative78.8%
metadata-eval78.8%
associate-*r/73.0%
metadata-eval73.0%
*-commutative73.0%
frac-times73.0%
div-inv73.0%
metadata-eval73.0%
Applied egg-rr73.0%
pow173.0%
sqrt-unprod62.6%
associate-*l*62.6%
associate-*l*62.6%
Applied egg-rr62.6%
unpow162.6%
associate-/l*64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in M around 0 36.7%
times-frac53.8%
unpow253.8%
unpow253.8%
unpow253.8%
Simplified60.5%
if -2.00000000000000016e-5 < d < -4.999999999999985e-310Initial program 51.8%
metadata-eval51.8%
unpow1/251.8%
metadata-eval51.8%
unpow1/251.8%
*-commutative51.8%
associate-*l*51.8%
times-frac52.9%
metadata-eval52.9%
Simplified52.9%
associate-*r*52.9%
frac-times51.8%
*-commutative51.8%
metadata-eval51.8%
associate-*r/51.9%
metadata-eval51.9%
*-commutative51.9%
frac-times53.0%
div-inv53.0%
metadata-eval53.0%
Applied egg-rr53.0%
pow153.0%
sqrt-unprod40.3%
associate-*l*40.3%
associate-*l*40.3%
Applied egg-rr40.3%
unpow140.3%
associate-/l*40.2%
*-commutative40.2%
Simplified40.2%
Taylor expanded in d around -inf 59.9%
associate-*r*59.9%
mul-1-neg59.9%
Simplified59.9%
Taylor expanded in M around 0 56.2%
times-frac54.7%
unpow254.7%
unpow254.7%
unpow254.7%
Simplified54.7%
if -4.999999999999985e-310 < d < 1.05e-125Initial program 42.5%
metadata-eval42.5%
unpow1/242.5%
metadata-eval42.5%
unpow1/242.5%
*-commutative42.5%
associate-*l*42.5%
times-frac42.5%
metadata-eval42.5%
Simplified42.5%
associate-*r*42.5%
frac-times42.5%
*-commutative42.5%
metadata-eval42.5%
associate-*r/42.4%
metadata-eval42.4%
*-commutative42.4%
frac-times42.4%
div-inv42.4%
metadata-eval42.4%
Applied egg-rr42.4%
Taylor expanded in d around 0 33.3%
associate-*r*33.3%
*-commutative33.3%
associate-/l*28.2%
unpow228.2%
associate-/l*28.8%
unpow228.8%
associate-/r*33.6%
Simplified33.6%
if 1.05e-125 < d < 4.60000000000000005e37Initial 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%
associate-*r*71.6%
frac-times71.5%
*-commutative71.5%
metadata-eval71.5%
associate-*r/77.9%
metadata-eval77.9%
*-commutative77.9%
frac-times77.9%
div-inv77.9%
metadata-eval77.9%
Applied egg-rr77.9%
pow177.9%
sqrt-unprod78.0%
associate-*l*78.0%
associate-*l*78.0%
Applied egg-rr78.0%
unpow178.0%
associate-/l*71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in M around 0 60.4%
associate-*r/60.4%
*-commutative60.4%
associate-*r/60.4%
*-commutative60.4%
associate-*r*60.4%
associate-/l*60.2%
unpow260.2%
associate-*l*70.6%
unpow270.6%
unpow270.6%
Simplified70.6%
if 4.60000000000000005e37 < d Initial program 80.1%
metadata-eval80.1%
unpow1/280.1%
metadata-eval80.1%
unpow1/280.1%
*-commutative80.1%
associate-*l*80.1%
times-frac80.2%
metadata-eval80.2%
Simplified80.2%
Taylor expanded in d around inf 72.2%
*-un-lft-identity72.2%
*-commutative72.2%
Applied egg-rr72.2%
*-lft-identity72.2%
*-commutative72.2%
associate-/r*72.3%
Simplified72.3%
sqrt-div82.6%
Applied egg-rr82.6%
Final simplification62.8%
(FPCore (d h l M D)
:precision binary64
(if (<= d 4.5e-308)
(/
(* d (- -1.0 (/ -0.5 (/ (/ l h) (pow (/ (* D (* M 0.5)) d) 2.0)))))
(sqrt (* l h)))
(if (<= d 7.2e-126)
(* (sqrt (/ h (pow l 3.0))) (* -0.125 (/ D (/ (/ (/ d M) M) D))))
(if (<= d 7.6e+37)
(*
(sqrt (* (/ d l) (/ d h)))
(- 1.0 (* 0.125 (/ (* D (* D (* M M))) (/ (* l (* d d)) h)))))
(* d (/ (sqrt (/ 1.0 l)) (sqrt h)))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= 4.5e-308) {
tmp = (d * (-1.0 - (-0.5 / ((l / h) / pow(((D * (M * 0.5)) / d), 2.0))))) / sqrt((l * h));
} else if (d <= 7.2e-126) {
tmp = sqrt((h / pow(l, 3.0))) * (-0.125 * (D / (((d / M) / M) / D)));
} else if (d <= 7.6e+37) {
tmp = sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * 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 (d <= 4.5d-308) then
tmp = (d * ((-1.0d0) - ((-0.5d0) / ((l / h) / (((d_1 * (m * 0.5d0)) / d) ** 2.0d0))))) / sqrt((l * h))
else if (d <= 7.2d-126) then
tmp = sqrt((h / (l ** 3.0d0))) * ((-0.125d0) * (d_1 / (((d / m) / m) / d_1)))
else if (d <= 7.6d+37) then
tmp = sqrt(((d / l) * (d / h))) * (1.0d0 - (0.125d0 * ((d_1 * (d_1 * (m * m))) / ((l * (d * 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 (d <= 4.5e-308) {
tmp = (d * (-1.0 - (-0.5 / ((l / h) / Math.pow(((D * (M * 0.5)) / d), 2.0))))) / Math.sqrt((l * h));
} else if (d <= 7.2e-126) {
tmp = Math.sqrt((h / Math.pow(l, 3.0))) * (-0.125 * (D / (((d / M) / M) / D)));
} else if (d <= 7.6e+37) {
tmp = Math.sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * 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 d <= 4.5e-308: tmp = (d * (-1.0 - (-0.5 / ((l / h) / math.pow(((D * (M * 0.5)) / d), 2.0))))) / math.sqrt((l * h)) elif d <= 7.2e-126: tmp = math.sqrt((h / math.pow(l, 3.0))) * (-0.125 * (D / (((d / M) / M) / D))) elif d <= 7.6e+37: tmp = math.sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * 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 (d <= 4.5e-308) tmp = Float64(Float64(d * Float64(-1.0 - Float64(-0.5 / Float64(Float64(l / h) / (Float64(Float64(D * Float64(M * 0.5)) / d) ^ 2.0))))) / sqrt(Float64(l * h))); elseif (d <= 7.2e-126) tmp = Float64(sqrt(Float64(h / (l ^ 3.0))) * Float64(-0.125 * Float64(D / Float64(Float64(Float64(d / M) / M) / D)))); elseif (d <= 7.6e+37) tmp = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(1.0 - Float64(0.125 * Float64(Float64(D * Float64(D * Float64(M * M))) / Float64(Float64(l * Float64(d * 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 (d <= 4.5e-308) tmp = (d * (-1.0 - (-0.5 / ((l / h) / (((D * (M * 0.5)) / d) ^ 2.0))))) / sqrt((l * h)); elseif (d <= 7.2e-126) tmp = sqrt((h / (l ^ 3.0))) * (-0.125 * (D / (((d / M) / M) / D))); elseif (d <= 7.6e+37) tmp = sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / h)))); else tmp = d * (sqrt((1.0 / l)) / sqrt(h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, 4.5e-308], N[(N[(d * N[(-1.0 - N[(-0.5 / N[(N[(l / h), $MachinePrecision] / N[Power[N[(N[(D * N[(M * 0.5), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7.2e-126], N[(N[Sqrt[N[(h / N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(-0.125 * N[(D / N[(N[(N[(d / M), $MachinePrecision] / M), $MachinePrecision] / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 7.6e+37], N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.125 * N[(N[(D * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision] / 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}
\mathbf{if}\;d \leq 4.5 \cdot 10^{-308}:\\
\;\;\;\;\frac{d \cdot \left(-1 - \frac{-0.5}{\frac{\frac{\ell}{h}}{{\left(\frac{D \cdot \left(M \cdot 0.5\right)}{d}\right)}^{2}}}\right)}{\sqrt{\ell \cdot h}}\\
\mathbf{elif}\;d \leq 7.2 \cdot 10^{-126}:\\
\;\;\;\;\sqrt{\frac{h}{{\ell}^{3}}} \cdot \left(-0.125 \cdot \frac{D}{\frac{\frac{\frac{d}{M}}{M}}{D}}\right)\\
\mathbf{elif}\;d \leq 7.6 \cdot 10^{+37}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D \cdot \left(D \cdot \left(M \cdot M\right)\right)}{\frac{\ell \cdot \left(d \cdot d\right)}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < 4.50000000000000009e-308Initial program 59.6%
metadata-eval59.6%
unpow1/259.6%
metadata-eval59.6%
unpow1/259.6%
*-commutative59.6%
associate-*l*59.6%
times-frac60.1%
metadata-eval60.1%
Simplified60.1%
associate-*r*60.1%
frac-times59.6%
*-commutative59.6%
metadata-eval59.6%
associate-*r/62.1%
metadata-eval62.1%
*-commutative62.1%
frac-times62.6%
div-inv62.6%
metadata-eval62.6%
Applied egg-rr62.6%
pow162.6%
sqrt-unprod48.3%
associate-*l*48.3%
associate-*l*48.3%
Applied egg-rr48.3%
unpow148.3%
associate-/l*45.3%
*-commutative45.3%
Simplified45.3%
Taylor expanded in d around -inf 61.8%
associate-*r*61.8%
mul-1-neg61.8%
Simplified61.8%
pow161.8%
associate-*l*62.1%
sqrt-div62.8%
metadata-eval62.8%
associate-/r/71.6%
Applied egg-rr71.6%
unpow171.6%
associate-*l/71.5%
*-lft-identity71.5%
associate-*r/72.1%
Simplified62.0%
if 4.50000000000000009e-308 < d < 7.1999999999999999e-126Initial program 43.6%
metadata-eval43.6%
unpow1/243.6%
metadata-eval43.6%
unpow1/243.6%
*-commutative43.6%
associate-*l*43.6%
times-frac43.6%
metadata-eval43.6%
Simplified43.6%
associate-*r*43.6%
frac-times43.6%
*-commutative43.6%
metadata-eval43.6%
associate-*r/43.5%
metadata-eval43.5%
*-commutative43.5%
frac-times43.5%
div-inv43.5%
metadata-eval43.5%
Applied egg-rr43.5%
Taylor expanded in d around 0 34.2%
associate-*r*34.2%
*-commutative34.2%
associate-/l*29.0%
unpow229.0%
associate-/l*29.5%
unpow229.5%
associate-/r*34.4%
Simplified34.4%
if 7.1999999999999999e-126 < d < 7.59999999999999979e37Initial 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%
associate-*r*71.6%
frac-times71.5%
*-commutative71.5%
metadata-eval71.5%
associate-*r/77.9%
metadata-eval77.9%
*-commutative77.9%
frac-times77.9%
div-inv77.9%
metadata-eval77.9%
Applied egg-rr77.9%
pow177.9%
sqrt-unprod78.0%
associate-*l*78.0%
associate-*l*78.0%
Applied egg-rr78.0%
unpow178.0%
associate-/l*71.8%
*-commutative71.8%
Simplified71.8%
Taylor expanded in M around 0 60.4%
associate-*r/60.4%
*-commutative60.4%
associate-*r/60.4%
*-commutative60.4%
associate-*r*60.4%
associate-/l*60.2%
unpow260.2%
associate-*l*70.6%
unpow270.6%
unpow270.6%
Simplified70.6%
if 7.59999999999999979e37 < d Initial program 80.1%
metadata-eval80.1%
unpow1/280.1%
metadata-eval80.1%
unpow1/280.1%
*-commutative80.1%
associate-*l*80.1%
times-frac80.2%
metadata-eval80.2%
Simplified80.2%
Taylor expanded in d around inf 72.2%
*-un-lft-identity72.2%
*-commutative72.2%
Applied egg-rr72.2%
*-lft-identity72.2%
*-commutative72.2%
associate-/r*72.3%
Simplified72.3%
sqrt-div82.6%
Applied egg-rr82.6%
Final simplification63.9%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (* (/ d l) (/ d h))))
(t_1 (* d (- (pow (* l h) -0.5))))
(t_2 (* 0.125 (* (/ (* D D) l) (/ (* h (* M M)) (* d d))))))
(if (<= d -1.05e+154)
t_1
(if (<= d -5.9e+93)
(* t_0 (- 1.0 t_2))
(if (<= d -3.9e-7)
t_1
(if (<= d -5e-310)
(* (* d (sqrt (/ 1.0 (* l h)))) (+ t_2 -1.0))
(if (or (<= d 3.7e-87) (not (<= d 7.8e+37)))
(* d (* (pow h -0.5) (pow l -0.5)))
(*
t_0
(-
1.0
(* 0.125 (/ (* D (* D (* M M))) (/ (* l (* d d)) h))))))))))))
double code(double d, double h, double l, double M, double D) {
double t_0 = sqrt(((d / l) * (d / h)));
double t_1 = d * -pow((l * h), -0.5);
double t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)));
double tmp;
if (d <= -1.05e+154) {
tmp = t_1;
} else if (d <= -5.9e+93) {
tmp = t_0 * (1.0 - t_2);
} else if (d <= -3.9e-7) {
tmp = t_1;
} else if (d <= -5e-310) {
tmp = (d * sqrt((1.0 / (l * h)))) * (t_2 + -1.0);
} else if ((d <= 3.7e-87) || !(d <= 7.8e+37)) {
tmp = d * (pow(h, -0.5) * pow(l, -0.5));
} else {
tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = sqrt(((d / l) * (d / h)))
t_1 = d * -((l * h) ** (-0.5d0))
t_2 = 0.125d0 * (((d_1 * d_1) / l) * ((h * (m * m)) / (d * d)))
if (d <= (-1.05d+154)) then
tmp = t_1
else if (d <= (-5.9d+93)) then
tmp = t_0 * (1.0d0 - t_2)
else if (d <= (-3.9d-7)) then
tmp = t_1
else if (d <= (-5d-310)) then
tmp = (d * sqrt((1.0d0 / (l * h)))) * (t_2 + (-1.0d0))
else if ((d <= 3.7d-87) .or. (.not. (d <= 7.8d+37))) then
tmp = d * ((h ** (-0.5d0)) * (l ** (-0.5d0)))
else
tmp = t_0 * (1.0d0 - (0.125d0 * ((d_1 * (d_1 * (m * m))) / ((l * (d * d)) / 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 t_1 = d * -Math.pow((l * h), -0.5);
double t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)));
double tmp;
if (d <= -1.05e+154) {
tmp = t_1;
} else if (d <= -5.9e+93) {
tmp = t_0 * (1.0 - t_2);
} else if (d <= -3.9e-7) {
tmp = t_1;
} else if (d <= -5e-310) {
tmp = (d * Math.sqrt((1.0 / (l * h)))) * (t_2 + -1.0);
} else if ((d <= 3.7e-87) || !(d <= 7.8e+37)) {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
} else {
tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / h))));
}
return tmp;
}
def code(d, h, l, M, D): t_0 = math.sqrt(((d / l) * (d / h))) t_1 = d * -math.pow((l * h), -0.5) t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d))) tmp = 0 if d <= -1.05e+154: tmp = t_1 elif d <= -5.9e+93: tmp = t_0 * (1.0 - t_2) elif d <= -3.9e-7: tmp = t_1 elif d <= -5e-310: tmp = (d * math.sqrt((1.0 / (l * h)))) * (t_2 + -1.0) elif (d <= 3.7e-87) or not (d <= 7.8e+37): tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) else: tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / h)))) return tmp
function code(d, h, l, M, D) t_0 = sqrt(Float64(Float64(d / l) * Float64(d / h))) t_1 = Float64(d * Float64(-(Float64(l * h) ^ -0.5))) t_2 = Float64(0.125 * Float64(Float64(Float64(D * D) / l) * Float64(Float64(h * Float64(M * M)) / Float64(d * d)))) tmp = 0.0 if (d <= -1.05e+154) tmp = t_1; elseif (d <= -5.9e+93) tmp = Float64(t_0 * Float64(1.0 - t_2)); elseif (d <= -3.9e-7) tmp = t_1; elseif (d <= -5e-310) tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(l * h)))) * Float64(t_2 + -1.0)); elseif ((d <= 3.7e-87) || !(d <= 7.8e+37)) tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); else tmp = Float64(t_0 * Float64(1.0 - Float64(0.125 * Float64(Float64(D * Float64(D * Float64(M * M))) / Float64(Float64(l * Float64(d * d)) / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) t_0 = sqrt(((d / l) * (d / h))); t_1 = d * -((l * h) ^ -0.5); t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d))); tmp = 0.0; if (d <= -1.05e+154) tmp = t_1; elseif (d <= -5.9e+93) tmp = t_0 * (1.0 - t_2); elseif (d <= -3.9e-7) tmp = t_1; elseif (d <= -5e-310) tmp = (d * sqrt((1.0 / (l * h)))) * (t_2 + -1.0); elseif ((d <= 3.7e-87) || ~((d <= 7.8e+37))) tmp = d * ((h ^ -0.5) * (l ^ -0.5)); else tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / 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]}, Block[{t$95$1 = N[(d * (-N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$2 = N[(0.125 * N[(N[(N[(D * D), $MachinePrecision] / l), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -1.05e+154], t$95$1, If[LessEqual[d, -5.9e+93], N[(t$95$0 * N[(1.0 - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -3.9e-7], t$95$1, If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 + -1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[d, 3.7e-87], N[Not[LessEqual[d, 7.8e+37]], $MachinePrecision]], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(1.0 - N[(0.125 * N[(N[(D * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{d}{\ell} \cdot \frac{d}{h}}\\
t_1 := d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)\\
t_2 := 0.125 \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)\\
\mathbf{if}\;d \leq -1.05 \cdot 10^{+154}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d \leq -5.9 \cdot 10^{+93}:\\
\;\;\;\;t_0 \cdot \left(1 - t_2\right)\\
\mathbf{elif}\;d \leq -3.9 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot \left(t_2 + -1\right)\\
\mathbf{elif}\;d \leq 3.7 \cdot 10^{-87} \lor \neg \left(d \leq 7.8 \cdot 10^{+37}\right):\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(1 - 0.125 \cdot \frac{D \cdot \left(D \cdot \left(M \cdot M\right)\right)}{\frac{\ell \cdot \left(d \cdot d\right)}{h}}\right)\\
\end{array}
\end{array}
if d < -1.04999999999999997e154 or -5.90000000000000008e93 < d < -3.90000000000000025e-7Initial program 64.0%
metadata-eval64.0%
unpow1/264.0%
metadata-eval64.0%
unpow1/264.0%
*-commutative64.0%
associate-*l*64.0%
times-frac64.2%
metadata-eval64.2%
Simplified64.2%
associate-*r*64.2%
frac-times64.0%
*-commutative64.0%
metadata-eval64.0%
associate-*r/72.8%
metadata-eval72.8%
*-commutative72.8%
frac-times73.0%
div-inv73.0%
metadata-eval73.0%
Applied egg-rr73.0%
pow173.0%
sqrt-unprod54.7%
associate-*l*54.7%
associate-*l*54.7%
Applied egg-rr54.7%
unpow154.7%
associate-/l*45.8%
*-commutative45.8%
Simplified45.8%
Taylor expanded in d around -inf 65.8%
associate-*r*65.8%
mul-1-neg65.8%
Simplified65.8%
Taylor expanded in d around inf 65.6%
mul-1-neg65.6%
*-commutative65.6%
distribute-rgt-neg-in65.6%
unpow-165.6%
metadata-eval65.6%
pow-sqr65.6%
rem-sqrt-square67.6%
unpow167.6%
sqr-pow67.5%
fabs-sqr67.5%
sqr-pow67.6%
unpow167.6%
*-commutative67.6%
Simplified67.6%
if -1.04999999999999997e154 < d < -5.90000000000000008e93Initial program 78.8%
metadata-eval78.8%
unpow1/278.8%
metadata-eval78.8%
unpow1/278.8%
*-commutative78.8%
associate-*l*78.8%
times-frac78.8%
metadata-eval78.8%
Simplified78.8%
associate-*r*78.8%
frac-times78.8%
*-commutative78.8%
metadata-eval78.8%
associate-*r/73.0%
metadata-eval73.0%
*-commutative73.0%
frac-times73.0%
div-inv73.0%
metadata-eval73.0%
Applied egg-rr73.0%
pow173.0%
sqrt-unprod62.6%
associate-*l*62.6%
associate-*l*62.6%
Applied egg-rr62.6%
unpow162.6%
associate-/l*64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in M around 0 36.7%
times-frac53.8%
unpow253.8%
unpow253.8%
unpow253.8%
Simplified60.5%
if -3.90000000000000025e-7 < d < -4.999999999999985e-310Initial program 51.8%
metadata-eval51.8%
unpow1/251.8%
metadata-eval51.8%
unpow1/251.8%
*-commutative51.8%
associate-*l*51.8%
times-frac52.9%
metadata-eval52.9%
Simplified52.9%
associate-*r*52.9%
frac-times51.8%
*-commutative51.8%
metadata-eval51.8%
associate-*r/51.9%
metadata-eval51.9%
*-commutative51.9%
frac-times53.0%
div-inv53.0%
metadata-eval53.0%
Applied egg-rr53.0%
pow153.0%
sqrt-unprod40.3%
associate-*l*40.3%
associate-*l*40.3%
Applied egg-rr40.3%
unpow140.3%
associate-/l*40.2%
*-commutative40.2%
Simplified40.2%
Taylor expanded in d around -inf 59.9%
associate-*r*59.9%
mul-1-neg59.9%
Simplified59.9%
Taylor expanded in M around 0 56.2%
times-frac54.7%
unpow254.7%
unpow254.7%
unpow254.7%
Simplified54.7%
if -4.999999999999985e-310 < d < 3.7000000000000002e-87 or 7.7999999999999997e37 < d Initial program 63.7%
metadata-eval63.7%
unpow1/263.7%
metadata-eval63.7%
unpow1/263.7%
*-commutative63.7%
associate-*l*63.7%
times-frac63.8%
metadata-eval63.8%
Simplified63.8%
Taylor expanded in d around inf 54.1%
*-un-lft-identity54.1%
*-commutative54.1%
Applied egg-rr54.1%
*-lft-identity54.1%
unpow-154.1%
sqr-pow54.2%
rem-sqrt-square54.9%
sqr-pow54.7%
fabs-sqr54.7%
sqr-pow54.9%
metadata-eval54.9%
Simplified54.9%
unpow-prod-down60.6%
Applied egg-rr60.6%
if 3.7000000000000002e-87 < d < 7.7999999999999997e37Initial program 84.6%
metadata-eval84.6%
unpow1/284.6%
metadata-eval84.6%
unpow1/284.6%
*-commutative84.6%
associate-*l*84.6%
times-frac84.7%
metadata-eval84.7%
Simplified84.7%
associate-*r*84.7%
frac-times84.6%
*-commutative84.6%
metadata-eval84.6%
associate-*r/93.0%
metadata-eval93.0%
*-commutative93.0%
frac-times93.1%
div-inv93.1%
metadata-eval93.1%
Applied egg-rr93.1%
pow193.1%
sqrt-unprod93.2%
associate-*l*93.2%
associate-*l*93.2%
Applied egg-rr93.2%
unpow193.2%
associate-/l*84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in M around 0 68.4%
associate-*r/68.4%
*-commutative68.4%
associate-*r/68.4%
*-commutative68.4%
associate-*r*68.5%
associate-/l*68.5%
unpow268.5%
associate-*l*83.1%
unpow283.1%
unpow283.1%
Simplified83.1%
Final simplification62.2%
(FPCore (d h l M D)
:precision binary64
(let* ((t_0 (sqrt (* (/ d l) (/ d h))))
(t_1 (* d (- (pow (* l h) -0.5))))
(t_2 (* 0.125 (* (/ (* D D) l) (/ (* h (* M M)) (* d d))))))
(if (<= d -5.5e+153)
t_1
(if (<= d -4e+92)
(* t_0 (- 1.0 t_2))
(if (<= d -2e-5)
t_1
(if (<= d -5e-310)
(* (* d (sqrt (/ 1.0 (* l h)))) (+ t_2 -1.0))
(if (<= d 2.05e-90)
(* d (* (pow h -0.5) (pow l -0.5)))
(if (<= d 3.6e+37)
(*
t_0
(- 1.0 (* 0.125 (/ (* D (* D (* M M))) (/ (* l (* d d)) 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 t_1 = d * -pow((l * h), -0.5);
double t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)));
double tmp;
if (d <= -5.5e+153) {
tmp = t_1;
} else if (d <= -4e+92) {
tmp = t_0 * (1.0 - t_2);
} else if (d <= -2e-5) {
tmp = t_1;
} else if (d <= -5e-310) {
tmp = (d * sqrt((1.0 / (l * h)))) * (t_2 + -1.0);
} else if (d <= 2.05e-90) {
tmp = d * (pow(h, -0.5) * pow(l, -0.5));
} else if (d <= 3.6e+37) {
tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * 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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = sqrt(((d / l) * (d / h)))
t_1 = d * -((l * h) ** (-0.5d0))
t_2 = 0.125d0 * (((d_1 * d_1) / l) * ((h * (m * m)) / (d * d)))
if (d <= (-5.5d+153)) then
tmp = t_1
else if (d <= (-4d+92)) then
tmp = t_0 * (1.0d0 - t_2)
else if (d <= (-2d-5)) then
tmp = t_1
else if (d <= (-5d-310)) then
tmp = (d * sqrt((1.0d0 / (l * h)))) * (t_2 + (-1.0d0))
else if (d <= 2.05d-90) then
tmp = d * ((h ** (-0.5d0)) * (l ** (-0.5d0)))
else if (d <= 3.6d+37) then
tmp = t_0 * (1.0d0 - (0.125d0 * ((d_1 * (d_1 * (m * m))) / ((l * (d * 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 t_0 = Math.sqrt(((d / l) * (d / h)));
double t_1 = d * -Math.pow((l * h), -0.5);
double t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)));
double tmp;
if (d <= -5.5e+153) {
tmp = t_1;
} else if (d <= -4e+92) {
tmp = t_0 * (1.0 - t_2);
} else if (d <= -2e-5) {
tmp = t_1;
} else if (d <= -5e-310) {
tmp = (d * Math.sqrt((1.0 / (l * h)))) * (t_2 + -1.0);
} else if (d <= 2.05e-90) {
tmp = d * (Math.pow(h, -0.5) * Math.pow(l, -0.5));
} else if (d <= 3.6e+37) {
tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / 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))) t_1 = d * -math.pow((l * h), -0.5) t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d))) tmp = 0 if d <= -5.5e+153: tmp = t_1 elif d <= -4e+92: tmp = t_0 * (1.0 - t_2) elif d <= -2e-5: tmp = t_1 elif d <= -5e-310: tmp = (d * math.sqrt((1.0 / (l * h)))) * (t_2 + -1.0) elif d <= 2.05e-90: tmp = d * (math.pow(h, -0.5) * math.pow(l, -0.5)) elif d <= 3.6e+37: tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / 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))) t_1 = Float64(d * Float64(-(Float64(l * h) ^ -0.5))) t_2 = Float64(0.125 * Float64(Float64(Float64(D * D) / l) * Float64(Float64(h * Float64(M * M)) / Float64(d * d)))) tmp = 0.0 if (d <= -5.5e+153) tmp = t_1; elseif (d <= -4e+92) tmp = Float64(t_0 * Float64(1.0 - t_2)); elseif (d <= -2e-5) tmp = t_1; elseif (d <= -5e-310) tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(l * h)))) * Float64(t_2 + -1.0)); elseif (d <= 2.05e-90) tmp = Float64(d * Float64((h ^ -0.5) * (l ^ -0.5))); elseif (d <= 3.6e+37) tmp = Float64(t_0 * Float64(1.0 - Float64(0.125 * Float64(Float64(D * Float64(D * Float64(M * M))) / Float64(Float64(l * Float64(d * 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) t_0 = sqrt(((d / l) * (d / h))); t_1 = d * -((l * h) ^ -0.5); t_2 = 0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d))); tmp = 0.0; if (d <= -5.5e+153) tmp = t_1; elseif (d <= -4e+92) tmp = t_0 * (1.0 - t_2); elseif (d <= -2e-5) tmp = t_1; elseif (d <= -5e-310) tmp = (d * sqrt((1.0 / (l * h)))) * (t_2 + -1.0); elseif (d <= 2.05e-90) tmp = d * ((h ^ -0.5) * (l ^ -0.5)); elseif (d <= 3.6e+37) tmp = t_0 * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / 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]}, Block[{t$95$1 = N[(d * (-N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision])), $MachinePrecision]}, Block[{t$95$2 = N[(0.125 * N[(N[(N[(D * D), $MachinePrecision] / l), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[d, -5.5e+153], t$95$1, If[LessEqual[d, -4e+92], N[(t$95$0 * N[(1.0 - t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, -2e-5], t$95$1, If[LessEqual[d, -5e-310], N[(N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 2.05e-90], N[(d * N[(N[Power[h, -0.5], $MachinePrecision] * N[Power[l, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[d, 3.6e+37], N[(t$95$0 * N[(1.0 - N[(0.125 * N[(N[(D * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision] / 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}}\\
t_1 := d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)\\
t_2 := 0.125 \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right)\\
\mathbf{if}\;d \leq -5.5 \cdot 10^{+153}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d \leq -4 \cdot 10^{+92}:\\
\;\;\;\;t_0 \cdot \left(1 - t_2\right)\\
\mathbf{elif}\;d \leq -2 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;d \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot \left(t_2 + -1\right)\\
\mathbf{elif}\;d \leq 2.05 \cdot 10^{-90}:\\
\;\;\;\;d \cdot \left({h}^{-0.5} \cdot {\ell}^{-0.5}\right)\\
\mathbf{elif}\;d \leq 3.6 \cdot 10^{+37}:\\
\;\;\;\;t_0 \cdot \left(1 - 0.125 \cdot \frac{D \cdot \left(D \cdot \left(M \cdot M\right)\right)}{\frac{\ell \cdot \left(d \cdot d\right)}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \frac{\sqrt{\frac{1}{\ell}}}{\sqrt{h}}\\
\end{array}
\end{array}
if d < -5.5000000000000003e153 or -4.0000000000000002e92 < d < -2.00000000000000016e-5Initial program 64.0%
metadata-eval64.0%
unpow1/264.0%
metadata-eval64.0%
unpow1/264.0%
*-commutative64.0%
associate-*l*64.0%
times-frac64.2%
metadata-eval64.2%
Simplified64.2%
associate-*r*64.2%
frac-times64.0%
*-commutative64.0%
metadata-eval64.0%
associate-*r/72.8%
metadata-eval72.8%
*-commutative72.8%
frac-times73.0%
div-inv73.0%
metadata-eval73.0%
Applied egg-rr73.0%
pow173.0%
sqrt-unprod54.7%
associate-*l*54.7%
associate-*l*54.7%
Applied egg-rr54.7%
unpow154.7%
associate-/l*45.8%
*-commutative45.8%
Simplified45.8%
Taylor expanded in d around -inf 65.8%
associate-*r*65.8%
mul-1-neg65.8%
Simplified65.8%
Taylor expanded in d around inf 65.6%
mul-1-neg65.6%
*-commutative65.6%
distribute-rgt-neg-in65.6%
unpow-165.6%
metadata-eval65.6%
pow-sqr65.6%
rem-sqrt-square67.6%
unpow167.6%
sqr-pow67.5%
fabs-sqr67.5%
sqr-pow67.6%
unpow167.6%
*-commutative67.6%
Simplified67.6%
if -5.5000000000000003e153 < d < -4.0000000000000002e92Initial program 78.8%
metadata-eval78.8%
unpow1/278.8%
metadata-eval78.8%
unpow1/278.8%
*-commutative78.8%
associate-*l*78.8%
times-frac78.8%
metadata-eval78.8%
Simplified78.8%
associate-*r*78.8%
frac-times78.8%
*-commutative78.8%
metadata-eval78.8%
associate-*r/73.0%
metadata-eval73.0%
*-commutative73.0%
frac-times73.0%
div-inv73.0%
metadata-eval73.0%
Applied egg-rr73.0%
pow173.0%
sqrt-unprod62.6%
associate-*l*62.6%
associate-*l*62.6%
Applied egg-rr62.6%
unpow162.6%
associate-/l*64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in M around 0 36.7%
times-frac53.8%
unpow253.8%
unpow253.8%
unpow253.8%
Simplified60.5%
if -2.00000000000000016e-5 < d < -4.999999999999985e-310Initial program 51.8%
metadata-eval51.8%
unpow1/251.8%
metadata-eval51.8%
unpow1/251.8%
*-commutative51.8%
associate-*l*51.8%
times-frac52.9%
metadata-eval52.9%
Simplified52.9%
associate-*r*52.9%
frac-times51.8%
*-commutative51.8%
metadata-eval51.8%
associate-*r/51.9%
metadata-eval51.9%
*-commutative51.9%
frac-times53.0%
div-inv53.0%
metadata-eval53.0%
Applied egg-rr53.0%
pow153.0%
sqrt-unprod40.3%
associate-*l*40.3%
associate-*l*40.3%
Applied egg-rr40.3%
unpow140.3%
associate-/l*40.2%
*-commutative40.2%
Simplified40.2%
Taylor expanded in d around -inf 59.9%
associate-*r*59.9%
mul-1-neg59.9%
Simplified59.9%
Taylor expanded in M around 0 56.2%
times-frac54.7%
unpow254.7%
unpow254.7%
unpow254.7%
Simplified54.7%
if -4.999999999999985e-310 < d < 2.05000000000000017e-90Initial program 41.9%
metadata-eval41.9%
unpow1/241.9%
metadata-eval41.9%
unpow1/241.9%
*-commutative41.9%
associate-*l*41.9%
times-frac41.9%
metadata-eval41.9%
Simplified41.9%
Taylor expanded in d around inf 30.0%
*-un-lft-identity30.0%
*-commutative30.0%
Applied egg-rr30.0%
*-lft-identity30.0%
unpow-130.0%
sqr-pow30.0%
rem-sqrt-square30.0%
sqr-pow29.9%
fabs-sqr29.9%
sqr-pow30.0%
metadata-eval30.0%
Simplified30.0%
unpow-prod-down31.4%
Applied egg-rr31.4%
if 2.05000000000000017e-90 < d < 3.59999999999999998e37Initial program 84.6%
metadata-eval84.6%
unpow1/284.6%
metadata-eval84.6%
unpow1/284.6%
*-commutative84.6%
associate-*l*84.6%
times-frac84.7%
metadata-eval84.7%
Simplified84.7%
associate-*r*84.7%
frac-times84.6%
*-commutative84.6%
metadata-eval84.6%
associate-*r/93.0%
metadata-eval93.0%
*-commutative93.0%
frac-times93.1%
div-inv93.1%
metadata-eval93.1%
Applied egg-rr93.1%
pow193.1%
sqrt-unprod93.2%
associate-*l*93.2%
associate-*l*93.2%
Applied egg-rr93.2%
unpow193.2%
associate-/l*84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in M around 0 68.4%
associate-*r/68.4%
*-commutative68.4%
associate-*r/68.4%
*-commutative68.4%
associate-*r*68.5%
associate-/l*68.5%
unpow268.5%
associate-*l*83.1%
unpow283.1%
unpow283.1%
Simplified83.1%
if 3.59999999999999998e37 < d Initial program 80.1%
metadata-eval80.1%
unpow1/280.1%
metadata-eval80.1%
unpow1/280.1%
*-commutative80.1%
associate-*l*80.1%
times-frac80.2%
metadata-eval80.2%
Simplified80.2%
Taylor expanded in d around inf 72.2%
*-un-lft-identity72.2%
*-commutative72.2%
Applied egg-rr72.2%
*-lft-identity72.2%
*-commutative72.2%
associate-/r*72.3%
Simplified72.3%
sqrt-div82.6%
Applied egg-rr82.6%
Final simplification62.2%
(FPCore (d h l M D)
:precision binary64
(if (<= h -1.5e-238)
(*
(* d (sqrt (/ 1.0 (* l h))))
(+ (* 0.125 (* (/ (* D D) l) (/ (* h (* M M)) (* d d)))) -1.0))
(if (<= h 2.8e-303)
(* d (- (pow (* l h) -0.5)))
(if (<= h 2.3e+37)
(/ d (sqrt (* l h)))
(*
(sqrt (* (/ d l) (/ d h)))
(- 1.0 (* 0.125 (/ (* D (* D (* M M))) (/ (* l (* d d)) h)))))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (h <= -1.5e-238) {
tmp = (d * sqrt((1.0 / (l * h)))) * ((0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)))) + -1.0);
} else if (h <= 2.8e-303) {
tmp = d * -pow((l * h), -0.5);
} else if (h <= 2.3e+37) {
tmp = d / sqrt((l * h));
} else {
tmp = sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / 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 (h <= (-1.5d-238)) then
tmp = (d * sqrt((1.0d0 / (l * h)))) * ((0.125d0 * (((d_1 * d_1) / l) * ((h * (m * m)) / (d * d)))) + (-1.0d0))
else if (h <= 2.8d-303) then
tmp = d * -((l * h) ** (-0.5d0))
else if (h <= 2.3d+37) then
tmp = d / sqrt((l * h))
else
tmp = sqrt(((d / l) * (d / h))) * (1.0d0 - (0.125d0 * ((d_1 * (d_1 * (m * m))) / ((l * (d * d)) / h))))
end if
code = tmp
end function
public static double code(double d, double h, double l, double M, double D) {
double tmp;
if (h <= -1.5e-238) {
tmp = (d * Math.sqrt((1.0 / (l * h)))) * ((0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)))) + -1.0);
} else if (h <= 2.8e-303) {
tmp = d * -Math.pow((l * h), -0.5);
} else if (h <= 2.3e+37) {
tmp = d / Math.sqrt((l * h));
} else {
tmp = Math.sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / h))));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if h <= -1.5e-238: tmp = (d * math.sqrt((1.0 / (l * h)))) * ((0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)))) + -1.0) elif h <= 2.8e-303: tmp = d * -math.pow((l * h), -0.5) elif h <= 2.3e+37: tmp = d / math.sqrt((l * h)) else: tmp = math.sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / h)))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (h <= -1.5e-238) tmp = Float64(Float64(d * sqrt(Float64(1.0 / Float64(l * h)))) * Float64(Float64(0.125 * Float64(Float64(Float64(D * D) / l) * Float64(Float64(h * Float64(M * M)) / Float64(d * d)))) + -1.0)); elseif (h <= 2.8e-303) tmp = Float64(d * Float64(-(Float64(l * h) ^ -0.5))); elseif (h <= 2.3e+37) tmp = Float64(d / sqrt(Float64(l * h))); else tmp = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(1.0 - Float64(0.125 * Float64(Float64(D * Float64(D * Float64(M * M))) / Float64(Float64(l * Float64(d * d)) / h))))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (h <= -1.5e-238) tmp = (d * sqrt((1.0 / (l * h)))) * ((0.125 * (((D * D) / l) * ((h * (M * M)) / (d * d)))) + -1.0); elseif (h <= 2.8e-303) tmp = d * -((l * h) ^ -0.5); elseif (h <= 2.3e+37) tmp = d / sqrt((l * h)); else tmp = sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / h)))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[h, -1.5e-238], N[(N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(0.125 * N[(N[(N[(D * D), $MachinePrecision] / l), $MachinePrecision] * N[(N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision] / N[(d * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[h, 2.8e-303], N[(d * (-N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision])), $MachinePrecision], If[LessEqual[h, 2.3e+37], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.125 * N[(N[(D * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;h \leq -1.5 \cdot 10^{-238}:\\
\;\;\;\;\left(d \cdot \sqrt{\frac{1}{\ell \cdot h}}\right) \cdot \left(0.125 \cdot \left(\frac{D \cdot D}{\ell} \cdot \frac{h \cdot \left(M \cdot M\right)}{d \cdot d}\right) + -1\right)\\
\mathbf{elif}\;h \leq 2.8 \cdot 10^{-303}:\\
\;\;\;\;d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)\\
\mathbf{elif}\;h \leq 2.3 \cdot 10^{+37}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D \cdot \left(D \cdot \left(M \cdot M\right)\right)}{\frac{\ell \cdot \left(d \cdot d\right)}{h}}\right)\\
\end{array}
\end{array}
if h < -1.5e-238Initial program 62.0%
metadata-eval62.0%
unpow1/262.0%
metadata-eval62.0%
unpow1/262.0%
*-commutative62.0%
associate-*l*62.0%
times-frac62.7%
metadata-eval62.7%
Simplified62.7%
associate-*r*62.7%
frac-times62.0%
*-commutative62.0%
metadata-eval62.0%
associate-*r/64.9%
metadata-eval64.9%
*-commutative64.9%
frac-times65.5%
div-inv65.5%
metadata-eval65.5%
Applied egg-rr65.5%
pow165.5%
sqrt-unprod50.2%
associate-*l*50.2%
associate-*l*50.2%
Applied egg-rr50.2%
unpow150.2%
associate-/l*46.8%
*-commutative46.8%
Simplified46.8%
Taylor expanded in d around -inf 60.5%
associate-*r*60.5%
mul-1-neg60.5%
Simplified60.5%
Taylor expanded in M around 0 50.0%
times-frac49.1%
unpow249.1%
unpow249.1%
unpow249.1%
Simplified49.1%
if -1.5e-238 < h < 2.8e-303Initial program 47.5%
metadata-eval47.5%
unpow1/247.5%
metadata-eval47.5%
unpow1/247.5%
*-commutative47.5%
associate-*l*47.5%
times-frac47.5%
metadata-eval47.5%
Simplified47.5%
associate-*r*47.5%
frac-times47.5%
*-commutative47.5%
metadata-eval47.5%
associate-*r/48.2%
metadata-eval48.2%
*-commutative48.2%
frac-times48.2%
div-inv48.2%
metadata-eval48.2%
Applied egg-rr48.2%
pow148.2%
sqrt-unprod42.4%
associate-*l*42.4%
associate-*l*42.4%
Applied egg-rr42.4%
unpow142.4%
associate-/l*41.6%
*-commutative41.6%
Simplified41.6%
Taylor expanded in d around -inf 63.2%
associate-*r*63.2%
mul-1-neg63.2%
Simplified63.2%
Taylor expanded in d around inf 75.2%
mul-1-neg75.2%
*-commutative75.2%
distribute-rgt-neg-in75.2%
unpow-175.2%
metadata-eval75.2%
pow-sqr75.1%
rem-sqrt-square80.9%
unpow180.9%
sqr-pow80.9%
fabs-sqr80.9%
sqr-pow80.9%
unpow180.9%
*-commutative80.9%
Simplified80.9%
if 2.8e-303 < h < 2.30000000000000002e37Initial program 73.8%
metadata-eval73.8%
unpow1/273.8%
metadata-eval73.8%
unpow1/273.8%
*-commutative73.8%
associate-*l*73.8%
times-frac74.0%
metadata-eval74.0%
Simplified74.0%
Taylor expanded in d around inf 65.9%
*-un-lft-identity65.9%
*-commutative65.9%
Applied egg-rr65.9%
*-lft-identity65.9%
*-commutative65.9%
associate-/r*65.9%
Simplified65.9%
pow165.9%
*-commutative65.9%
associate-/r*65.9%
sqrt-div67.0%
metadata-eval67.0%
Applied egg-rr67.0%
unpow167.0%
associate-*r/67.0%
*-rgt-identity67.0%
*-commutative67.0%
Simplified67.0%
if 2.30000000000000002e37 < h Initial program 56.6%
metadata-eval56.6%
unpow1/256.6%
metadata-eval56.6%
unpow1/256.6%
*-commutative56.6%
associate-*l*56.6%
times-frac56.6%
metadata-eval56.6%
Simplified56.6%
associate-*r*56.6%
frac-times56.6%
*-commutative56.6%
metadata-eval56.6%
associate-*r/60.2%
metadata-eval60.2%
*-commutative60.2%
frac-times60.2%
div-inv60.2%
metadata-eval60.2%
Applied egg-rr60.2%
pow160.2%
sqrt-unprod56.4%
associate-*l*56.4%
associate-*l*56.4%
Applied egg-rr56.4%
unpow156.4%
associate-/l*53.1%
*-commutative53.1%
Simplified53.1%
Taylor expanded in M around 0 38.3%
associate-*r/38.3%
*-commutative38.3%
associate-*r/38.3%
*-commutative38.3%
associate-*r*39.0%
associate-/l*38.2%
unpow238.2%
associate-*l*43.9%
unpow243.9%
unpow243.9%
Simplified43.9%
Final simplification55.4%
(FPCore (d h l M D)
:precision binary64
(if (<= l -1.55e-33)
(* d (- (sqrt (/ 1.0 (* l h)))))
(if (<= l 6.2e-233)
(*
(sqrt (* (/ d l) (/ d h)))
(- 1.0 (* 0.125 (* (* (* M M) (/ (* D D) d)) (/ h (* l d))))))
(/ d (sqrt (* l h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -1.55e-33) {
tmp = d * -sqrt((1.0 / (l * h)));
} else if (l <= 6.2e-233) {
tmp = sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * (((M * M) * ((D * D) / d)) * (h / (l * d)))));
} else {
tmp = d / sqrt((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 <= (-1.55d-33)) then
tmp = d * -sqrt((1.0d0 / (l * h)))
else if (l <= 6.2d-233) then
tmp = sqrt(((d / l) * (d / h))) * (1.0d0 - (0.125d0 * (((m * m) * ((d_1 * d_1) / d)) * (h / (l * d)))))
else
tmp = d / sqrt((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 <= -1.55e-33) {
tmp = d * -Math.sqrt((1.0 / (l * h)));
} else if (l <= 6.2e-233) {
tmp = Math.sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * (((M * M) * ((D * D) / d)) * (h / (l * d)))));
} else {
tmp = d / Math.sqrt((l * h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -1.55e-33: tmp = d * -math.sqrt((1.0 / (l * h))) elif l <= 6.2e-233: tmp = math.sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * (((M * M) * ((D * D) / d)) * (h / (l * d))))) else: tmp = d / math.sqrt((l * h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -1.55e-33) tmp = Float64(d * Float64(-sqrt(Float64(1.0 / Float64(l * h))))); elseif (l <= 6.2e-233) tmp = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(1.0 - Float64(0.125 * Float64(Float64(Float64(M * M) * Float64(Float64(D * D) / d)) * Float64(h / Float64(l * d)))))); else tmp = Float64(d / sqrt(Float64(l * h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -1.55e-33) tmp = d * -sqrt((1.0 / (l * h))); elseif (l <= 6.2e-233) tmp = sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * (((M * M) * ((D * D) / d)) * (h / (l * d))))); else tmp = d / sqrt((l * h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -1.55e-33], N[(d * (-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[l, 6.2e-233], N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.125 * N[(N[(N[(M * M), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] * N[(h / N[(l * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.55 \cdot 10^{-33}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\
\mathbf{elif}\;\ell \leq 6.2 \cdot 10^{-233}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \left(\left(\left(M \cdot M\right) \cdot \frac{D \cdot D}{d}\right) \cdot \frac{h}{\ell \cdot d}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
\end{array}
\end{array}
if l < -1.54999999999999998e-33Initial program 54.2%
metadata-eval54.2%
unpow1/254.2%
metadata-eval54.2%
unpow1/254.2%
*-commutative54.2%
associate-*l*54.2%
times-frac54.3%
metadata-eval54.3%
Simplified54.3%
associate-*r*54.3%
frac-times54.2%
*-commutative54.2%
metadata-eval54.2%
associate-*r/52.7%
metadata-eval52.7%
*-commutative52.7%
frac-times52.8%
div-inv52.8%
metadata-eval52.8%
Applied egg-rr52.8%
pow152.8%
sqrt-unprod33.2%
associate-*l*33.2%
associate-*l*33.2%
Applied egg-rr33.2%
unpow133.2%
associate-/l*33.8%
*-commutative33.8%
Simplified33.8%
Taylor expanded in d around -inf 56.8%
associate-*r*56.8%
mul-1-neg56.8%
Simplified56.8%
Taylor expanded in d around inf 35.4%
associate-*r*35.4%
neg-mul-135.4%
associate-/r*35.3%
associate-/l/35.4%
Simplified35.4%
if -1.54999999999999998e-33 < l < 6.2000000000000003e-233Initial program 69.8%
metadata-eval69.8%
unpow1/269.8%
metadata-eval69.8%
unpow1/269.8%
*-commutative69.8%
associate-*l*69.8%
times-frac70.6%
metadata-eval70.6%
Simplified70.6%
associate-*r*70.6%
frac-times69.8%
*-commutative69.8%
metadata-eval69.8%
associate-*r/75.2%
metadata-eval75.2%
*-commutative75.2%
frac-times76.1%
div-inv76.1%
metadata-eval76.1%
Applied egg-rr76.1%
pow176.1%
sqrt-unprod69.1%
associate-*l*69.1%
associate-*l*69.1%
Applied egg-rr69.1%
unpow169.1%
associate-/l*63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in M around 0 52.6%
associate-*r/52.6%
*-commutative52.6%
associate-*r/52.6%
*-commutative52.6%
associate-*r*52.8%
*-commutative52.8%
unpow252.8%
associate-*l*56.6%
times-frac54.1%
associate-/l*51.5%
associate-/r/54.1%
unpow254.1%
unpow254.1%
Simplified54.1%
if 6.2000000000000003e-233 < l Initial program 64.6%
metadata-eval64.6%
unpow1/264.6%
metadata-eval64.6%
unpow1/264.6%
*-commutative64.6%
associate-*l*64.6%
times-frac64.7%
metadata-eval64.7%
Simplified64.7%
Taylor expanded in d around inf 54.2%
*-un-lft-identity54.2%
*-commutative54.2%
Applied egg-rr54.2%
*-lft-identity54.2%
*-commutative54.2%
associate-/r*54.2%
Simplified54.2%
pow154.2%
*-commutative54.2%
associate-/r*54.2%
sqrt-div54.9%
metadata-eval54.9%
Applied egg-rr54.9%
unpow154.9%
associate-*r/54.9%
*-rgt-identity54.9%
*-commutative54.9%
Simplified54.9%
Final simplification49.8%
(FPCore (d h l M D)
:precision binary64
(if (<= l -5.4e-33)
(* d (- (sqrt (/ 1.0 (* l h)))))
(if (<= l 1.6e-150)
(*
(sqrt (* (/ d l) (/ d h)))
(- 1.0 (* 0.125 (/ (* D (* D (* M M))) (/ (* l (* d d)) h)))))
(/ d (sqrt (* l h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (l <= -5.4e-33) {
tmp = d * -sqrt((1.0 / (l * h)));
} else if (l <= 1.6e-150) {
tmp = sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / h))));
} else {
tmp = d / sqrt((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 <= (-5.4d-33)) then
tmp = d * -sqrt((1.0d0 / (l * h)))
else if (l <= 1.6d-150) then
tmp = sqrt(((d / l) * (d / h))) * (1.0d0 - (0.125d0 * ((d_1 * (d_1 * (m * m))) / ((l * (d * d)) / h))))
else
tmp = d / sqrt((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 <= -5.4e-33) {
tmp = d * -Math.sqrt((1.0 / (l * h)));
} else if (l <= 1.6e-150) {
tmp = Math.sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / h))));
} else {
tmp = d / Math.sqrt((l * h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if l <= -5.4e-33: tmp = d * -math.sqrt((1.0 / (l * h))) elif l <= 1.6e-150: tmp = math.sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / h)))) else: tmp = d / math.sqrt((l * h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (l <= -5.4e-33) tmp = Float64(d * Float64(-sqrt(Float64(1.0 / Float64(l * h))))); elseif (l <= 1.6e-150) tmp = Float64(sqrt(Float64(Float64(d / l) * Float64(d / h))) * Float64(1.0 - Float64(0.125 * Float64(Float64(D * Float64(D * Float64(M * M))) / Float64(Float64(l * Float64(d * d)) / h))))); else tmp = Float64(d / sqrt(Float64(l * h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (l <= -5.4e-33) tmp = d * -sqrt((1.0 / (l * h))); elseif (l <= 1.6e-150) tmp = sqrt(((d / l) * (d / h))) * (1.0 - (0.125 * ((D * (D * (M * M))) / ((l * (d * d)) / h)))); else tmp = d / sqrt((l * h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[l, -5.4e-33], N[(d * (-N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision], If[LessEqual[l, 1.6e-150], N[(N[Sqrt[N[(N[(d / l), $MachinePrecision] * N[(d / h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(0.125 * N[(N[(D * N[(D * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(l * N[(d * d), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -5.4 \cdot 10^{-33}:\\
\;\;\;\;d \cdot \left(-\sqrt{\frac{1}{\ell \cdot h}}\right)\\
\mathbf{elif}\;\ell \leq 1.6 \cdot 10^{-150}:\\
\;\;\;\;\sqrt{\frac{d}{\ell} \cdot \frac{d}{h}} \cdot \left(1 - 0.125 \cdot \frac{D \cdot \left(D \cdot \left(M \cdot M\right)\right)}{\frac{\ell \cdot \left(d \cdot d\right)}{h}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
\end{array}
\end{array}
if l < -5.4000000000000002e-33Initial program 54.2%
metadata-eval54.2%
unpow1/254.2%
metadata-eval54.2%
unpow1/254.2%
*-commutative54.2%
associate-*l*54.2%
times-frac54.3%
metadata-eval54.3%
Simplified54.3%
associate-*r*54.3%
frac-times54.2%
*-commutative54.2%
metadata-eval54.2%
associate-*r/52.7%
metadata-eval52.7%
*-commutative52.7%
frac-times52.8%
div-inv52.8%
metadata-eval52.8%
Applied egg-rr52.8%
pow152.8%
sqrt-unprod33.2%
associate-*l*33.2%
associate-*l*33.2%
Applied egg-rr33.2%
unpow133.2%
associate-/l*33.8%
*-commutative33.8%
Simplified33.8%
Taylor expanded in d around -inf 56.8%
associate-*r*56.8%
mul-1-neg56.8%
Simplified56.8%
Taylor expanded in d around inf 35.4%
associate-*r*35.4%
neg-mul-135.4%
associate-/r*35.3%
associate-/l/35.4%
Simplified35.4%
if -5.4000000000000002e-33 < l < 1.5999999999999999e-150Initial program 69.8%
metadata-eval69.8%
unpow1/269.8%
metadata-eval69.8%
unpow1/269.8%
*-commutative69.8%
associate-*l*69.8%
times-frac70.5%
metadata-eval70.5%
Simplified70.5%
associate-*r*70.5%
frac-times69.8%
*-commutative69.8%
metadata-eval69.8%
associate-*r/76.9%
metadata-eval76.9%
*-commutative76.9%
frac-times77.6%
div-inv77.6%
metadata-eval77.6%
Applied egg-rr77.6%
pow177.6%
sqrt-unprod69.2%
associate-*l*69.2%
associate-*l*69.2%
Applied egg-rr69.2%
unpow169.2%
associate-/l*62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in M around 0 51.9%
associate-*r/51.9%
*-commutative51.9%
associate-*r/51.9%
*-commutative51.9%
associate-*r*52.1%
associate-/l*50.0%
unpow250.0%
associate-*l*54.2%
unpow254.2%
unpow254.2%
Simplified54.2%
if 1.5999999999999999e-150 < l Initial program 63.4%
metadata-eval63.4%
unpow1/263.4%
metadata-eval63.4%
unpow1/263.4%
*-commutative63.4%
associate-*l*63.4%
times-frac63.6%
metadata-eval63.6%
Simplified63.6%
Taylor expanded in d around inf 56.3%
*-un-lft-identity56.3%
*-commutative56.3%
Applied egg-rr56.3%
*-lft-identity56.3%
*-commutative56.3%
associate-/r*56.3%
Simplified56.3%
pow156.3%
*-commutative56.3%
associate-/r*56.3%
sqrt-div56.4%
metadata-eval56.4%
Applied egg-rr56.4%
unpow156.4%
associate-*r/56.5%
*-rgt-identity56.5%
*-commutative56.5%
Simplified56.5%
Final simplification50.3%
(FPCore (d h l M D)
:precision binary64
(if (<= d -1.32e-33)
(* d (- (pow (* l h) -0.5)))
(if (<= d -2.7e-300)
(* d (pow (* l (* l (* h h))) -0.25))
(/ d (sqrt (* l h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -1.32e-33) {
tmp = d * -pow((l * h), -0.5);
} else if (d <= -2.7e-300) {
tmp = d * pow((l * (l * (h * h))), -0.25);
} else {
tmp = d / sqrt((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 <= (-1.32d-33)) then
tmp = d * -((l * h) ** (-0.5d0))
else if (d <= (-2.7d-300)) then
tmp = d * ((l * (l * (h * h))) ** (-0.25d0))
else
tmp = d / sqrt((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 <= -1.32e-33) {
tmp = d * -Math.pow((l * h), -0.5);
} else if (d <= -2.7e-300) {
tmp = d * Math.pow((l * (l * (h * h))), -0.25);
} else {
tmp = d / Math.sqrt((l * h));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -1.32e-33: tmp = d * -math.pow((l * h), -0.5) elif d <= -2.7e-300: tmp = d * math.pow((l * (l * (h * h))), -0.25) else: tmp = d / math.sqrt((l * h)) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -1.32e-33) tmp = Float64(d * Float64(-(Float64(l * h) ^ -0.5))); elseif (d <= -2.7e-300) tmp = Float64(d * (Float64(l * Float64(l * Float64(h * h))) ^ -0.25)); else tmp = Float64(d / sqrt(Float64(l * h))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -1.32e-33) tmp = d * -((l * h) ^ -0.5); elseif (d <= -2.7e-300) tmp = d * ((l * (l * (h * h))) ^ -0.25); else tmp = d / sqrt((l * h)); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -1.32e-33], N[(d * (-N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision])), $MachinePrecision], If[LessEqual[d, -2.7e-300], N[(d * N[Power[N[(l * N[(l * N[(h * h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -0.25], $MachinePrecision]), $MachinePrecision], N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -1.32 \cdot 10^{-33}:\\
\;\;\;\;d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)\\
\mathbf{elif}\;d \leq -2.7 \cdot 10^{-300}:\\
\;\;\;\;d \cdot {\left(\ell \cdot \left(\ell \cdot \left(h \cdot h\right)\right)\right)}^{-0.25}\\
\mathbf{else}:\\
\;\;\;\;\frac{d}{\sqrt{\ell \cdot h}}\\
\end{array}
\end{array}
if d < -1.31999999999999993e-33Initial program 69.9%
metadata-eval69.9%
unpow1/269.9%
metadata-eval69.9%
unpow1/269.9%
*-commutative69.9%
associate-*l*69.9%
times-frac70.0%
metadata-eval70.0%
Simplified70.0%
associate-*r*70.0%
frac-times69.9%
*-commutative69.9%
metadata-eval69.9%
associate-*r/74.5%
metadata-eval74.5%
*-commutative74.5%
frac-times74.6%
div-inv74.6%
metadata-eval74.6%
Applied egg-rr74.6%
pow174.6%
sqrt-unprod58.0%
associate-*l*58.0%
associate-*l*58.0%
Applied egg-rr58.0%
unpow158.0%
associate-/l*52.5%
*-commutative52.5%
Simplified52.5%
Taylor expanded in d around -inf 65.5%
associate-*r*65.5%
mul-1-neg65.5%
Simplified65.5%
Taylor expanded in d around inf 54.8%
mul-1-neg54.8%
*-commutative54.8%
distribute-rgt-neg-in54.8%
unpow-154.8%
metadata-eval54.8%
pow-sqr54.8%
rem-sqrt-square56.2%
unpow156.2%
sqr-pow56.1%
fabs-sqr56.1%
sqr-pow56.2%
unpow156.2%
*-commutative56.2%
Simplified56.2%
if -1.31999999999999993e-33 < d < -2.69999999999999995e-300Initial program 48.4%
metadata-eval48.4%
unpow1/248.4%
metadata-eval48.4%
unpow1/248.4%
*-commutative48.4%
associate-*l*48.4%
times-frac49.6%
metadata-eval49.6%
Simplified49.6%
Taylor expanded in d around inf 13.5%
*-un-lft-identity13.5%
*-commutative13.5%
Applied egg-rr13.5%
*-lft-identity13.5%
unpow-113.5%
sqr-pow13.5%
rem-sqrt-square11.8%
sqr-pow11.8%
fabs-sqr11.8%
sqr-pow11.8%
metadata-eval11.8%
Simplified11.8%
sqr-pow11.8%
*-commutative11.8%
metadata-eval11.8%
*-commutative11.8%
metadata-eval11.8%
Applied egg-rr11.8%
pow-prod-down22.7%
Applied egg-rr22.7%
associate-*l*22.6%
*-commutative22.6%
associate-*r*27.8%
Simplified27.8%
if -2.69999999999999995e-300 < d Initial program 66.6%
metadata-eval66.6%
unpow1/266.6%
metadata-eval66.6%
unpow1/266.6%
*-commutative66.6%
associate-*l*66.6%
times-frac66.7%
metadata-eval66.7%
Simplified66.7%
Taylor expanded in d around inf 51.0%
*-un-lft-identity51.0%
*-commutative51.0%
Applied egg-rr51.0%
*-lft-identity51.0%
*-commutative51.0%
associate-/r*51.0%
Simplified51.0%
pow151.0%
*-commutative51.0%
associate-/r*51.0%
sqrt-div51.6%
metadata-eval51.6%
Applied egg-rr51.6%
unpow151.6%
associate-*r/51.7%
*-rgt-identity51.7%
*-commutative51.7%
Simplified51.7%
Final simplification47.7%
(FPCore (d h l M D) :precision binary64 (if (<= d -7.4e-37) (* d (- (pow (* l h) -0.5))) (* d (sqrt (/ 1.0 (* l h))))))
double code(double d, double h, double l, double M, double D) {
double tmp;
if (d <= -7.4e-37) {
tmp = d * -pow((l * h), -0.5);
} else {
tmp = d * sqrt((1.0 / (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 <= (-7.4d-37)) then
tmp = d * -((l * h) ** (-0.5d0))
else
tmp = d * sqrt((1.0d0 / (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 <= -7.4e-37) {
tmp = d * -Math.pow((l * h), -0.5);
} else {
tmp = d * Math.sqrt((1.0 / (l * h)));
}
return tmp;
}
def code(d, h, l, M, D): tmp = 0 if d <= -7.4e-37: tmp = d * -math.pow((l * h), -0.5) else: tmp = d * math.sqrt((1.0 / (l * h))) return tmp
function code(d, h, l, M, D) tmp = 0.0 if (d <= -7.4e-37) tmp = Float64(d * Float64(-(Float64(l * h) ^ -0.5))); else tmp = Float64(d * sqrt(Float64(1.0 / Float64(l * h)))); end return tmp end
function tmp_2 = code(d, h, l, M, D) tmp = 0.0; if (d <= -7.4e-37) tmp = d * -((l * h) ^ -0.5); else tmp = d * sqrt((1.0 / (l * h))); end tmp_2 = tmp; end
code[d_, h_, l_, M_, D_] := If[LessEqual[d, -7.4e-37], N[(d * (-N[Power[N[(l * h), $MachinePrecision], -0.5], $MachinePrecision])), $MachinePrecision], N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;d \leq -7.4 \cdot 10^{-37}:\\
\;\;\;\;d \cdot \left(-{\left(\ell \cdot h\right)}^{-0.5}\right)\\
\mathbf{else}:\\
\;\;\;\;d \cdot \sqrt{\frac{1}{\ell \cdot h}}\\
\end{array}
\end{array}
if d < -7.4e-37Initial program 69.9%
metadata-eval69.9%
unpow1/269.9%
metadata-eval69.9%
unpow1/269.9%
*-commutative69.9%
associate-*l*69.9%
times-frac70.0%
metadata-eval70.0%
Simplified70.0%
associate-*r*70.0%
frac-times69.9%
*-commutative69.9%
metadata-eval69.9%
associate-*r/74.5%
metadata-eval74.5%
*-commutative74.5%
frac-times74.6%
div-inv74.6%
metadata-eval74.6%
Applied egg-rr74.6%
pow174.6%
sqrt-unprod58.0%
associate-*l*58.0%
associate-*l*58.0%
Applied egg-rr58.0%
unpow158.0%
associate-/l*52.5%
*-commutative52.5%
Simplified52.5%
Taylor expanded in d around -inf 65.5%
associate-*r*65.5%
mul-1-neg65.5%
Simplified65.5%
Taylor expanded in d around inf 54.8%
mul-1-neg54.8%
*-commutative54.8%
distribute-rgt-neg-in54.8%
unpow-154.8%
metadata-eval54.8%
pow-sqr54.8%
rem-sqrt-square56.2%
unpow156.2%
sqr-pow56.1%
fabs-sqr56.1%
sqr-pow56.2%
unpow156.2%
*-commutative56.2%
Simplified56.2%
if -7.4e-37 < d Initial program 61.3%
metadata-eval61.3%
unpow1/261.3%
metadata-eval61.3%
unpow1/261.3%
*-commutative61.3%
associate-*l*61.3%
times-frac61.7%
metadata-eval61.7%
Simplified61.7%
Taylor expanded in d around inf 40.1%
Final simplification44.3%
(FPCore (d h l M D) :precision binary64 (* d (sqrt (/ 1.0 (* l h)))))
double code(double d, double h, double l, double M, double D) {
return d * sqrt((1.0 / (l * h)));
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = d * sqrt((1.0d0 / (l * h)))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.sqrt((1.0 / (l * h)));
}
def code(d, h, l, M, D): return d * math.sqrt((1.0 / (l * h)))
function code(d, h, l, M, D) return Float64(d * sqrt(Float64(1.0 / Float64(l * h)))) end
function tmp = code(d, h, l, M, D) tmp = d * sqrt((1.0 / (l * h))); end
code[d_, h_, l_, M_, D_] := N[(d * N[Sqrt[N[(1.0 / N[(l * h), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot \sqrt{\frac{1}{\ell \cdot h}}
\end{array}
Initial program 63.6%
metadata-eval63.6%
unpow1/263.6%
metadata-eval63.6%
unpow1/263.6%
*-commutative63.6%
associate-*l*63.6%
times-frac63.9%
metadata-eval63.9%
Simplified63.9%
Taylor expanded in d around inf 30.6%
Final simplification30.6%
(FPCore (d h l M D) :precision binary64 (* d (sqrt (/ (/ 1.0 l) h))))
double code(double d, double h, double l, double M, double D) {
return d * sqrt(((1.0 / l) / h));
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = d * sqrt(((1.0d0 / l) / h))
end function
public static double code(double d, double h, double l, double M, double D) {
return d * Math.sqrt(((1.0 / l) / h));
}
def code(d, h, l, M, D): return d * math.sqrt(((1.0 / l) / h))
function code(d, h, l, M, D) return Float64(d * sqrt(Float64(Float64(1.0 / l) / h))) end
function tmp = code(d, h, l, M, D) tmp = d * sqrt(((1.0 / l) / h)); end
code[d_, h_, l_, M_, D_] := N[(d * N[Sqrt[N[(N[(1.0 / l), $MachinePrecision] / h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
d \cdot \sqrt{\frac{\frac{1}{\ell}}{h}}
\end{array}
Initial program 63.6%
metadata-eval63.6%
unpow1/263.6%
metadata-eval63.6%
unpow1/263.6%
*-commutative63.6%
associate-*l*63.6%
times-frac63.9%
metadata-eval63.9%
Simplified63.9%
Taylor expanded in d around inf 30.6%
*-un-lft-identity30.6%
*-commutative30.6%
Applied egg-rr30.6%
*-lft-identity30.6%
*-commutative30.6%
associate-/r*30.6%
Simplified30.6%
Final simplification30.6%
(FPCore (d h l M D) :precision binary64 (/ d (sqrt (* l h))))
double code(double d, double h, double l, double M, double D) {
return d / sqrt((l * h));
}
real(8) function code(d, h, l, m, d_1)
real(8), intent (in) :: d
real(8), intent (in) :: h
real(8), intent (in) :: l
real(8), intent (in) :: m
real(8), intent (in) :: d_1
code = d / sqrt((l * h))
end function
public static double code(double d, double h, double l, double M, double D) {
return d / Math.sqrt((l * h));
}
def code(d, h, l, M, D): return d / math.sqrt((l * h))
function code(d, h, l, M, D) return Float64(d / sqrt(Float64(l * h))) end
function tmp = code(d, h, l, M, D) tmp = d / sqrt((l * h)); end
code[d_, h_, l_, M_, D_] := N[(d / N[Sqrt[N[(l * h), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{d}{\sqrt{\ell \cdot h}}
\end{array}
Initial program 63.6%
metadata-eval63.6%
unpow1/263.6%
metadata-eval63.6%
unpow1/263.6%
*-commutative63.6%
associate-*l*63.6%
times-frac63.9%
metadata-eval63.9%
Simplified63.9%
Taylor expanded in d around inf 30.6%
*-un-lft-identity30.6%
*-commutative30.6%
Applied egg-rr30.6%
*-lft-identity30.6%
*-commutative30.6%
associate-/r*30.6%
Simplified30.6%
pow130.6%
*-commutative30.6%
associate-/r*30.6%
sqrt-div30.5%
metadata-eval30.5%
Applied egg-rr30.5%
unpow130.5%
associate-*r/30.5%
*-rgt-identity30.5%
*-commutative30.5%
Simplified30.5%
Final simplification30.5%
herbie shell --seed 2023228
(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)))))