
(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 13 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}
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))
(t_3
(sqrt (* (* 2.0 n) (* U (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1))))))
(if (<= t_2 0.0)
t_3
(if (<= t_2 5e+306)
(sqrt t_2)
(if (<= t_2 INFINITY)
t_3
(pow
(exp
(*
0.25
(+
(log
(*
-2.0
(/
(+ (* 2.0 (* n U)) (/ (* U (* (- U U*) (pow n 2.0))) Om))
Om)))
(* -2.0 (log (/ 1.0 l_m))))))
2.0))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double t_3 = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))));
double tmp;
if (t_2 <= 0.0) {
tmp = t_3;
} else if (t_2 <= 5e+306) {
tmp = sqrt(t_2);
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = pow(exp((0.25 * (log((-2.0 * (((2.0 * (n * U)) + ((U * ((U - U_42_) * pow(n, 2.0))) / Om)) / Om))) + (-2.0 * log((1.0 / l_m)))))), 2.0);
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double t_3 = Math.sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))));
double tmp;
if (t_2 <= 0.0) {
tmp = t_3;
} else if (t_2 <= 5e+306) {
tmp = Math.sqrt(t_2);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = Math.pow(Math.exp((0.25 * (Math.log((-2.0 * (((2.0 * (n * U)) + ((U * ((U - U_42_) * Math.pow(n, 2.0))) / Om)) / Om))) + (-2.0 * Math.log((1.0 / l_m)))))), 2.0);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) t_3 = math.sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)))) tmp = 0 if t_2 <= 0.0: tmp = t_3 elif t_2 <= 5e+306: tmp = math.sqrt(t_2) elif t_2 <= math.inf: tmp = t_3 else: tmp = math.pow(math.exp((0.25 * (math.log((-2.0 * (((2.0 * (n * U)) + ((U * ((U - U_42_) * math.pow(n, 2.0))) / Om)) / Om))) + (-2.0 * math.log((1.0 / l_m)))))), 2.0) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)) t_3 = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1)))) tmp = 0.0 if (t_2 <= 0.0) tmp = t_3; elseif (t_2 <= 5e+306) tmp = sqrt(t_2); elseif (t_2 <= Inf) tmp = t_3; else tmp = exp(Float64(0.25 * Float64(log(Float64(-2.0 * Float64(Float64(Float64(2.0 * Float64(n * U)) + Float64(Float64(U * Float64(Float64(U - U_42_) * (n ^ 2.0))) / Om)) / Om))) + Float64(-2.0 * log(Float64(1.0 / l_m)))))) ^ 2.0; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1); t_3 = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)))); tmp = 0.0; if (t_2 <= 0.0) tmp = t_3; elseif (t_2 <= 5e+306) tmp = sqrt(t_2); elseif (t_2 <= Inf) tmp = t_3; else tmp = exp((0.25 * (log((-2.0 * (((2.0 * (n * U)) + ((U * ((U - U_42_) * (n ^ 2.0))) / Om)) / Om))) + (-2.0 * log((1.0 / l_m)))))) ^ 2.0; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], t$95$3, If[LessEqual[t$95$2, 5e+306], N[Sqrt[t$95$2], $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[Power[N[Exp[N[(0.25 * N[(N[Log[N[(-2.0 * N[(N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] + N[(N[(U * N[(N[(U - U$42$), $MachinePrecision] * N[Power[n, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(-2.0 * N[Log[N[(1.0 / l$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)\\
t_3 := \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_1\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\sqrt{t\_2}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;{\left(e^{0.25 \cdot \left(\log \left(-2 \cdot \frac{2 \cdot \left(n \cdot U\right) + \frac{U \cdot \left(\left(U - U*\right) \cdot {n}^{2}\right)}{Om}}{Om}\right) + -2 \cdot \log \left(\frac{1}{l\_m}\right)\right)}\right)}^{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.0 or 4.99999999999999993e306 < (*.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 27.9%
Simplified47.6%
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*)))) < 4.99999999999999993e306Initial program 97.2%
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%
Simplified9.0%
add-sqr-sqrt8.9%
pow28.9%
Applied egg-rr0.7%
Taylor expanded in l around inf 29.6%
Taylor expanded in Om around inf 29.0%
Final simplification65.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
(if (<= t_2 0.0)
(sqrt (* (* 2.0 n) (* U (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1))))
(if (<= t_2 2e+153)
t_2
(pow
(*
(pow
(* (* n (* U -2.0)) (fma n (/ (- U U*) (pow Om 2.0)) (/ 2.0 Om)))
0.25)
(exp (* -0.5 (- (log l_m)))))
2.0)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))));
} else if (t_2 <= 2e+153) {
tmp = t_2;
} else {
tmp = pow((pow(((n * (U * -2.0)) * fma(n, ((U - U_42_) / pow(Om, 2.0)), (2.0 / Om))), 0.25) * exp((-0.5 * -log(l_m)))), 2.0);
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1)))); elseif (t_2 <= 2e+153) tmp = t_2; else tmp = Float64((Float64(Float64(n * Float64(U * -2.0)) * fma(n, Float64(Float64(U - U_42_) / (Om ^ 2.0)), Float64(2.0 / Om))) ^ 0.25) * exp(Float64(-0.5 * Float64(-log(l_m))))) ^ 2.0; end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 2e+153], t$95$2, N[Power[N[(N[Power[N[(N[(n * N[(U * -2.0), $MachinePrecision]), $MachinePrecision] * N[(n * N[(N[(U - U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision] * N[Exp[N[(-0.5 * (-N[Log[l$95$m], $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_1\right)\right)}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\left(n \cdot \left(U \cdot -2\right)\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{{Om}^{2}}, \frac{2}{Om}\right)\right)}^{0.25} \cdot e^{-0.5 \cdot \left(-\log l\_m\right)}\right)}^{2}\\
\end{array}
\end{array}
if (sqrt.f64 (*.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 20.8%
Simplified57.4%
if 0.0 < (sqrt.f64 (*.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*))))) < 2e153Initial program 97.2%
if 2e153 < (sqrt.f64 (*.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 21.0%
Simplified32.1%
add-sqr-sqrt32.1%
pow232.1%
Applied egg-rr26.0%
Taylor expanded in l around inf 21.6%
exp-prod21.2%
unpow-prod-up21.2%
Applied egg-rr22.4%
exp-prod22.4%
exp-prod22.8%
*-commutative22.8%
exp-to-pow24.0%
associate-*r*24.0%
*-commutative24.0%
associate-*r*24.0%
*-commutative24.0%
log-rec24.0%
associate-*r*24.0%
Simplified24.0%
Final simplification59.3%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))
(t_3
(sqrt (* (* 2.0 n) (* U (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1))))))
(if (<= t_2 0.0)
t_3
(if (<= t_2 5e+306)
(sqrt t_2)
(if (<= t_2 INFINITY)
t_3
(pow
(exp
(*
0.25
(+
(log
(*
-2.0
(*
U
(* n (+ (* 2.0 (/ 1.0 Om)) (/ (* n (- U U*)) (pow Om 2.0)))))))
(* 2.0 (log l_m)))))
2.0))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double t_3 = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))));
double tmp;
if (t_2 <= 0.0) {
tmp = t_3;
} else if (t_2 <= 5e+306) {
tmp = sqrt(t_2);
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = pow(exp((0.25 * (log((-2.0 * (U * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / pow(Om, 2.0))))))) + (2.0 * log(l_m))))), 2.0);
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
double t_3 = Math.sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))));
double tmp;
if (t_2 <= 0.0) {
tmp = t_3;
} else if (t_2 <= 5e+306) {
tmp = Math.sqrt(t_2);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = Math.pow(Math.exp((0.25 * (Math.log((-2.0 * (U * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / Math.pow(Om, 2.0))))))) + (2.0 * Math.log(l_m))))), 2.0);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1) t_3 = math.sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)))) tmp = 0 if t_2 <= 0.0: tmp = t_3 elif t_2 <= 5e+306: tmp = math.sqrt(t_2) elif t_2 <= math.inf: tmp = t_3 else: tmp = math.pow(math.exp((0.25 * (math.log((-2.0 * (U * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / math.pow(Om, 2.0))))))) + (2.0 * math.log(l_m))))), 2.0) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)) t_3 = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1)))) tmp = 0.0 if (t_2 <= 0.0) tmp = t_3; elseif (t_2 <= 5e+306) tmp = sqrt(t_2); elseif (t_2 <= Inf) tmp = t_3; else tmp = exp(Float64(0.25 * Float64(log(Float64(-2.0 * Float64(U * Float64(n * Float64(Float64(2.0 * Float64(1.0 / Om)) + Float64(Float64(n * Float64(U - U_42_)) / (Om ^ 2.0))))))) + Float64(2.0 * log(l_m))))) ^ 2.0; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1); t_3 = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)))); tmp = 0.0; if (t_2 <= 0.0) tmp = t_3; elseif (t_2 <= 5e+306) tmp = sqrt(t_2); elseif (t_2 <= Inf) tmp = t_3; else tmp = exp((0.25 * (log((-2.0 * (U * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / (Om ^ 2.0))))))) + (2.0 * log(l_m))))) ^ 2.0; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], t$95$3, If[LessEqual[t$95$2, 5e+306], N[Sqrt[t$95$2], $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[Power[N[Exp[N[(0.25 * N[(N[Log[N[(-2.0 * N[(U * N[(n * N[(N[(2.0 * N[(1.0 / Om), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)\\
t_3 := \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_1\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\sqrt{t\_2}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;{\left(e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)\right) + 2 \cdot \log l\_m\right)}\right)}^{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.0 or 4.99999999999999993e306 < (*.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 27.9%
Simplified47.6%
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*)))) < 4.99999999999999993e306Initial program 97.2%
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%
Simplified9.0%
add-sqr-sqrt8.9%
pow28.9%
Applied egg-rr0.7%
Taylor expanded in l around inf 29.6%
Taylor expanded in l around 0 29.6%
Final simplification65.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(t_3
(sqrt (* (* 2.0 n) (* U (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1))))))
(if (<= t_2 0.0)
t_3
(if (<= t_2 2e+153)
t_2
(if (<= t_2 INFINITY)
t_3
(pow (* -4.0 (/ (* U (* n (pow l_m 2.0))) Om)) 0.5))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double t_3 = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))));
double tmp;
if (t_2 <= 0.0) {
tmp = t_3;
} else if (t_2 <= 2e+153) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = pow((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)), 0.5);
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double t_3 = Math.sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1))));
double tmp;
if (t_2 <= 0.0) {
tmp = t_3;
} else if (t_2 <= 2e+153) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = Math.pow((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) t_3 = math.sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)))) tmp = 0 if t_2 <= 0.0: tmp = t_3 elif t_2 <= 2e+153: tmp = t_2 elif t_2 <= math.inf: tmp = t_3 else: tmp = math.pow((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om)), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) t_3 = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1)))) tmp = 0.0 if (t_2 <= 0.0) tmp = t_3; elseif (t_2 <= 2e+153) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om)) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); t_3 = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)))); tmp = 0.0; if (t_2 <= 0.0) tmp = t_3; elseif (t_2 <= 2e+153) tmp = t_2; elseif (t_2 <= Inf) tmp = t_3; else tmp = (-4.0 * ((U * (n * (l_m ^ 2.0))) / Om)) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], t$95$3, If[LessEqual[t$95$2, 2e+153], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$3, N[Power[N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
t_3 := \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + t\_1\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(n \cdot {l\_m}^{2}\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if (sqrt.f64 (*.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.0 or 2e153 < (sqrt.f64 (*.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 28.7%
Simplified48.8%
if 0.0 < (sqrt.f64 (*.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*))))) < 2e153Initial program 97.2%
if +inf.0 < (sqrt.f64 (*.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%
Simplified8.6%
Taylor expanded in n around 0 1.8%
pow1/233.1%
associate-*r*32.0%
*-commutative32.0%
cancel-sign-sub-inv32.0%
metadata-eval32.0%
Applied egg-rr32.0%
Taylor expanded in t around 0 37.7%
Final simplification67.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 5e-276)
(sqrt (* (* 2.0 n) (* U t)))
(if (<= l_m 1.65e-254)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(if (<= l_m 3.05e-193)
(* (sqrt 2.0) (pow (* n (* U t)) 0.5))
(if (<= l_m 1.55e+147)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
(pow (* -4.0 (/ (* U (* n (pow l_m 2.0))) Om)) 0.5))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5e-276) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else if (l_m <= 1.65e-254) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else if (l_m <= 3.05e-193) {
tmp = sqrt(2.0) * pow((n * (U * t)), 0.5);
} else if (l_m <= 1.55e+147) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else {
tmp = pow((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 5d-276) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else if (l_m <= 1.65d-254) then
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
else if (l_m <= 3.05d-193) then
tmp = sqrt(2.0d0) * ((n * (u * t)) ** 0.5d0)
else if (l_m <= 1.55d+147) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else
tmp = ((-4.0d0) * ((u * (n * (l_m ** 2.0d0))) / om)) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5e-276) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else if (l_m <= 1.65e-254) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (l_m <= 3.05e-193) {
tmp = Math.sqrt(2.0) * Math.pow((n * (U * t)), 0.5);
} else if (l_m <= 1.55e+147) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else {
tmp = Math.pow((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 5e-276: tmp = math.sqrt(((2.0 * n) * (U * t))) elif l_m <= 1.65e-254: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) elif l_m <= 3.05e-193: tmp = math.sqrt(2.0) * math.pow((n * (U * t)), 0.5) elif l_m <= 1.55e+147: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) else: tmp = math.pow((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om)), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 5e-276) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); elseif (l_m <= 1.65e-254) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); elseif (l_m <= 3.05e-193) tmp = Float64(sqrt(2.0) * (Float64(n * Float64(U * t)) ^ 0.5)); elseif (l_m <= 1.55e+147) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); else tmp = Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om)) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 5e-276) tmp = sqrt(((2.0 * n) * (U * t))); elseif (l_m <= 1.65e-254) tmp = sqrt((2.0 * U)) * sqrt((n * t)); elseif (l_m <= 3.05e-193) tmp = sqrt(2.0) * ((n * (U * t)) ^ 0.5); elseif (l_m <= 1.55e+147) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); else tmp = (-4.0 * ((U * (n * (l_m ^ 2.0))) / Om)) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 5e-276], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.65e-254], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 3.05e-193], N[(N[Sqrt[2.0], $MachinePrecision] * N[Power[N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.55e+147], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5 \cdot 10^{-276}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{elif}\;l\_m \leq 1.65 \cdot 10^{-254}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;l\_m \leq 3.05 \cdot 10^{-193}:\\
\;\;\;\;\sqrt{2} \cdot {\left(n \cdot \left(U \cdot t\right)\right)}^{0.5}\\
\mathbf{elif}\;l\_m \leq 1.55 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(n \cdot {l\_m}^{2}\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 4.99999999999999967e-276Initial program 51.4%
Simplified58.7%
Taylor expanded in t around inf 45.4%
if 4.99999999999999967e-276 < l < 1.65000000000000008e-254Initial program 68.0%
Simplified36.7%
Taylor expanded in t around inf 68.3%
pow1/268.3%
associate-*r*68.3%
unpow-prod-down99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
if 1.65000000000000008e-254 < l < 3.05000000000000006e-193Initial program 81.0%
Simplified78.2%
Taylor expanded in t around inf 71.7%
pow1/271.7%
associate-*l*71.7%
unpow-prod-down71.7%
pow1/271.7%
Applied egg-rr71.7%
if 3.05000000000000006e-193 < l < 1.55e147Initial program 64.2%
Simplified70.3%
Taylor expanded in n around 0 61.3%
if 1.55e147 < l Initial program 17.9%
Simplified33.7%
Taylor expanded in n around 0 22.0%
pow1/244.7%
associate-*r*41.2%
*-commutative41.2%
cancel-sign-sub-inv41.2%
metadata-eval41.2%
Applied egg-rr41.2%
Taylor expanded in t around 0 44.7%
Final simplification52.7%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= U 1.65e-100)
(sqrt
(*
(* 2.0 n)
(*
U
(+
(- t (* 2.0 (* l_m (/ l_m Om))))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U))))))
(pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ (pow l_m 2.0) Om))))) 0.5)))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 1.65e-100) {
tmp = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U))))));
} else {
tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 1.65d-100) then
tmp = sqrt(((2.0d0 * n) * (u * ((t - (2.0d0 * (l_m * (l_m / om)))) + ((n * ((l_m / om) ** 2.0d0)) * (u_42 - u))))))
else
tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * ((l_m ** 2.0d0) / om))))) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 1.65e-100) {
tmp = Math.sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U))))));
} else {
tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= 1.65e-100: tmp = math.sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)))))) else: tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= 1.65e-100) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)))))); else tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= 1.65e-100) tmp = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l_m * (l_m / Om)))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U)))))); else tmp = (2.0 * ((n * U) * (t + (-2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 1.65e-100], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.65 \cdot 10^{-100}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if U < 1.64999999999999998e-100Initial program 47.7%
Simplified58.2%
if 1.64999999999999998e-100 < U Initial program 66.8%
Simplified63.0%
Taylor expanded in n around 0 61.9%
pow1/273.1%
associate-*r*72.7%
*-commutative72.7%
cancel-sign-sub-inv72.7%
metadata-eval72.7%
Applied egg-rr72.7%
Final simplification62.4%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (or (<= n -8600.0) (not (<= n 5.4e-163))) (pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ (pow l_m 2.0) Om))))) 0.5) (sqrt (+ (* -4.0 (/ (* U (* n (pow l_m 2.0))) Om)) (* 2.0 (* U (* n t)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((n <= -8600.0) || !(n <= 5.4e-163)) {
tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
} else {
tmp = sqrt(((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)) + (2.0 * (U * (n * t)))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((n <= (-8600.0d0)) .or. (.not. (n <= 5.4d-163))) then
tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * ((l_m ** 2.0d0) / om))))) ** 0.5d0
else
tmp = sqrt((((-4.0d0) * ((u * (n * (l_m ** 2.0d0))) / om)) + (2.0d0 * (u * (n * t)))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((n <= -8600.0) || !(n <= 5.4e-163)) {
tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
} else {
tmp = Math.sqrt(((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)) + (2.0 * (U * (n * t)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if (n <= -8600.0) or not (n <= 5.4e-163): tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5) else: tmp = math.sqrt(((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om)) + (2.0 * (U * (n * t))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if ((n <= -8600.0) || !(n <= 5.4e-163)) tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5; else tmp = sqrt(Float64(Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om)) + Float64(2.0 * Float64(U * Float64(n * t))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if ((n <= -8600.0) || ~((n <= 5.4e-163))) tmp = (2.0 * ((n * U) * (t + (-2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5; else tmp = sqrt(((-4.0 * ((U * (n * (l_m ^ 2.0))) / Om)) + (2.0 * (U * (n * t))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[Or[LessEqual[n, -8600.0], N[Not[LessEqual[n, 5.4e-163]], $MachinePrecision]], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq -8600 \lor \neg \left(n \leq 5.4 \cdot 10^{-163}\right):\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l\_m}^{2}\right)}{Om} + 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if n < -8600 or 5.40000000000000029e-163 < n Initial program 56.9%
Simplified61.3%
Taylor expanded in n around 0 51.3%
pow1/260.2%
associate-*r*60.7%
*-commutative60.7%
cancel-sign-sub-inv60.7%
metadata-eval60.7%
Applied egg-rr60.7%
if -8600 < n < 5.40000000000000029e-163Initial program 47.9%
Simplified57.2%
Taylor expanded in Om around inf 50.7%
Final simplification56.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 5e-276)
(sqrt (* (* 2.0 n) (* U t)))
(if (<= l_m 1.65e-254)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(if (<= l_m 3.6e+62)
(* (sqrt 2.0) (pow (* n (* U t)) 0.5))
(pow (* -4.0 (/ (* U (* n (pow l_m 2.0))) Om)) 0.5)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5e-276) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else if (l_m <= 1.65e-254) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else if (l_m <= 3.6e+62) {
tmp = sqrt(2.0) * pow((n * (U * t)), 0.5);
} else {
tmp = pow((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 5d-276) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else if (l_m <= 1.65d-254) then
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
else if (l_m <= 3.6d+62) then
tmp = sqrt(2.0d0) * ((n * (u * t)) ** 0.5d0)
else
tmp = ((-4.0d0) * ((u * (n * (l_m ** 2.0d0))) / om)) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 5e-276) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else if (l_m <= 1.65e-254) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else if (l_m <= 3.6e+62) {
tmp = Math.sqrt(2.0) * Math.pow((n * (U * t)), 0.5);
} else {
tmp = Math.pow((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 5e-276: tmp = math.sqrt(((2.0 * n) * (U * t))) elif l_m <= 1.65e-254: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) elif l_m <= 3.6e+62: tmp = math.sqrt(2.0) * math.pow((n * (U * t)), 0.5) else: tmp = math.pow((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om)), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 5e-276) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); elseif (l_m <= 1.65e-254) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); elseif (l_m <= 3.6e+62) tmp = Float64(sqrt(2.0) * (Float64(n * Float64(U * t)) ^ 0.5)); else tmp = Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om)) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 5e-276) tmp = sqrt(((2.0 * n) * (U * t))); elseif (l_m <= 1.65e-254) tmp = sqrt((2.0 * U)) * sqrt((n * t)); elseif (l_m <= 3.6e+62) tmp = sqrt(2.0) * ((n * (U * t)) ^ 0.5); else tmp = (-4.0 * ((U * (n * (l_m ^ 2.0))) / Om)) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 5e-276], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.65e-254], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 3.6e+62], N[(N[Sqrt[2.0], $MachinePrecision] * N[Power[N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision], N[Power[N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5 \cdot 10^{-276}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{elif}\;l\_m \leq 1.65 \cdot 10^{-254}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{elif}\;l\_m \leq 3.6 \cdot 10^{+62}:\\
\;\;\;\;\sqrt{2} \cdot {\left(n \cdot \left(U \cdot t\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(n \cdot {l\_m}^{2}\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 4.99999999999999967e-276Initial program 51.4%
Simplified58.7%
Taylor expanded in t around inf 45.4%
if 4.99999999999999967e-276 < l < 1.65000000000000008e-254Initial program 68.0%
Simplified36.7%
Taylor expanded in t around inf 68.3%
pow1/268.3%
associate-*r*68.3%
unpow-prod-down99.5%
pow1/299.5%
Applied egg-rr99.5%
unpow1/299.5%
Simplified99.5%
if 1.65000000000000008e-254 < l < 3.6e62Initial program 70.6%
Simplified74.1%
Taylor expanded in t around inf 59.2%
pow1/259.2%
associate-*l*59.2%
unpow-prod-down59.1%
pow1/259.1%
Applied egg-rr59.1%
if 3.6e62 < l Initial program 31.6%
Simplified44.7%
Taylor expanded in n around 0 36.2%
pow1/250.6%
associate-*r*44.6%
*-commutative44.6%
cancel-sign-sub-inv44.6%
metadata-eval44.6%
Applied egg-rr44.6%
Taylor expanded in t around 0 48.5%
Final simplification50.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ (pow l_m 2.0) Om))))) 0.5))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return pow((2.0 * ((n * U) * (t + (-2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = (2.0d0 * ((n * u) * (t + ((-2.0d0) * ((l_m ** 2.0d0) / om))))) ** 0.5d0
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.pow((2.0 * ((n * U) * (t + (-2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.pow((2.0 * ((n * U) * (t + (-2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5)
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5 end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = (2.0 * ((n * U) * (t + (-2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}
\end{array}
Initial program 53.1%
Simplified59.6%
Taylor expanded in n around 0 50.3%
pow1/256.0%
associate-*r*53.4%
*-commutative53.4%
cancel-sign-sub-inv53.4%
metadata-eval53.4%
Applied egg-rr53.4%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n 1.3e-294) (pow (* (* n t) (* 2.0 U)) 0.5) (* (sqrt (* 2.0 n)) (sqrt (* U t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= 1.3e-294) {
tmp = pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (n <= 1.3d-294) then
tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
else
tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= 1.3e-294) {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= 1.3e-294: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) else: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= 1.3e-294) tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; else tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (n <= 1.3e-294) tmp = ((n * t) * (2.0 * U)) ^ 0.5; else tmp = sqrt((2.0 * n)) * sqrt((U * t)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, 1.3e-294], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq 1.3 \cdot 10^{-294}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\end{array}
\end{array}
if n < 1.3e-294Initial program 48.0%
Simplified55.7%
Taylor expanded in t around inf 38.4%
pow1/241.4%
associate-*r*41.4%
Applied egg-rr41.4%
if 1.3e-294 < n Initial program 58.9%
Simplified64.0%
Taylor expanded in t around inf 47.3%
sqrt-prod52.1%
Applied egg-rr52.1%
*-commutative52.1%
Simplified52.1%
Final simplification46.4%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U 9e+113) (sqrt (* (* 2.0 n) (* U t))) (sqrt (* 2.0 (* U (* n t))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 9e+113) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 9d+113) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 9e+113) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= 9e+113: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= 9e+113) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= 9e+113) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 9e+113], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq 9 \cdot 10^{+113}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if U < 9.0000000000000001e113Initial program 50.1%
Simplified58.6%
Taylor expanded in t around inf 39.8%
if 9.0000000000000001e113 < U Initial program 76.9%
Simplified67.3%
Taylor expanded in t around inf 76.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (pow (* (* n t) (* 2.0 U)) 0.5))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return pow(((n * t) * (2.0 * U)), 0.5);
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = ((n * t) * (2.0d0 * u)) ** 0.5d0
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.pow(((n * t) * (2.0 * U)), 0.5);
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.pow(((n * t) * (2.0 * U)), 0.5)
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5 end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = ((n * t) * (2.0 * U)) ^ 0.5; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}
\end{array}
Initial program 53.1%
Simplified59.6%
Taylor expanded in t around inf 42.4%
pow1/244.4%
associate-*r*44.5%
Applied egg-rr44.5%
Final simplification44.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (u * (n * t))))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * t))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 53.1%
Simplified59.6%
Taylor expanded in t around inf 42.4%
herbie shell --seed 2024107
(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*))))))