
(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 19 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 (* l_m (/ l_m Om)))
(t_2 (* n (pow (/ l_m Om) 2.0)))
(t_3 (* t_2 (- U* U)))
(t_4 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_3))))
(if (<= t_4 0.0)
(sqrt (* (* 2.0 n) (* U (- t (fma 2.0 t_1 (* t_2 (- U U*)))))))
(if (<= t_4 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_3 (* 2.0 t_1)))))
(*
(* l_m (sqrt 2.0))
(sqrt (* U (* n (fma n (/ (- U* U) (pow Om 2.0)) (/ -2.0 Om))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = l_m * (l_m / Om);
double t_2 = n * pow((l_m / Om), 2.0);
double t_3 = t_2 * (U_42_ - U);
double t_4 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_3);
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - fma(2.0, t_1, (t_2 * (U - U_42_)))))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_3 - (2.0 * t_1)))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * fma(n, ((U_42_ - U) / pow(Om, 2.0)), (-2.0 / Om)))));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(l_m * Float64(l_m / Om)) t_2 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_3 = Float64(t_2 * Float64(U_42_ - U)) t_4 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_3)) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - fma(2.0, t_1, Float64(t_2 * Float64(U - U_42_))))))); elseif (t_4 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_3 - Float64(2.0 * t_1))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * fma(n, Float64(Float64(U_42_ - U) / (Om ^ 2.0)), Float64(-2.0 / Om)))))); 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[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1 + N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$3 - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(n * N[(N[(U$42$ - U), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := l\_m \cdot \frac{l\_m}{Om}\\
t_2 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_3 := t\_2 \cdot \left(U* - U\right)\\
t_4 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_3\right)\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, t\_1, t\_2 \cdot \left(U - U*\right)\right)\right)\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_3 - 2 \cdot t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \mathsf{fma}\left(n, \frac{U* - U}{{Om}^{2}}, \frac{-2}{Om}\right)\right)}\\
\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 8.9%
Simplified32.0%
pow132.0%
Applied egg-rr32.0%
unpow132.0%
associate-*r*34.4%
Simplified34.4%
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 68.6%
Simplified75.7%
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%
Simplified11.6%
Taylor expanded in l around inf 34.8%
*-commutative34.8%
associate-/l*34.8%
fmm-def34.8%
associate-*r/34.8%
metadata-eval34.8%
distribute-neg-frac34.8%
metadata-eval34.8%
Simplified34.8%
Final simplification62.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 (/ (* (pow l_m 2.0) (+ 2.0 (/ (* n (- U U*)) Om))) Om)))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(sqrt
(*
(* 2.0 n)
(*
U
(+ t (/ (* (pow l_m 2.0) (- (* n (/ (- U* U) Om)) 2.0)) Om)))))))))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 - ((pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + ((pow(l_m, 2.0) * ((n * ((U_42_ - U) / Om)) - 2.0)) / Om)))));
}
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 tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - ((Math.pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((Math.pow(l_m, 2.0) * ((n * ((U_42_ - U) / Om)) - 2.0)) / Om)))));
}
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))) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - ((math.pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + ((math.pow(l_m, 2.0) * ((n * ((U_42_ - U) / Om)) - 2.0)) / Om))))) 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(t - Float64(Float64((l_m ^ 2.0) * Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) * Float64(Float64(n * Float64(Float64(U_42_ - U) / Om)) - 2.0)) / Om))))); 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))); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (((l_m ^ 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = sqrt(((2.0 * n) * (U * (t + (((l_m ^ 2.0) * ((n * ((U_42_ - U) / Om)) - 2.0)) / Om))))); 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]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(n * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $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(t - \frac{{l\_m}^{2} \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{{l\_m}^{2} \cdot \left(n \cdot \frac{U* - U}{Om} - 2\right)}{Om}\right)\right)}\\
\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 10.7%
Simplified35.2%
Taylor expanded in Om around inf 35.2%
Taylor expanded in l around 0 38.0%
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*))))) < +inf.0Initial program 68.6%
Simplified75.7%
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%
Simplified12.1%
Taylor expanded in Om around inf 9.7%
Taylor expanded in l around 0 36.8%
associate-/l*38.9%
Applied egg-rr38.9%
Final simplification64.0%
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 (* n (- U U*))))
(if (<= t_2 0.0)
(sqrt
(* (* 2.0 n) (* U (- t (/ (* (pow l_m 2.0) (+ 2.0 (/ t_3 Om))) Om)))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
(* l_m (sqrt 2.0))
(sqrt (* U (* n (- (* 2.0 (/ -1.0 Om)) (/ t_3 (pow Om 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 = n * (U - U_42_);
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - ((pow(l_m, 2.0) * (2.0 + (t_3 / Om))) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * ((2.0 * (-1.0 / Om)) - (t_3 / pow(Om, 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 = n * (U - U_42_);
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - ((Math.pow(l_m, 2.0) * (2.0 + (t_3 / Om))) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((U * (n * ((2.0 * (-1.0 / Om)) - (t_3 / Math.pow(Om, 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 = n * (U - U_42_) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - ((math.pow(l_m, 2.0) * (2.0 + (t_3 / Om))) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt((U * (n * ((2.0 * (-1.0 / Om)) - (t_3 / math.pow(Om, 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 = Float64(n * Float64(U - U_42_)) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64((l_m ^ 2.0) * Float64(2.0 + Float64(t_3 / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(2.0 * Float64(-1.0 / Om)) - Float64(t_3 / (Om ^ 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 = n * (U - U_42_); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (((l_m ^ 2.0) * (2.0 + (t_3 / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * ((2.0 * (-1.0 / Om)) - (t_3 / (Om ^ 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[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(2.0 + N[(t$95$3 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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 := n \cdot \left(U - U*\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{{l\_m}^{2} \cdot \left(2 + \frac{t\_3}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(2 \cdot \frac{-1}{Om} - \frac{t\_3}{{Om}^{2}}\right)\right)}\\
\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 8.9%
Simplified32.0%
Taylor expanded in Om around inf 32.0%
Taylor expanded in l around 0 34.4%
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 68.6%
Simplified75.7%
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%
Simplified11.6%
Taylor expanded in l around inf 34.8%
Final simplification62.8%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* l_m (/ l_m Om)))
(t_2 (* n (pow (/ l_m Om) 2.0)))
(t_3 (* t_2 (- U* U)))
(t_4 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_3))))
(if (<= t_4 0.0)
(sqrt (* (* 2.0 n) (* U (- t (fma 2.0 t_1 (* t_2 (- U U*)))))))
(if (<= t_4 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_3 (* 2.0 t_1)))))
(*
(* l_m (sqrt 2.0))
(sqrt
(*
U
(* n (- (* 2.0 (/ -1.0 Om)) (/ (* n (- U U*)) (pow Om 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 = l_m * (l_m / Om);
double t_2 = n * pow((l_m / Om), 2.0);
double t_3 = t_2 * (U_42_ - U);
double t_4 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_3);
double tmp;
if (t_4 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - fma(2.0, t_1, (t_2 * (U - U_42_)))))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_3 - (2.0 * t_1)))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * ((2.0 * (-1.0 / Om)) - ((n * (U - U_42_)) / pow(Om, 2.0))))));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(l_m * Float64(l_m / Om)) t_2 = Float64(n * (Float64(l_m / Om) ^ 2.0)) t_3 = Float64(t_2 * Float64(U_42_ - U)) t_4 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_3)) tmp = 0.0 if (t_4 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - fma(2.0, t_1, Float64(t_2 * Float64(U - U_42_))))))); elseif (t_4 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_3 - Float64(2.0 * t_1))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(2.0 * Float64(-1.0 / Om)) - Float64(Float64(n * Float64(U - U_42_)) / (Om ^ 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[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1 + N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$3 - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[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]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := l\_m \cdot \frac{l\_m}{Om}\\
t_2 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_3 := t\_2 \cdot \left(U* - U\right)\\
t_4 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_3\right)\\
\mathbf{if}\;t\_4 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, t\_1, t\_2 \cdot \left(U - U*\right)\right)\right)\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_3 - 2 \cdot t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(2 \cdot \frac{-1}{Om} - \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)}\\
\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 8.9%
Simplified32.0%
pow132.0%
Applied egg-rr32.0%
unpow132.0%
associate-*r*34.4%
Simplified34.4%
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 68.6%
Simplified75.7%
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%
Simplified11.6%
Taylor expanded in l around inf 34.8%
Final simplification62.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 (* (* (* 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 (/ (* (pow l_m 2.0) (+ 2.0 (/ (* n (- U U*)) Om))) Om)))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
(*
(* l_m (sqrt 2.0))
(sqrt (* (* n U) (- (* n (/ (- U* U) (pow Om 2.0))) (/ 2.0 Om)))))))))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 tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - ((pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((n * ((U_42_ - U) / pow(Om, 2.0))) - (2.0 / Om))));
}
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 tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - ((Math.pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om)))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
} else {
tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * ((n * ((U_42_ - U) / Math.pow(Om, 2.0))) - (2.0 / Om))));
}
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) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - ((math.pow(l_m, 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))) else: tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * ((n * ((U_42_ - U) / math.pow(Om, 2.0))) - (2.0 / Om)))) 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)) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64((l_m ^ 2.0) * Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))); else tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * Float64(Float64(n * Float64(Float64(U_42_ - U) / (Om ^ 2.0))) - Float64(2.0 / Om))))); 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); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (((l_m ^ 2.0) * (2.0 + ((n * (U - U_42_)) / Om))) / Om))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om))))))); else tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((n * ((U_42_ - U) / (Om ^ 2.0))) - (2.0 / Om)))); 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]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(n * N[(N[(U$42$ - U), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{{l\_m}^{2} \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(n \cdot \frac{U* - U}{{Om}^{2}} - \frac{2}{Om}\right)}\\
\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 8.9%
Simplified32.0%
Taylor expanded in Om around inf 32.0%
Taylor expanded in l around 0 34.4%
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 68.6%
Simplified75.7%
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%
Simplified11.6%
Taylor expanded in l around inf 34.8%
*-commutative34.8%
associate-*r*31.8%
associate-/l*31.8%
associate-*r/31.8%
metadata-eval31.8%
Simplified31.8%
Final simplification62.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= t -1.28e+57)
(sqrt (fabs (* 2.0 (* U (* n t)))))
(if (<= t 7.1e+208)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* (pow l_m 2.0) (- (* n (/ (- U* U) Om)) 2.0)) Om)))))
(* (sqrt t) (sqrt (* 2.0 (* n U)))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= -1.28e+57) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else if (t <= 7.1e+208) {
tmp = sqrt(((2.0 * n) * (U * (t + ((pow(l_m, 2.0) * ((n * ((U_42_ - U) / Om)) - 2.0)) / Om)))));
} else {
tmp = sqrt(t) * sqrt((2.0 * (n * U)));
}
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 (t <= (-1.28d+57)) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else if (t <= 7.1d+208) then
tmp = sqrt(((2.0d0 * n) * (u * (t + (((l_m ** 2.0d0) * ((n * ((u_42 - u) / om)) - 2.0d0)) / om)))))
else
tmp = sqrt(t) * sqrt((2.0d0 * (n * u)))
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 (t <= -1.28e+57) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else if (t <= 7.1e+208) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((Math.pow(l_m, 2.0) * ((n * ((U_42_ - U) / Om)) - 2.0)) / Om)))));
} else {
tmp = Math.sqrt(t) * Math.sqrt((2.0 * (n * U)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= -1.28e+57: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) elif t <= 7.1e+208: tmp = math.sqrt(((2.0 * n) * (U * (t + ((math.pow(l_m, 2.0) * ((n * ((U_42_ - U) / Om)) - 2.0)) / Om))))) else: tmp = math.sqrt(t) * math.sqrt((2.0 * (n * U))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= -1.28e+57) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); elseif (t <= 7.1e+208) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) * Float64(Float64(n * Float64(Float64(U_42_ - U) / Om)) - 2.0)) / Om))))); else tmp = Float64(sqrt(t) * sqrt(Float64(2.0 * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (t <= -1.28e+57) tmp = sqrt(abs((2.0 * (U * (n * t))))); elseif (t <= 7.1e+208) tmp = sqrt(((2.0 * n) * (U * (t + (((l_m ^ 2.0) * ((n * ((U_42_ - U) / Om)) - 2.0)) / Om))))); else tmp = sqrt(t) * sqrt((2.0 * (n * U))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, -1.28e+57], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 7.1e+208], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(n * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.28 \cdot 10^{+57}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;t \leq 7.1 \cdot 10^{+208}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{{l\_m}^{2} \cdot \left(n \cdot \frac{U* - U}{Om} - 2\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{2 \cdot \left(n \cdot U\right)}\\
\end{array}
\end{array}
if t < -1.28000000000000001e57Initial program 43.4%
Simplified45.7%
Taylor expanded in t around inf 50.0%
associate-*r*50.0%
Simplified50.0%
add-sqr-sqrt50.0%
pow1/250.0%
pow1/252.3%
pow-prod-down32.8%
pow232.8%
associate-*l*32.8%
associate-*r*30.5%
Applied egg-rr30.5%
unpow1/230.5%
unpow230.5%
rem-sqrt-square46.2%
associate-*r*52.6%
Simplified52.6%
if -1.28000000000000001e57 < t < 7.10000000000000019e208Initial program 49.9%
Simplified55.6%
Taylor expanded in Om around inf 46.0%
Taylor expanded in l around 0 52.3%
associate-/l*53.8%
Applied egg-rr53.8%
if 7.10000000000000019e208 < t Initial program 49.5%
Simplified54.4%
associate-*r*58.7%
fma-undefine58.7%
associate-*r/49.5%
associate-*r*49.5%
associate--l-49.5%
associate-*r*49.5%
*-commutative49.5%
sqrt-prod57.0%
Applied egg-rr57.0%
Taylor expanded in t around inf 66.9%
Final simplification54.6%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))))
(if (<= t 1.8e-259)
t_1
(if (<= t 7.4e-50)
(* (sqrt t) (sqrt (* (* 2.0 n) U)))
(if (<= t 1.1e+195) t_1 (* (sqrt t) (sqrt (* 2.0 (* n U)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
double tmp;
if (t <= 1.8e-259) {
tmp = t_1;
} else if (t <= 7.4e-50) {
tmp = sqrt(t) * sqrt(((2.0 * n) * U));
} else if (t <= 1.1e+195) {
tmp = t_1;
} else {
tmp = sqrt(t) * sqrt((2.0 * (n * U)));
}
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) :: t_1
real(8) :: tmp
t_1 = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
if (t <= 1.8d-259) then
tmp = t_1
else if (t <= 7.4d-50) then
tmp = sqrt(t) * sqrt(((2.0d0 * n) * u))
else if (t <= 1.1d+195) then
tmp = t_1
else
tmp = sqrt(t) * sqrt((2.0d0 * (n * u)))
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 t_1 = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
double tmp;
if (t <= 1.8e-259) {
tmp = t_1;
} else if (t <= 7.4e-50) {
tmp = Math.sqrt(t) * Math.sqrt(((2.0 * n) * U));
} else if (t <= 1.1e+195) {
tmp = t_1;
} else {
tmp = Math.sqrt(t) * Math.sqrt((2.0 * (n * U)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) tmp = 0 if t <= 1.8e-259: tmp = t_1 elif t <= 7.4e-50: tmp = math.sqrt(t) * math.sqrt(((2.0 * n) * U)) elif t <= 1.1e+195: tmp = t_1 else: tmp = math.sqrt(t) * math.sqrt((2.0 * (n * U))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))) tmp = 0.0 if (t <= 1.8e-259) tmp = t_1; elseif (t <= 7.4e-50) tmp = Float64(sqrt(t) * sqrt(Float64(Float64(2.0 * n) * U))); elseif (t <= 1.1e+195) tmp = t_1; else tmp = Float64(sqrt(t) * sqrt(Float64(2.0 * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); tmp = 0.0; if (t <= 1.8e-259) tmp = t_1; elseif (t <= 7.4e-50) tmp = sqrt(t) * sqrt(((2.0 * n) * U)); elseif (t <= 1.1e+195) tmp = t_1; else tmp = sqrt(t) * sqrt((2.0 * (n * U))); 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[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]}, If[LessEqual[t, 1.8e-259], t$95$1, If[LessEqual[t, 7.4e-50], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+195], t$95$1, N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{if}\;t \leq 1.8 \cdot 10^{-259}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-50}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{\left(2 \cdot n\right) \cdot U}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+195}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{2 \cdot \left(n \cdot U\right)}\\
\end{array}
\end{array}
if t < 1.7999999999999999e-259 or 7.4000000000000002e-50 < t < 1.1e195Initial program 48.1%
Simplified54.6%
Taylor expanded in n around 0 47.5%
if 1.7999999999999999e-259 < t < 7.4000000000000002e-50Initial program 48.2%
Simplified45.6%
pow145.6%
Applied egg-rr45.6%
unpow145.6%
associate-*r*45.5%
Simplified45.5%
Taylor expanded in t around inf 11.9%
associate-*r*25.0%
Simplified25.0%
pow1/227.9%
associate-*r*27.9%
unpow-prod-down41.0%
*-commutative41.0%
pow1/241.0%
Applied egg-rr41.0%
*-commutative41.0%
unpow1/238.2%
associate-*r*38.2%
*-commutative38.2%
*-commutative38.2%
Simplified38.2%
if 1.1e195 < t Initial program 53.4%
Simplified57.7%
associate-*r*61.2%
fma-undefine61.2%
associate-*r/53.4%
associate-*r*53.4%
associate--l-53.4%
associate-*r*53.4%
*-commutative53.4%
sqrt-prod59.8%
Applied egg-rr59.8%
Taylor expanded in t around inf 68.1%
Final simplification48.2%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= t -8.5e+100)
(sqrt (fabs (* 2.0 (* U (* n t)))))
(if (<= t 1e-48)
(sqrt (* 2.0 (* (* n U) (- t (/ (* 2.0 (pow l_m 2.0)) Om)))))
(if (<= t 7.2e+194)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
(* (sqrt t) (sqrt (* 2.0 (* n U))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= -8.5e+100) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else if (t <= 1e-48) {
tmp = sqrt((2.0 * ((n * U) * (t - ((2.0 * pow(l_m, 2.0)) / Om)))));
} else if (t <= 7.2e+194) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
} else {
tmp = sqrt(t) * sqrt((2.0 * (n * U)));
}
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 (t <= (-8.5d+100)) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else if (t <= 1d-48) then
tmp = sqrt((2.0d0 * ((n * u) * (t - ((2.0d0 * (l_m ** 2.0d0)) / om)))))
else if (t <= 7.2d+194) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
else
tmp = sqrt(t) * sqrt((2.0d0 * (n * u)))
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 (t <= -8.5e+100) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else if (t <= 1e-48) {
tmp = Math.sqrt((2.0 * ((n * U) * (t - ((2.0 * Math.pow(l_m, 2.0)) / Om)))));
} else if (t <= 7.2e+194) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
} else {
tmp = Math.sqrt(t) * Math.sqrt((2.0 * (n * U)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= -8.5e+100: tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) elif t <= 1e-48: tmp = math.sqrt((2.0 * ((n * U) * (t - ((2.0 * math.pow(l_m, 2.0)) / Om))))) elif t <= 7.2e+194: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))) else: tmp = math.sqrt(t) * math.sqrt((2.0 * (n * U))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= -8.5e+100) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); elseif (t <= 1e-48) tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t - Float64(Float64(2.0 * (l_m ^ 2.0)) / Om))))); elseif (t <= 7.2e+194) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))))); else tmp = Float64(sqrt(t) * sqrt(Float64(2.0 * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (t <= -8.5e+100) tmp = sqrt(abs((2.0 * (U * (n * t))))); elseif (t <= 1e-48) tmp = sqrt((2.0 * ((n * U) * (t - ((2.0 * (l_m ^ 2.0)) / Om))))); elseif (t <= 7.2e+194) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om))))))); else tmp = sqrt(t) * sqrt((2.0 * (n * U))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, -8.5e+100], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1e-48], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t - N[(N[(2.0 * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 7.2e+194], 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[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+100}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{elif}\;t \leq 10^{-48}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \frac{2 \cdot {l\_m}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+194}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{2 \cdot \left(n \cdot U\right)}\\
\end{array}
\end{array}
if t < -8.50000000000000043e100Initial program 42.5%
Simplified45.3%
Taylor expanded in t around inf 51.0%
associate-*r*51.0%
Simplified51.0%
add-sqr-sqrt51.0%
pow1/251.0%
pow1/253.7%
pow-prod-down36.7%
pow236.7%
associate-*l*36.7%
associate-*r*33.8%
Applied egg-rr33.8%
unpow1/233.8%
unpow233.8%
rem-sqrt-square46.0%
associate-*r*54.0%
Simplified54.0%
if -8.50000000000000043e100 < t < 9.9999999999999997e-49Initial program 45.0%
Simplified45.9%
pow145.9%
Applied egg-rr45.9%
unpow145.9%
associate-*r*46.6%
Simplified46.6%
Taylor expanded in n around 0 35.2%
associate-*r*36.4%
associate-*r/36.4%
Simplified36.4%
if 9.9999999999999997e-49 < t < 7.19999999999999999e194Initial program 59.7%
Simplified66.7%
Taylor expanded in n around 0 65.9%
if 7.19999999999999999e194 < t Initial program 53.4%
Simplified57.7%
associate-*r*61.2%
fma-undefine61.2%
associate-*r/53.4%
associate-*r*53.4%
associate--l-53.4%
associate-*r*53.4%
*-commutative53.4%
sqrt-prod59.8%
Applied egg-rr59.8%
Taylor expanded in t around inf 68.1%
Final simplification48.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (sqrt (fabs (* 2.0 (* U (* n t)))))))
(if (<= t -4.5e-180)
t_1
(if (<= t 8.8e-271)
(* (sqrt (* U U*)) (* l_m (/ (* n (sqrt 2.0)) Om)))
(if (<= t 8.2e-47)
(* (sqrt t) (sqrt (* (* 2.0 n) U)))
(if (<= t 2.3e+197) t_1 (* (sqrt t) (sqrt (* 2.0 (* n U))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt(fabs((2.0 * (U * (n * t)))));
double tmp;
if (t <= -4.5e-180) {
tmp = t_1;
} else if (t <= 8.8e-271) {
tmp = sqrt((U * U_42_)) * (l_m * ((n * sqrt(2.0)) / Om));
} else if (t <= 8.2e-47) {
tmp = sqrt(t) * sqrt(((2.0 * n) * U));
} else if (t <= 2.3e+197) {
tmp = t_1;
} else {
tmp = sqrt(t) * sqrt((2.0 * (n * U)));
}
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) :: t_1
real(8) :: tmp
t_1 = sqrt(abs((2.0d0 * (u * (n * t)))))
if (t <= (-4.5d-180)) then
tmp = t_1
else if (t <= 8.8d-271) then
tmp = sqrt((u * u_42)) * (l_m * ((n * sqrt(2.0d0)) / om))
else if (t <= 8.2d-47) then
tmp = sqrt(t) * sqrt(((2.0d0 * n) * u))
else if (t <= 2.3d+197) then
tmp = t_1
else
tmp = sqrt(t) * sqrt((2.0d0 * (n * u)))
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 t_1 = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
double tmp;
if (t <= -4.5e-180) {
tmp = t_1;
} else if (t <= 8.8e-271) {
tmp = Math.sqrt((U * U_42_)) * (l_m * ((n * Math.sqrt(2.0)) / Om));
} else if (t <= 8.2e-47) {
tmp = Math.sqrt(t) * Math.sqrt(((2.0 * n) * U));
} else if (t <= 2.3e+197) {
tmp = t_1;
} else {
tmp = Math.sqrt(t) * Math.sqrt((2.0 * (n * U)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt(math.fabs((2.0 * (U * (n * t))))) tmp = 0 if t <= -4.5e-180: tmp = t_1 elif t <= 8.8e-271: tmp = math.sqrt((U * U_42_)) * (l_m * ((n * math.sqrt(2.0)) / Om)) elif t <= 8.2e-47: tmp = math.sqrt(t) * math.sqrt(((2.0 * n) * U)) elif t <= 2.3e+197: tmp = t_1 else: tmp = math.sqrt(t) * math.sqrt((2.0 * (n * U))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))) tmp = 0.0 if (t <= -4.5e-180) tmp = t_1; elseif (t <= 8.8e-271) tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(l_m * Float64(Float64(n * sqrt(2.0)) / Om))); elseif (t <= 8.2e-47) tmp = Float64(sqrt(t) * sqrt(Float64(Float64(2.0 * n) * U))); elseif (t <= 2.3e+197) tmp = t_1; else tmp = Float64(sqrt(t) * sqrt(Float64(2.0 * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(abs((2.0 * (U * (n * t))))); tmp = 0.0; if (t <= -4.5e-180) tmp = t_1; elseif (t <= 8.8e-271) tmp = sqrt((U * U_42_)) * (l_m * ((n * sqrt(2.0)) / Om)); elseif (t <= 8.2e-47) tmp = sqrt(t) * sqrt(((2.0 * n) * U)); elseif (t <= 2.3e+197) tmp = t_1; else tmp = sqrt(t) * sqrt((2.0 * (n * U))); 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[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -4.5e-180], t$95$1, If[LessEqual[t, 8.8e-271], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e-47], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+197], t$95$1, N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{-180}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-271}:\\
\;\;\;\;\sqrt{U \cdot U*} \cdot \left(l\_m \cdot \frac{n \cdot \sqrt{2}}{Om}\right)\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-47}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{\left(2 \cdot n\right) \cdot U}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+197}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{2 \cdot \left(n \cdot U\right)}\\
\end{array}
\end{array}
if t < -4.50000000000000009e-180 or 8.20000000000000003e-47 < t < 2.3000000000000001e197Initial program 49.5%
Simplified54.5%
Taylor expanded in t around inf 47.8%
associate-*r*47.8%
Simplified47.8%
add-sqr-sqrt47.8%
pow1/247.8%
pow1/249.8%
pow-prod-down34.6%
pow234.6%
associate-*l*34.6%
associate-*r*33.3%
Applied egg-rr33.3%
unpow1/233.3%
unpow233.3%
rem-sqrt-square44.8%
associate-*r*50.4%
Simplified50.4%
if -4.50000000000000009e-180 < t < 8.7999999999999998e-271Initial program 39.2%
Simplified42.7%
Taylor expanded in U* around inf 23.5%
associate-/l*26.0%
Simplified26.0%
if 8.7999999999999998e-271 < t < 8.20000000000000003e-47Initial program 49.8%
Simplified47.4%
pow147.4%
Applied egg-rr47.4%
unpow147.4%
associate-*r*47.4%
Simplified47.4%
Taylor expanded in t around inf 11.3%
associate-*r*23.4%
Simplified23.4%
pow1/226.0%
associate-*r*26.0%
unpow-prod-down40.7%
*-commutative40.7%
pow1/240.7%
Applied egg-rr40.7%
*-commutative40.7%
unpow1/238.0%
associate-*r*38.1%
*-commutative38.1%
*-commutative38.1%
Simplified38.1%
if 2.3000000000000001e197 < t Initial program 55.7%
Simplified60.1%
associate-*r*63.7%
fma-undefine63.7%
associate-*r/55.7%
associate-*r*55.7%
associate--l-55.7%
associate-*r*55.7%
*-commutative55.7%
sqrt-prod62.3%
Applied egg-rr62.3%
Taylor expanded in t around inf 70.9%
Final simplification47.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (sqrt (fabs (* 2.0 (* U (* n t)))))))
(if (<= t -1.46e-184)
t_1
(if (<= t 1.75e-266)
(* (/ (* l_m (* n (sqrt 2.0))) Om) (sqrt (* U U*)))
(if (<= t 4e-47)
(* (sqrt t) (sqrt (* (* 2.0 n) U)))
(if (<= t 1e+197) t_1 (* (sqrt t) (sqrt (* 2.0 (* n U))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt(fabs((2.0 * (U * (n * t)))));
double tmp;
if (t <= -1.46e-184) {
tmp = t_1;
} else if (t <= 1.75e-266) {
tmp = ((l_m * (n * sqrt(2.0))) / Om) * sqrt((U * U_42_));
} else if (t <= 4e-47) {
tmp = sqrt(t) * sqrt(((2.0 * n) * U));
} else if (t <= 1e+197) {
tmp = t_1;
} else {
tmp = sqrt(t) * sqrt((2.0 * (n * U)));
}
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) :: t_1
real(8) :: tmp
t_1 = sqrt(abs((2.0d0 * (u * (n * t)))))
if (t <= (-1.46d-184)) then
tmp = t_1
else if (t <= 1.75d-266) then
tmp = ((l_m * (n * sqrt(2.0d0))) / om) * sqrt((u * u_42))
else if (t <= 4d-47) then
tmp = sqrt(t) * sqrt(((2.0d0 * n) * u))
else if (t <= 1d+197) then
tmp = t_1
else
tmp = sqrt(t) * sqrt((2.0d0 * (n * u)))
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 t_1 = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
double tmp;
if (t <= -1.46e-184) {
tmp = t_1;
} else if (t <= 1.75e-266) {
tmp = ((l_m * (n * Math.sqrt(2.0))) / Om) * Math.sqrt((U * U_42_));
} else if (t <= 4e-47) {
tmp = Math.sqrt(t) * Math.sqrt(((2.0 * n) * U));
} else if (t <= 1e+197) {
tmp = t_1;
} else {
tmp = Math.sqrt(t) * Math.sqrt((2.0 * (n * U)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt(math.fabs((2.0 * (U * (n * t))))) tmp = 0 if t <= -1.46e-184: tmp = t_1 elif t <= 1.75e-266: tmp = ((l_m * (n * math.sqrt(2.0))) / Om) * math.sqrt((U * U_42_)) elif t <= 4e-47: tmp = math.sqrt(t) * math.sqrt(((2.0 * n) * U)) elif t <= 1e+197: tmp = t_1 else: tmp = math.sqrt(t) * math.sqrt((2.0 * (n * U))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))) tmp = 0.0 if (t <= -1.46e-184) tmp = t_1; elseif (t <= 1.75e-266) tmp = Float64(Float64(Float64(l_m * Float64(n * sqrt(2.0))) / Om) * sqrt(Float64(U * U_42_))); elseif (t <= 4e-47) tmp = Float64(sqrt(t) * sqrt(Float64(Float64(2.0 * n) * U))); elseif (t <= 1e+197) tmp = t_1; else tmp = Float64(sqrt(t) * sqrt(Float64(2.0 * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(abs((2.0 * (U * (n * t))))); tmp = 0.0; if (t <= -1.46e-184) tmp = t_1; elseif (t <= 1.75e-266) tmp = ((l_m * (n * sqrt(2.0))) / Om) * sqrt((U * U_42_)); elseif (t <= 4e-47) tmp = sqrt(t) * sqrt(((2.0 * n) * U)); elseif (t <= 1e+197) tmp = t_1; else tmp = sqrt(t) * sqrt((2.0 * (n * U))); 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[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, -1.46e-184], t$95$1, If[LessEqual[t, 1.75e-266], N[(N[(N[(l$95$m * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-47], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+197], t$95$1, N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{if}\;t \leq -1.46 \cdot 10^{-184}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-266}:\\
\;\;\;\;\frac{l\_m \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-47}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{\left(2 \cdot n\right) \cdot U}\\
\mathbf{elif}\;t \leq 10^{+197}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{2 \cdot \left(n \cdot U\right)}\\
\end{array}
\end{array}
if t < -1.45999999999999994e-184 or 3.9999999999999999e-47 < t < 9.9999999999999995e196Initial program 49.5%
Simplified54.5%
Taylor expanded in t around inf 47.8%
associate-*r*47.8%
Simplified47.8%
add-sqr-sqrt47.8%
pow1/247.8%
pow1/249.8%
pow-prod-down34.6%
pow234.6%
associate-*l*34.6%
associate-*r*33.3%
Applied egg-rr33.3%
unpow1/233.3%
unpow233.3%
rem-sqrt-square44.8%
associate-*r*50.4%
Simplified50.4%
if -1.45999999999999994e-184 < t < 1.75000000000000015e-266Initial program 39.2%
Simplified42.7%
Taylor expanded in U* around inf 23.5%
if 1.75000000000000015e-266 < t < 3.9999999999999999e-47Initial program 49.8%
Simplified47.4%
pow147.4%
Applied egg-rr47.4%
unpow147.4%
associate-*r*47.4%
Simplified47.4%
Taylor expanded in t around inf 11.3%
associate-*r*23.4%
Simplified23.4%
pow1/226.0%
associate-*r*26.0%
unpow-prod-down40.7%
*-commutative40.7%
pow1/240.7%
Applied egg-rr40.7%
*-commutative40.7%
unpow1/238.0%
associate-*r*38.1%
*-commutative38.1%
*-commutative38.1%
Simplified38.1%
if 9.9999999999999995e196 < t Initial program 55.7%
Simplified60.1%
associate-*r*63.7%
fma-undefine63.7%
associate-*r/55.7%
associate-*r*55.7%
associate--l-55.7%
associate-*r*55.7%
*-commutative55.7%
sqrt-prod62.3%
Applied egg-rr62.3%
Taylor expanded in t around inf 70.9%
Final simplification46.6%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 1.5e-34)
(sqrt (* (* 2.0 n) (* U (+ t (/ (* U* (/ (* n (pow l_m 2.0)) Om)) Om)))))
(sqrt
(*
(* 2.0 n)
(* U (+ t (* (pow l_m 2.0) (/ (- (* n (/ (- U* U) Om)) 2.0) Om))))))))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 <= 1.5e-34) {
tmp = sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * pow(l_m, 2.0)) / Om)) / Om)))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + (pow(l_m, 2.0) * (((n * ((U_42_ - U) / Om)) - 2.0) / Om))))));
}
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 <= 1.5d-34) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((u_42 * ((n * (l_m ** 2.0d0)) / om)) / om)))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l_m ** 2.0d0) * (((n * ((u_42 - u) / om)) - 2.0d0) / om))))))
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 <= 1.5e-34) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * Math.pow(l_m, 2.0)) / Om)) / Om)))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (Math.pow(l_m, 2.0) * (((n * ((U_42_ - U) / Om)) - 2.0) / Om))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.5e-34: tmp = math.sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * math.pow(l_m, 2.0)) / Om)) / Om))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + (math.pow(l_m, 2.0) * (((n * ((U_42_ - U) / Om)) - 2.0) / Om)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.5e-34) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(U_42_ * Float64(Float64(n * (l_m ^ 2.0)) / Om)) / Om))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64((l_m ^ 2.0) * Float64(Float64(Float64(n * Float64(Float64(U_42_ - U) / Om)) - 2.0) / Om)))))); 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 <= 1.5e-34) tmp = sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * (l_m ^ 2.0)) / Om)) / Om))))); else tmp = sqrt(((2.0 * n) * (U * (t + ((l_m ^ 2.0) * (((n * ((U_42_ - U) / Om)) - 2.0) / Om)))))); 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, 1.5e-34], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(U$42$ * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(N[(n * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.5 \cdot 10^{-34}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{U* \cdot \frac{n \cdot {l\_m}^{2}}{Om}}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + {l\_m}^{2} \cdot \frac{n \cdot \frac{U* - U}{Om} - 2}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 1.5e-34Initial program 52.8%
Simplified55.5%
Taylor expanded in Om around inf 46.5%
Taylor expanded in l around 0 50.9%
Taylor expanded in U* around inf 49.8%
mul-1-neg49.8%
associate-/l*51.1%
distribute-rgt-neg-in51.1%
distribute-neg-frac251.1%
*-commutative51.1%
Simplified51.1%
if 1.5e-34 < l Initial program 36.6%
Simplified47.3%
Taylor expanded in Om around inf 37.9%
Taylor expanded in l around 0 46.9%
associate-/l*46.9%
associate-/l*48.4%
Simplified48.4%
Final simplification50.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= l_m 4e-20)
(sqrt (* (* 2.0 n) (* U (+ t (/ (* U* (/ (* n (pow l_m 2.0)) Om)) Om)))))
(sqrt
(*
(* 2.0 n)
(* U (+ t (* (pow l_m 2.0) (/ (- (/ (* n U*) Om) 2.0) Om))))))))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 <= 4e-20) {
tmp = sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * pow(l_m, 2.0)) / Om)) / Om)))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t + (pow(l_m, 2.0) * ((((n * U_42_) / Om) - 2.0) / Om))))));
}
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 <= 4d-20) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((u_42 * ((n * (l_m ** 2.0d0)) / om)) / om)))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l_m ** 2.0d0) * ((((n * u_42) / om) - 2.0d0) / om))))))
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 <= 4e-20) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * Math.pow(l_m, 2.0)) / Om)) / Om)))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (Math.pow(l_m, 2.0) * ((((n * U_42_) / Om) - 2.0) / Om))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 4e-20: tmp = math.sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * math.pow(l_m, 2.0)) / Om)) / Om))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t + (math.pow(l_m, 2.0) * ((((n * U_42_) / Om) - 2.0) / Om)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 4e-20) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(U_42_ * Float64(Float64(n * (l_m ^ 2.0)) / Om)) / Om))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64((l_m ^ 2.0) * Float64(Float64(Float64(Float64(n * U_42_) / Om) - 2.0) / Om)))))); 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 <= 4e-20) tmp = sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * (l_m ^ 2.0)) / Om)) / Om))))); else tmp = sqrt(((2.0 * n) * (U * (t + ((l_m ^ 2.0) * ((((n * U_42_) / Om) - 2.0) / Om)))))); 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, 4e-20], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(U$42$ * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 4 \cdot 10^{-20}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{U* \cdot \frac{n \cdot {l\_m}^{2}}{Om}}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + {l\_m}^{2} \cdot \frac{\frac{n \cdot U*}{Om} - 2}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 3.99999999999999978e-20Initial program 53.0%
Simplified55.7%
Taylor expanded in Om around inf 46.9%
Taylor expanded in l around 0 51.2%
Taylor expanded in U* around inf 50.1%
mul-1-neg50.1%
associate-/l*51.4%
distribute-rgt-neg-in51.4%
distribute-neg-frac251.4%
*-commutative51.4%
Simplified51.4%
if 3.99999999999999978e-20 < l Initial program 35.1%
Simplified46.3%
Taylor expanded in Om around inf 36.4%
Taylor expanded in l around 0 45.8%
Taylor expanded in U around 0 47.4%
associate-/l*47.4%
mul-1-neg47.4%
unsub-neg47.4%
*-commutative47.4%
Simplified47.4%
Final simplification50.4%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (or (<= t 5e-310) (and (not (<= t 1.9e-49)) (<= t 9.2e+195))) (sqrt (fabs (* 2.0 (* U (* n t))))) (* (sqrt t) (sqrt (* 2.0 (* n U))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((t <= 5e-310) || (!(t <= 1.9e-49) && (t <= 9.2e+195))) {
tmp = sqrt(fabs((2.0 * (U * (n * t)))));
} else {
tmp = sqrt(t) * sqrt((2.0 * (n * U)));
}
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 ((t <= 5d-310) .or. (.not. (t <= 1.9d-49)) .and. (t <= 9.2d+195)) then
tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
else
tmp = sqrt(t) * sqrt((2.0d0 * (n * u)))
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 ((t <= 5e-310) || (!(t <= 1.9e-49) && (t <= 9.2e+195))) {
tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
} else {
tmp = Math.sqrt(t) * Math.sqrt((2.0 * (n * U)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if (t <= 5e-310) or (not (t <= 1.9e-49) and (t <= 9.2e+195)): tmp = math.sqrt(math.fabs((2.0 * (U * (n * t))))) else: tmp = math.sqrt(t) * math.sqrt((2.0 * (n * U))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if ((t <= 5e-310) || (!(t <= 1.9e-49) && (t <= 9.2e+195))) tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))); else tmp = Float64(sqrt(t) * sqrt(Float64(2.0 * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if ((t <= 5e-310) || (~((t <= 1.9e-49)) && (t <= 9.2e+195))) tmp = sqrt(abs((2.0 * (U * (n * t))))); else tmp = sqrt(t) * sqrt((2.0 * (n * U))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[Or[LessEqual[t, 5e-310], And[N[Not[LessEqual[t, 1.9e-49]], $MachinePrecision], LessEqual[t, 9.2e+195]]], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-310} \lor \neg \left(t \leq 1.9 \cdot 10^{-49}\right) \land t \leq 9.2 \cdot 10^{+195}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{2 \cdot \left(n \cdot U\right)}\\
\end{array}
\end{array}
if t < 4.999999999999985e-310 or 1.8999999999999999e-49 < t < 9.2000000000000005e195Initial program 49.1%
Simplified54.5%
Taylor expanded in t around inf 41.8%
associate-*r*41.8%
Simplified41.8%
add-sqr-sqrt41.8%
pow1/241.8%
pow1/243.6%
pow-prod-down30.2%
pow230.2%
associate-*l*30.2%
associate-*r*29.6%
Applied egg-rr29.6%
unpow1/229.6%
unpow229.6%
rem-sqrt-square39.9%
associate-*r*44.2%
Simplified44.2%
if 4.999999999999985e-310 < t < 1.8999999999999999e-49 or 9.2000000000000005e195 < t Initial program 47.4%
Simplified51.5%
associate-*r*52.7%
fma-undefine52.7%
associate-*r/46.1%
associate-*r*47.4%
associate--l-47.4%
associate-*r*47.4%
*-commutative47.4%
sqrt-prod51.0%
Applied egg-rr49.7%
Taylor expanded in t around inf 47.5%
Final simplification45.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (sqrt (fabs (* 2.0 (* U (* n t)))))))
(if (<= t 1.4e-308)
t_1
(if (<= t 7.5e-48)
(* (sqrt t) (sqrt (* (* 2.0 n) U)))
(if (<= t 3.2e+195) t_1 (* (sqrt t) (sqrt (* 2.0 (* n U)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt(fabs((2.0 * (U * (n * t)))));
double tmp;
if (t <= 1.4e-308) {
tmp = t_1;
} else if (t <= 7.5e-48) {
tmp = sqrt(t) * sqrt(((2.0 * n) * U));
} else if (t <= 3.2e+195) {
tmp = t_1;
} else {
tmp = sqrt(t) * sqrt((2.0 * (n * U)));
}
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) :: t_1
real(8) :: tmp
t_1 = sqrt(abs((2.0d0 * (u * (n * t)))))
if (t <= 1.4d-308) then
tmp = t_1
else if (t <= 7.5d-48) then
tmp = sqrt(t) * sqrt(((2.0d0 * n) * u))
else if (t <= 3.2d+195) then
tmp = t_1
else
tmp = sqrt(t) * sqrt((2.0d0 * (n * u)))
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 t_1 = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
double tmp;
if (t <= 1.4e-308) {
tmp = t_1;
} else if (t <= 7.5e-48) {
tmp = Math.sqrt(t) * Math.sqrt(((2.0 * n) * U));
} else if (t <= 3.2e+195) {
tmp = t_1;
} else {
tmp = Math.sqrt(t) * Math.sqrt((2.0 * (n * U)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt(math.fabs((2.0 * (U * (n * t))))) tmp = 0 if t <= 1.4e-308: tmp = t_1 elif t <= 7.5e-48: tmp = math.sqrt(t) * math.sqrt(((2.0 * n) * U)) elif t <= 3.2e+195: tmp = t_1 else: tmp = math.sqrt(t) * math.sqrt((2.0 * (n * U))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t))))) tmp = 0.0 if (t <= 1.4e-308) tmp = t_1; elseif (t <= 7.5e-48) tmp = Float64(sqrt(t) * sqrt(Float64(Float64(2.0 * n) * U))); elseif (t <= 3.2e+195) tmp = t_1; else tmp = Float64(sqrt(t) * sqrt(Float64(2.0 * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(abs((2.0 * (U * (n * t))))); tmp = 0.0; if (t <= 1.4e-308) tmp = t_1; elseif (t <= 7.5e-48) tmp = sqrt(t) * sqrt(((2.0 * n) * U)); elseif (t <= 3.2e+195) tmp = t_1; else tmp = sqrt(t) * sqrt((2.0 * (n * U))); 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[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.4e-308], t$95$1, If[LessEqual[t, 7.5e-48], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+195], t$95$1, N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\
\mathbf{if}\;t \leq 1.4 \cdot 10^{-308}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-48}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{\left(2 \cdot n\right) \cdot U}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+195}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t} \cdot \sqrt{2 \cdot \left(n \cdot U\right)}\\
\end{array}
\end{array}
if t < 1.4000000000000002e-308 or 7.50000000000000042e-48 < t < 3.19999999999999982e195Initial program 49.1%
Simplified54.5%
Taylor expanded in t around inf 41.8%
associate-*r*41.8%
Simplified41.8%
add-sqr-sqrt41.8%
pow1/241.8%
pow1/243.6%
pow-prod-down30.2%
pow230.2%
associate-*l*30.2%
associate-*r*29.6%
Applied egg-rr29.6%
unpow1/229.6%
unpow229.6%
rem-sqrt-square39.9%
associate-*r*44.2%
Simplified44.2%
if 1.4000000000000002e-308 < t < 7.50000000000000042e-48Initial program 43.3%
Simplified47.2%
pow147.2%
Applied egg-rr47.2%
unpow147.2%
associate-*r*47.2%
Simplified47.2%
Taylor expanded in t around inf 13.6%
associate-*r*23.0%
Simplified23.0%
pow1/225.0%
associate-*r*25.0%
unpow-prod-down38.1%
*-commutative38.1%
pow1/238.1%
Applied egg-rr38.1%
*-commutative38.1%
unpow1/236.1%
associate-*r*36.1%
*-commutative36.1%
*-commutative36.1%
Simplified36.1%
if 3.19999999999999982e195 < t Initial program 55.7%
Simplified60.1%
associate-*r*63.7%
fma-undefine63.7%
associate-*r/55.7%
associate-*r*55.7%
associate--l-55.7%
associate-*r*55.7%
*-commutative55.7%
sqrt-prod62.3%
Applied egg-rr62.3%
Taylor expanded in t around inf 70.9%
Final simplification45.1%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* (* 2.0 n) (* U (+ t (/ (* U* (/ (* n (pow l_m 2.0)) Om)) Om))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * pow(l_m, 2.0)) / Om)) / Om)))));
}
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 * n) * (u * (t + ((u_42 * ((n * (l_m ** 2.0d0)) / om)) / om)))))
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 * n) * (U * (t + ((U_42_ * ((n * Math.pow(l_m, 2.0)) / Om)) / Om)))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * math.pow(l_m, 2.0)) / Om)) / Om)))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(U_42_ * Float64(Float64(n * (l_m ^ 2.0)) / Om)) / Om))))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * (l_m ^ 2.0)) / Om)) / Om))))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(U$42$ * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{U* \cdot \frac{n \cdot {l\_m}^{2}}{Om}}{Om}\right)\right)}
\end{array}
Initial program 48.6%
Simplified53.4%
Taylor expanded in Om around inf 44.3%
Taylor expanded in l around 0 49.9%
Taylor expanded in U* around inf 48.1%
mul-1-neg48.1%
associate-/l*49.1%
distribute-rgt-neg-in49.1%
distribute-neg-frac249.1%
*-commutative49.1%
Simplified49.1%
Final simplification49.1%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 1.58e-193) (sqrt (* 2.0 (* t (* n U)))) (pow (* 2.0 (* U (* n t))) 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 <= 1.58e-193) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = pow((2.0 * (U * (n * t))), 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 <= 1.58d-193) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = (2.0d0 * (u * (n * t))) ** 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 <= 1.58e-193) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 1.58e-193: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.pow((2.0 * (U * (n * t))), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 1.58e-193) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 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 <= 1.58e-193) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = (2.0 * (U * (n * t))) ^ 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, 1.58e-193], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.58 \cdot 10^{-193}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.5800000000000001e-193Initial program 51.0%
Simplified53.5%
pow153.5%
Applied egg-rr53.5%
unpow153.5%
associate-*r*54.8%
Simplified54.8%
Taylor expanded in t around inf 36.6%
associate-*r*38.9%
Simplified38.9%
if 1.5800000000000001e-193 < l Initial program 44.7%
Simplified53.1%
Taylor expanded in l around 0 34.5%
pow1/234.6%
associate-*r*35.5%
*-commutative35.5%
associate-*r*35.6%
Applied egg-rr35.6%
Final simplification37.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (pow (* 2.0 (* t (* n 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((2.0 * (t * (n * 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 = (2.0d0 * (t * (n * 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((2.0 * (t * (n * U))), 0.5);
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.pow((2.0 * (t * (n * U))), 0.5)
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5 end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = (2.0 * (t * (n * U))) ^ 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[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}
\end{array}
Initial program 48.6%
Simplified54.4%
Taylor expanded in t around inf 36.2%
associate-*r*36.2%
Simplified36.2%
associate-*l*36.2%
rem-cube-cbrt36.0%
pow1/237.6%
rem-cube-cbrt37.9%
associate-*r*38.8%
Applied egg-rr38.8%
Final simplification38.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U 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 * (n * (U * 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 * (n * (u * 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 * (n * (U * t))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * (n * (U * t))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * t)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((2.0 * (n * (U * t)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Initial program 48.6%
Simplified53.4%
Taylor expanded in l around 0 35.5%
Final simplification35.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* t (* n U)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((2.0 * (t * (n * U))));
}
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 * (t * (n * u))))
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 * (t * (n * U))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * (t * (n * U))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * Float64(t * Float64(n * U)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((2.0 * (t * (n * U)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}
\end{array}
Initial program 48.6%
Simplified53.4%
pow153.4%
Applied egg-rr53.4%
unpow153.4%
associate-*r*53.8%
Simplified53.8%
Taylor expanded in t around inf 36.2%
associate-*r*37.2%
Simplified37.2%
Final simplification37.2%
herbie shell --seed 2024095
(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*))))))