
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1))))
(if (<= t_3 0.0)
(* (sqrt (* U t)) (sqrt (* 2.0 n)))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l (/ l Om)))) t_1)))
(sqrt (* 2.0 (/ (* (* U U*) (pow (* n l) 2.0)) (pow Om 2.0))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((U * t)) * sqrt((2.0 * n));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = sqrt((2.0 * (((U * U_42_) * pow((n * l), 2.0)) / pow(Om, 2.0))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((U * t)) * Math.sqrt((2.0 * n));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = Math.sqrt((2.0 * (((U * U_42_) * Math.pow((n * l), 2.0)) / Math.pow(Om, 2.0))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_2 = (2.0 * n) * U t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((U * t)) * math.sqrt((2.0 * n)) elif t_3 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))) else: tmp = math.sqrt((2.0 * (((U * U_42_) * math.pow((n * l), 2.0)) / math.pow(Om, 2.0)))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1)) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(U * t)) * sqrt(Float64(2.0 * n))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_1))); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(U * U_42_) * (Float64(n * l) ^ 2.0)) / (Om ^ 2.0)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_2 = (2.0 * n) * U; t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((U * t)) * sqrt((2.0 * n)); elseif (t_3 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))); else tmp = sqrt((2.0 * (((U * U_42_) * ((n * l) ^ 2.0)) / (Om ^ 2.0)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(U * U$42$), $MachinePrecision] * N[Power[N[(n * l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{U \cdot t} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(U \cdot U*\right) \cdot {\left(n \cdot \ell\right)}^{2}}{{Om}^{2}}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 11.9%
Simplified36.5%
Taylor expanded in t around inf 39.0%
pow1/239.0%
*-commutative39.0%
unpow-prod-down44.5%
pow1/244.5%
pow1/244.5%
Applied egg-rr44.5%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 67.7%
associate-*r/70.9%
*-commutative70.9%
Applied egg-rr70.9%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified10.8%
Taylor expanded in U around 0 3.1%
associate-/l*0.5%
unpow20.5%
unpow20.5%
times-frac11.1%
unpow211.1%
neg-mul-111.1%
distribute-lft-neg-out11.1%
*-commutative11.1%
Simplified11.1%
pow111.1%
associate-*r*13.7%
Applied egg-rr13.7%
unpow113.7%
Simplified13.7%
Taylor expanded in n around inf 25.4%
associate-*r*25.4%
unpow225.4%
unpow225.4%
swap-sqr38.3%
unpow238.3%
Simplified38.3%
Final simplification62.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1))))
(if (<= t_3 0.0)
(* (sqrt (* U t)) (sqrt (* 2.0 n)))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l (/ l Om)))) t_1)))
(* (* l (/ (* n (sqrt 2.0)) Om)) (sqrt (* U U*)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((U * t)) * sqrt((2.0 * n));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = (l * ((n * sqrt(2.0)) / Om)) * sqrt((U * U_42_));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = Math.sqrt((U * t)) * Math.sqrt((2.0 * n));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = (l * ((n * Math.sqrt(2.0)) / Om)) * Math.sqrt((U * U_42_));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U) t_2 = (2.0 * n) * U t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1) tmp = 0 if t_3 <= 0.0: tmp = math.sqrt((U * t)) * math.sqrt((2.0 * n)) elif t_3 <= math.inf: tmp = math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))) else: tmp = (l * ((n * math.sqrt(2.0)) / Om)) * math.sqrt((U * U_42_)) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1)) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(U * t)) * sqrt(Float64(2.0 * n))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_1))); else tmp = Float64(Float64(l * Float64(Float64(n * sqrt(2.0)) / Om)) * sqrt(Float64(U * U_42_))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U); t_2 = (2.0 * n) * U; t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1); tmp = 0.0; if (t_3 <= 0.0) tmp = sqrt((U * t)) * sqrt((2.0 * n)); elseif (t_3 <= Inf) tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1))); else tmp = (l * ((n * sqrt(2.0)) / Om)) * sqrt((U * U_42_)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{U \cdot t} \cdot \sqrt{2 \cdot n}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}\\
\end{array}
\end{array}
if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0Initial program 11.9%
Simplified36.5%
Taylor expanded in t around inf 39.0%
pow1/239.0%
*-commutative39.0%
unpow-prod-down44.5%
pow1/244.5%
pow1/244.5%
Applied egg-rr44.5%
if 0.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0Initial program 67.7%
associate-*r/70.9%
*-commutative70.9%
Applied egg-rr70.9%
if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) Initial program 0.0%
Simplified10.8%
Taylor expanded in U around 0 3.1%
associate-/l*0.5%
unpow20.5%
unpow20.5%
times-frac11.1%
unpow211.1%
neg-mul-111.1%
distribute-lft-neg-out11.1%
*-commutative11.1%
Simplified11.1%
Taylor expanded in n around inf 27.1%
associate-/l*29.6%
Simplified29.6%
Final simplification60.9%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= t 9.2e+181)
(sqrt
(*
(* 2.0 (* n U))
(+ t (- (* (* n (pow (/ l Om) 2.0)) (- U* U)) (* 2.0 (* l (/ l Om)))))))
(sqrt (fabs (* (* n t) (* 2.0 U))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 9.2e+181) {
tmp = sqrt(((2.0 * (n * U)) * (t + (((n * pow((l / Om), 2.0)) * (U_42_ - U)) - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt(fabs(((n * t) * (2.0 * U))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= 9.2d+181) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + (((n * ((l / om) ** 2.0d0)) * (u_42 - u)) - (2.0d0 * (l * (l / om)))))))
else
tmp = sqrt(abs(((n * t) * (2.0d0 * u))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= 9.2e+181) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)) - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt(Math.abs(((n * t) * (2.0 * U))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= 9.2e+181: tmp = math.sqrt(((2.0 * (n * U)) * (t + (((n * math.pow((l / Om), 2.0)) * (U_42_ - U)) - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt(math.fabs(((n * t) * (2.0 * U)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= 9.2e+181) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(abs(Float64(Float64(n * t) * Float64(2.0 * U)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= 9.2e+181) tmp = sqrt(((2.0 * (n * U)) * (t + (((n * ((l / Om) ^ 2.0)) * (U_42_ - U)) - (2.0 * (l * (l / Om))))))); else tmp = sqrt(abs(((n * t) * (2.0 * U)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 9.2e+181], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.2 \cdot 10^{+181}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right|}\\
\end{array}
\end{array}
if t < 9.1999999999999995e181Initial program 52.0%
Simplified54.2%
if 9.1999999999999995e181 < t Initial program 23.5%
Simplified47.9%
Taylor expanded in U around 0 35.0%
associate-/l*39.3%
unpow239.3%
unpow239.3%
times-frac47.9%
unpow247.9%
neg-mul-147.9%
distribute-lft-neg-out47.9%
*-commutative47.9%
Simplified47.9%
Taylor expanded in t around inf 51.8%
associate-*r*51.8%
associate-*r*31.5%
Simplified31.5%
add-sqr-sqrt31.5%
pow1/231.5%
metadata-eval31.5%
pow1/231.5%
metadata-eval31.5%
pow-prod-down21.6%
pow221.6%
associate-*l*29.9%
metadata-eval29.9%
Applied egg-rr29.9%
unpow1/229.9%
unpow229.9%
rem-sqrt-square53.0%
*-commutative53.0%
*-commutative53.0%
Simplified53.0%
Final simplification54.1%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U 1.15e+56) (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om))))))) (* (sqrt (* 2.0 U)) (sqrt (* n t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1.15e+56) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 1.15d+56) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
else
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1.15e+56) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 1.15e+56: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 1.15e+56) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 1.15e+56) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))); else tmp = sqrt((2.0 * U)) * sqrt((n * t)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 1.15e+56], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.15 \cdot 10^{+56}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\end{array}
\end{array}
if U < 1.15000000000000007e56Initial program 48.0%
Simplified54.3%
Taylor expanded in n around 0 46.0%
unpow246.0%
associate-*r/50.7%
*-commutative50.7%
Applied egg-rr50.7%
if 1.15000000000000007e56 < U Initial program 59.5%
Simplified43.9%
Taylor expanded in t around inf 47.2%
pow1/250.5%
associate-*r*50.5%
unpow-prod-down65.4%
pow1/265.4%
Applied egg-rr65.4%
unpow1/265.4%
Simplified65.4%
Final simplification52.5%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}
\end{array}
Initial program 49.4%
Simplified53.1%
Taylor expanded in n around 0 45.8%
unpow245.8%
associate-*r/49.9%
*-commutative49.9%
Applied egg-rr49.9%
Final simplification49.9%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t -1.35e+117) (pow (* (* n t) (* 2.0 U)) 0.5) (pow (* (* 2.0 n) (* U t)) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -1.35e+117) {
tmp = pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = pow(((2.0 * n) * (U * t)), 0.5);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= (-1.35d+117)) then
tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
else
tmp = ((2.0d0 * n) * (u * t)) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -1.35e+117) {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = Math.pow(((2.0 * n) * (U * t)), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -1.35e+117: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) else: tmp = math.pow(((2.0 * n) * (U * t)), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -1.35e+117) tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; else tmp = Float64(Float64(2.0 * n) * Float64(U * t)) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -1.35e+117) tmp = ((n * t) * (2.0 * U)) ^ 0.5; else tmp = ((2.0 * n) * (U * t)) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -1.35e+117], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+117}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}\\
\end{array}
\end{array}
if t < -1.3500000000000001e117Initial program 48.8%
Simplified37.6%
Taylor expanded in t around inf 39.7%
pow1/242.2%
associate-*r*42.2%
Applied egg-rr42.2%
if -1.3500000000000001e117 < t Initial program 49.5%
Simplified56.2%
Taylor expanded in t around inf 36.5%
add-cbrt-cube25.0%
pow1/315.2%
pow315.2%
Applied egg-rr15.2%
pow1/216.5%
unpow1/325.7%
rem-cbrt-cube37.0%
Applied egg-rr37.0%
Final simplification37.9%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t -2.1e+117) (pow (* (* n t) (* 2.0 U)) 0.5) (pow (* 2.0 (* n (* U t))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -2.1e+117) {
tmp = pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= (-2.1d+117)) then
tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
else
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -2.1e+117) {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -2.1e+117: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) else: tmp = math.pow((2.0 * (n * (U * t))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -2.1e+117) tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; else tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -2.1e+117) tmp = ((n * t) * (2.0 * U)) ^ 0.5; else tmp = (2.0 * (n * (U * t))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -2.1e+117], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+117}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if t < -2.1000000000000001e117Initial program 48.8%
Simplified37.6%
Taylor expanded in t around inf 39.7%
pow1/242.2%
associate-*r*42.2%
Applied egg-rr42.2%
if -2.1000000000000001e117 < t Initial program 49.5%
Simplified56.2%
Taylor expanded in t around inf 36.5%
pow1/237.0%
associate-*l*36.9%
Applied egg-rr36.9%
Final simplification37.8%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t -2.1e+119) (sqrt (* 2.0 (* U (* n t)))) (pow (* 2.0 (* n (* U t))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -2.1e+119) {
tmp = sqrt((2.0 * (U * (n * t))));
} else {
tmp = pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= (-2.1d+119)) then
tmp = sqrt((2.0d0 * (u * (n * t))))
else
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -2.1e+119) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} else {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -2.1e+119: tmp = math.sqrt((2.0 * (U * (n * t)))) else: tmp = math.pow((2.0 * (n * (U * t))), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -2.1e+119) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); else tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -2.1e+119) tmp = sqrt((2.0 * (U * (n * t)))); else tmp = (2.0 * (n * (U * t))) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -2.1e+119], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+119}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if t < -2.09999999999999983e119Initial program 48.8%
Simplified37.6%
Taylor expanded in t around inf 39.7%
if -2.09999999999999983e119 < t Initial program 49.5%
Simplified56.2%
Taylor expanded in t around inf 36.5%
pow1/237.0%
associate-*l*36.9%
Applied egg-rr36.9%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t -2e+121) (sqrt (* 2.0 (* U (* n t)))) (sqrt (* (* 2.0 n) (* U t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -2e+121) {
tmp = sqrt((2.0 * (U * (n * t))));
} else {
tmp = sqrt(((2.0 * n) * (U * t)));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= (-2d+121)) then
tmp = sqrt((2.0d0 * (u * (n * t))))
else
tmp = sqrt(((2.0d0 * n) * (u * t)))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -2e+121) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -2e+121: tmp = math.sqrt((2.0 * (U * (n * t)))) else: tmp = math.sqrt(((2.0 * n) * (U * t))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -2e+121) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -2e+121) tmp = sqrt((2.0 * (U * (n * t)))); else tmp = sqrt(((2.0 * n) * (U * t))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -2e+121], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+121}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\end{array}
\end{array}
if t < -2.00000000000000007e121Initial program 48.8%
Simplified37.6%
Taylor expanded in t around inf 39.7%
if -2.00000000000000007e121 < t Initial program 49.5%
Simplified56.2%
Taylor expanded in t around inf 36.5%
(FPCore (n U t l Om U*) :precision binary64 (if (<= U* 1.05e-192) (sqrt (* 2.0 (* t (* n U)))) (sqrt (* 2.0 (* U (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 1.05e-192) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u_42 <= 1.05d-192) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 1.05e-192) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 1.05e-192: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 1.05e-192) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= 1.05e-192) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, 1.05e-192], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 1.05 \cdot 10^{-192}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if U* < 1.04999999999999997e-192Initial program 51.9%
Simplified51.9%
Taylor expanded in t around inf 35.7%
associate-*r*38.4%
Simplified38.4%
if 1.04999999999999997e-192 < U* Initial program 45.6%
Simplified54.8%
Taylor expanded in t around inf 34.1%
Final simplification36.7%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (u * (n * t))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * t))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 49.4%
Simplified53.1%
Taylor expanded in t around inf 35.1%
herbie shell --seed 2024145
(FPCore (n U t l Om U*)
:name "Toniolo and Linder, Equation (13)"
:precision binary64
(sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))