
(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 18 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}
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))))
(if (<= t_2 0.0)
(*
(sqrt (* 2.0 n))
(sqrt (* U (- t (fma 2.0 (* l (/ l Om)) (* t_1 (- U U*)))))))
(if (<= t_2 1e+151)
t_2
(*
(sqrt (* (* n U) (+ (* (/ n Om) (/ U* Om)) (/ -2.0 Om))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * pow((l / Om), 2.0);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, (l * (l / Om)), (t_1 * (U - U_42_))))));
} else if (t_2 <= 1e+151) {
tmp = t_2;
} else {
tmp = sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * sqrt(2.0));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U))))) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(t_1 * Float64(U - U_42_))))))); elseif (t_2 <= 1e+151) tmp = t_2; else tmp = Float64(sqrt(Float64(Float64(n * U) * Float64(Float64(Float64(n / Om) * Float64(U_42_ / Om)) + Float64(-2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $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 * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+151], t$95$2, N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, t_1 \cdot \left(U - U*\right)\right)\right)}\\
\mathbf{elif}\;t_2 \leq 10^{+151}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \frac{-2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 7.2%
Simplified7.2%
pow1/27.2%
fma-udef7.2%
associate-*l/7.2%
associate-*r*7.2%
*-commutative7.2%
associate--l-7.2%
associate-*r*7.2%
associate-*l*37.0%
Applied egg-rr41.6%
*-commutative41.6%
unpow1/241.6%
Simplified41.6%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.00000000000000002e151Initial program 97.8%
if 1.00000000000000002e151 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 24.2%
Simplified30.4%
Taylor expanded in U around 0 22.4%
+-commutative22.4%
mul-1-neg22.4%
unsub-neg22.4%
associate-*r/22.4%
*-commutative22.4%
associate-*r/22.4%
unpow222.4%
metadata-eval22.4%
associate-*r/22.4%
associate-*l*22.5%
associate-*r/22.5%
metadata-eval22.5%
associate-/l*21.6%
unpow221.6%
times-frac23.5%
unpow223.5%
associate-/r*34.0%
Simplified34.0%
Taylor expanded in l around inf 23.5%
associate-*r*25.4%
*-commutative25.4%
sub-neg25.4%
*-commutative25.4%
unpow225.4%
times-frac27.1%
associate-*r/27.1%
metadata-eval27.1%
distribute-neg-frac27.1%
metadata-eval27.1%
Simplified27.1%
Final simplification58.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(sqrt (* 2.0 (* U (* n (- t (/ 2.0 (/ Om (* l l))))))))
(if (<= t_1 1e+151)
t_1
(*
(sqrt (* (* n U) (+ (* (/ n Om) (/ U* Om)) (/ -2.0 Om))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
} else if (t_1 <= 1e+151) {
tmp = t_1;
} else {
tmp = sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * sqrt(2.0));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 0.0d0) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 / (om / (l * l))))))))
else if (t_1 <= 1d+151) then
tmp = t_1
else
tmp = sqrt(((n * u) * (((n / om) * (u_42 / om)) + ((-2.0d0) / om)))) * (l * sqrt(2.0d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
} else if (t_1 <= 1e+151) {
tmp = t_1;
} else {
tmp = Math.sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))) elif t_1 <= 1e+151: tmp = t_1 else: tmp = math.sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = 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_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 / Float64(Om / Float64(l * l)))))))); elseif (t_1 <= 1e+151) tmp = t_1; else tmp = Float64(sqrt(Float64(Float64(n * U) * Float64(Float64(Float64(n / Om) * Float64(U_42_ / Om)) + Float64(-2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))); elseif (t_1 <= 1e+151) tmp = t_1; else tmp = sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * sqrt(2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = 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$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 1e+151], t$95$1, N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \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)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2}{\frac{Om}{\ell \cdot \ell}}\right)\right)\right)}\\
\mathbf{elif}\;t_1 \leq 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \frac{-2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 7.2%
Simplified7.2%
Taylor expanded in n around 0 34.0%
associate-*r/34.0%
associate-/l*34.1%
unpow234.1%
Simplified34.1%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.00000000000000002e151Initial program 97.8%
if 1.00000000000000002e151 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 24.2%
Simplified30.4%
Taylor expanded in U around 0 22.4%
+-commutative22.4%
mul-1-neg22.4%
unsub-neg22.4%
associate-*r/22.4%
*-commutative22.4%
associate-*r/22.4%
unpow222.4%
metadata-eval22.4%
associate-*r/22.4%
associate-*l*22.5%
associate-*r/22.5%
metadata-eval22.5%
associate-/l*21.6%
unpow221.6%
times-frac23.5%
unpow223.5%
associate-/r*34.0%
Simplified34.0%
Taylor expanded in l around inf 23.5%
associate-*r*25.4%
*-commutative25.4%
sub-neg25.4%
*-commutative25.4%
unpow225.4%
times-frac27.1%
associate-*r/27.1%
metadata-eval27.1%
distribute-neg-frac27.1%
metadata-eval27.1%
Simplified27.1%
Final simplification57.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(sqrt
(fma
2.0
(*
n
(*
U
(+ t (fma -2.0 (* l (/ l Om)) (/ U* (* (/ (/ Om l) l) (/ Om n)))))))
(* -2.0 (* (/ (* l (* l (* n n))) Om) (/ (* U U) Om)))))
(if (<= t_1 1e+151)
t_1
(*
(sqrt (* (* n U) (+ (* (/ n Om) (/ U* Om)) (/ -2.0 Om))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt(fma(2.0, (n * (U * (t + fma(-2.0, (l * (l / Om)), (U_42_ / (((Om / l) / l) * (Om / n))))))), (-2.0 * (((l * (l * (n * n))) / Om) * ((U * U) / Om)))));
} else if (t_1 <= 1e+151) {
tmp = t_1;
} else {
tmp = sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * sqrt(2.0));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = 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_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(fma(2.0, Float64(n * Float64(U * Float64(t + fma(-2.0, Float64(l * Float64(l / Om)), Float64(U_42_ / Float64(Float64(Float64(Om / l) / l) * Float64(Om / n))))))), Float64(-2.0 * Float64(Float64(Float64(l * Float64(l * Float64(n * n))) / Om) * Float64(Float64(U * U) / Om))))); elseif (t_1 <= 1e+151) tmp = t_1; else tmp = Float64(sqrt(Float64(Float64(n * U) * Float64(Float64(Float64(n / Om) * Float64(U_42_ / Om)) + Float64(-2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = 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$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(U$42$ / N[(N[(N[(Om / l), $MachinePrecision] / l), $MachinePrecision] * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(N[(N[(l * N[(l * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[(N[(U * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 1e+151], t$95$1, N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \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)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot \left(t + \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, \frac{U*}{\frac{\frac{Om}{\ell}}{\ell} \cdot \frac{Om}{n}}\right)\right)\right), -2 \cdot \left(\frac{\ell \cdot \left(\ell \cdot \left(n \cdot n\right)\right)}{Om} \cdot \frac{U \cdot U}{Om}\right)\right)}\\
\mathbf{elif}\;t_1 \leq 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \frac{-2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 7.2%
Simplified7.2%
Taylor expanded in U around 0 33.3%
Simplified37.1%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.00000000000000002e151Initial program 97.8%
if 1.00000000000000002e151 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 24.2%
Simplified30.4%
Taylor expanded in U around 0 22.4%
+-commutative22.4%
mul-1-neg22.4%
unsub-neg22.4%
associate-*r/22.4%
*-commutative22.4%
associate-*r/22.4%
unpow222.4%
metadata-eval22.4%
associate-*r/22.4%
associate-*l*22.5%
associate-*r/22.5%
metadata-eval22.5%
associate-/l*21.6%
unpow221.6%
times-frac23.5%
unpow223.5%
associate-/r*34.0%
Simplified34.0%
Taylor expanded in l around inf 23.5%
associate-*r*25.4%
*-commutative25.4%
sub-neg25.4%
*-commutative25.4%
unpow225.4%
times-frac27.1%
associate-*r/27.1%
metadata-eval27.1%
distribute-neg-frac27.1%
metadata-eval27.1%
Simplified27.1%
Final simplification57.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n U))))
(if (<= l 2e-114)
(sqrt
(*
t_1
(+
(+ t (* (/ (* l l) Om) -2.0))
(* n (* (pow (/ l Om) 2.0) (- U* U))))))
(if (<= l 2.1e+172)
(sqrt
(* t_1 (+ t (* l (* l (- (* (/ n Om) (/ (- U* U) Om)) (/ 2.0 Om)))))))
(*
(sqrt (* (* n U) (+ (* (/ n Om) (/ U* Om)) (/ -2.0 Om))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (l <= 2e-114) {
tmp = sqrt((t_1 * ((t + (((l * l) / Om) * -2.0)) + (n * (pow((l / Om), 2.0) * (U_42_ - U))))));
} else if (l <= 2.1e+172) {
tmp = sqrt((t_1 * (t + (l * (l * (((n / Om) * ((U_42_ - U) / Om)) - (2.0 / Om)))))));
} else {
tmp = sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * sqrt(2.0));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (n * u)
if (l <= 2d-114) then
tmp = sqrt((t_1 * ((t + (((l * l) / om) * (-2.0d0))) + (n * (((l / om) ** 2.0d0) * (u_42 - u))))))
else if (l <= 2.1d+172) then
tmp = sqrt((t_1 * (t + (l * (l * (((n / om) * ((u_42 - u) / om)) - (2.0d0 / om)))))))
else
tmp = sqrt(((n * u) * (((n / om) * (u_42 / om)) + ((-2.0d0) / om)))) * (l * sqrt(2.0d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if (l <= 2e-114) {
tmp = Math.sqrt((t_1 * ((t + (((l * l) / Om) * -2.0)) + (n * (Math.pow((l / Om), 2.0) * (U_42_ - U))))));
} else if (l <= 2.1e+172) {
tmp = Math.sqrt((t_1 * (t + (l * (l * (((n / Om) * ((U_42_ - U) / Om)) - (2.0 / Om)))))));
} else {
tmp = Math.sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) tmp = 0 if l <= 2e-114: tmp = math.sqrt((t_1 * ((t + (((l * l) / Om) * -2.0)) + (n * (math.pow((l / Om), 2.0) * (U_42_ - U)))))) elif l <= 2.1e+172: tmp = math.sqrt((t_1 * (t + (l * (l * (((n / Om) * ((U_42_ - U) / Om)) - (2.0 / Om))))))) else: tmp = math.sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) tmp = 0.0 if (l <= 2e-114) tmp = sqrt(Float64(t_1 * Float64(Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U)))))); elseif (l <= 2.1e+172) tmp = sqrt(Float64(t_1 * Float64(t + Float64(l * Float64(l * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) - Float64(2.0 / Om))))))); else tmp = Float64(sqrt(Float64(Float64(n * U) * Float64(Float64(Float64(n / Om) * Float64(U_42_ / Om)) + Float64(-2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (n * U); tmp = 0.0; if (l <= 2e-114) tmp = sqrt((t_1 * ((t + (((l * l) / Om) * -2.0)) + (n * (((l / Om) ^ 2.0) * (U_42_ - U)))))); elseif (l <= 2.1e+172) tmp = sqrt((t_1 * (t + (l * (l * (((n / Om) * ((U_42_ - U) / Om)) - (2.0 / Om))))))); else tmp = sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * sqrt(2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 2e-114], N[Sqrt[N[(t$95$1 * N[(N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.1e+172], N[Sqrt[N[(t$95$1 * N[(t + N[(l * N[(l * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
\mathbf{if}\;\ell \leq 2 \cdot 10^{-114}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.1 \cdot 10^{+172}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} - \frac{2}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \frac{-2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if l < 2.0000000000000001e-114Initial program 58.8%
Simplified57.6%
if 2.0000000000000001e-114 < l < 2.1000000000000001e172Initial program 53.1%
Simplified59.0%
Taylor expanded in l around 0 51.3%
unpow251.3%
associate-*l*57.1%
associate-*r/57.1%
metadata-eval57.1%
*-commutative57.1%
unpow257.1%
times-frac57.6%
Simplified57.6%
if 2.1000000000000001e172 < l Initial program 16.0%
Simplified19.3%
Taylor expanded in U around 0 11.0%
+-commutative11.0%
mul-1-neg11.0%
unsub-neg11.0%
associate-*r/11.0%
*-commutative11.0%
associate-*r/11.0%
unpow211.0%
metadata-eval11.0%
associate-*r/11.0%
associate-*l*11.0%
associate-*r/11.0%
metadata-eval11.0%
associate-/l*11.0%
unpow211.0%
times-frac14.7%
unpow214.7%
associate-/r*18.6%
Simplified18.6%
Taylor expanded in l around inf 63.8%
associate-*r*70.0%
*-commutative70.0%
sub-neg70.0%
*-commutative70.0%
unpow270.0%
times-frac73.6%
associate-*r/73.6%
metadata-eval73.6%
distribute-neg-frac73.6%
metadata-eval73.6%
Simplified73.6%
Final simplification59.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.7e+174)
(sqrt
(*
(* 2.0 (* n U))
(+ t (- (/ U* (* (/ (/ Om l) l) (/ Om n))) (* l (* l (/ 2.0 Om)))))))
(*
(* l (sqrt 2.0))
(sqrt (* U (* n (- (/ U* (/ (* Om Om) n)) (/ 2.0 Om))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.7e+174) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om)))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((U * (n * ((U_42_ / ((Om * Om) / n)) - (2.0 / Om)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.7d+174) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + ((u_42 / (((om / l) / l) * (om / n))) - (l * (l * (2.0d0 / om)))))))
else
tmp = (l * sqrt(2.0d0)) * sqrt((u * (n * ((u_42 / ((om * om) / n)) - (2.0d0 / om)))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.7e+174) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om)))))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((U * (n * ((U_42_ / ((Om * Om) / n)) - (2.0 / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.7e+174: tmp = math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om))))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((U * (n * ((U_42_ / ((Om * Om) / n)) - (2.0 / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.7e+174) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(U_42_ / Float64(Float64(Float64(Om / l) / l) * Float64(Om / n))) - Float64(l * Float64(l * Float64(2.0 / Om))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(U_42_ / Float64(Float64(Om * Om) / n)) - Float64(2.0 / Om)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.7e+174) tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om))))))); else tmp = (l * sqrt(2.0)) * sqrt((U * (n * ((U_42_ / ((Om * Om) / n)) - (2.0 / Om))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.7e+174], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(U$42$ / N[(N[(N[(Om / l), $MachinePrecision] / l), $MachinePrecision] * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * N[(l * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(U$42$ / N[(N[(Om * Om), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.7 \cdot 10^{+174}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\frac{U*}{\frac{\frac{Om}{\ell}}{\ell} \cdot \frac{Om}{n}} - \ell \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{U*}{\frac{Om \cdot Om}{n}} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 1.7000000000000001e174Initial program 57.5%
Simplified57.3%
Taylor expanded in U around 0 48.5%
+-commutative48.5%
mul-1-neg48.5%
unsub-neg48.5%
associate-*r/48.5%
*-commutative48.5%
associate-*r/48.5%
unpow248.5%
metadata-eval48.5%
associate-*r/48.5%
associate-*l*48.5%
associate-*r/48.5%
metadata-eval48.5%
associate-/l*49.8%
unpow249.8%
times-frac53.8%
unpow253.8%
associate-/r*60.2%
Simplified60.2%
if 1.7000000000000001e174 < l Initial program 16.0%
Simplified19.3%
Taylor expanded in U around 0 11.0%
+-commutative11.0%
mul-1-neg11.0%
unsub-neg11.0%
associate-*r/11.0%
*-commutative11.0%
associate-*r/11.0%
unpow211.0%
metadata-eval11.0%
associate-*r/11.0%
associate-*l*11.0%
associate-*r/11.0%
metadata-eval11.0%
associate-/l*11.0%
unpow211.0%
times-frac14.7%
unpow214.7%
associate-/r*18.6%
Simplified18.6%
Taylor expanded in l around inf 63.8%
associate-/l*67.3%
unpow267.3%
associate-*r/67.3%
metadata-eval67.3%
Simplified67.3%
Final simplification61.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.15e+172)
(sqrt
(*
(* 2.0 (* n U))
(+ t (- (/ U* (* (/ (/ Om l) l) (/ Om n))) (* l (* l (/ 2.0 Om)))))))
(*
(sqrt (* (* n U) (+ (* (/ n Om) (/ U* Om)) (/ -2.0 Om))))
(* l (sqrt 2.0)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.15e+172) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om)))))));
} else {
tmp = sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * sqrt(2.0));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.15d+172) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + ((u_42 / (((om / l) / l) * (om / n))) - (l * (l * (2.0d0 / om)))))))
else
tmp = sqrt(((n * u) * (((n / om) * (u_42 / om)) + ((-2.0d0) / om)))) * (l * sqrt(2.0d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.15e+172) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om)))))));
} else {
tmp = Math.sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.15e+172: tmp = math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om))))))) else: tmp = math.sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.15e+172) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(U_42_ / Float64(Float64(Float64(Om / l) / l) * Float64(Om / n))) - Float64(l * Float64(l * Float64(2.0 / Om))))))); else tmp = Float64(sqrt(Float64(Float64(n * U) * Float64(Float64(Float64(n / Om) * Float64(U_42_ / Om)) + Float64(-2.0 / Om)))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.15e+172) tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om))))))); else tmp = sqrt(((n * U) * (((n / Om) * (U_42_ / Om)) + (-2.0 / Om)))) * (l * sqrt(2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.15e+172], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(U$42$ / N[(N[(N[(Om / l), $MachinePrecision] / l), $MachinePrecision] * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * N[(l * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.15 \cdot 10^{+172}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\frac{U*}{\frac{\frac{Om}{\ell}}{\ell} \cdot \frac{Om}{n}} - \ell \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} + \frac{-2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if l < 1.15e172Initial program 57.5%
Simplified57.3%
Taylor expanded in U around 0 48.5%
+-commutative48.5%
mul-1-neg48.5%
unsub-neg48.5%
associate-*r/48.5%
*-commutative48.5%
associate-*r/48.5%
unpow248.5%
metadata-eval48.5%
associate-*r/48.5%
associate-*l*48.5%
associate-*r/48.5%
metadata-eval48.5%
associate-/l*49.8%
unpow249.8%
times-frac53.8%
unpow253.8%
associate-/r*60.2%
Simplified60.2%
if 1.15e172 < l Initial program 16.0%
Simplified19.3%
Taylor expanded in U around 0 11.0%
+-commutative11.0%
mul-1-neg11.0%
unsub-neg11.0%
associate-*r/11.0%
*-commutative11.0%
associate-*r/11.0%
unpow211.0%
metadata-eval11.0%
associate-*r/11.0%
associate-*l*11.0%
associate-*r/11.0%
metadata-eval11.0%
associate-/l*11.0%
unpow211.0%
times-frac14.7%
unpow214.7%
associate-/r*18.6%
Simplified18.6%
Taylor expanded in l around inf 63.8%
associate-*r*70.0%
*-commutative70.0%
sub-neg70.0%
*-commutative70.0%
unpow270.0%
times-frac73.6%
associate-*r/73.6%
metadata-eval73.6%
distribute-neg-frac73.6%
metadata-eval73.6%
Simplified73.6%
Final simplification61.8%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= t -5.5e+137)
(sqrt (* 2.0 (* U (* n (- t (/ 2.0 (/ Om (* l l))))))))
(if (<= t 7e+267)
(sqrt
(*
(* 2.0 (* n U))
(+ t (* l (* l (- (* (/ n Om) (/ (- U* U) Om)) (/ 2.0 Om)))))))
(sqrt (* 2.0 (* n (* U t)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -5.5e+137) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
} else if (t <= 7e+267) {
tmp = sqrt(((2.0 * (n * U)) * (t + (l * (l * (((n / Om) * ((U_42_ - U) / Om)) - (2.0 / Om)))))));
} else {
tmp = sqrt((2.0 * (n * (U * t))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= (-5.5d+137)) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 / (om / (l * l))))))))
else if (t <= 7d+267) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + (l * (l * (((n / om) * ((u_42 - u) / om)) - (2.0d0 / om)))))))
else
tmp = sqrt((2.0d0 * (n * (u * t))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -5.5e+137) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
} else if (t <= 7e+267) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (l * (l * (((n / Om) * ((U_42_ - U) / Om)) - (2.0 / Om)))))));
} else {
tmp = Math.sqrt((2.0 * (n * (U * t))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -5.5e+137: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))) elif t <= 7e+267: tmp = math.sqrt(((2.0 * (n * U)) * (t + (l * (l * (((n / Om) * ((U_42_ - U) / Om)) - (2.0 / Om))))))) else: tmp = math.sqrt((2.0 * (n * (U * t)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -5.5e+137) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 / Float64(Om / Float64(l * l)))))))); elseif (t <= 7e+267) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(l * Float64(l * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) - Float64(2.0 / Om))))))); else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -5.5e+137) tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))); elseif (t <= 7e+267) tmp = sqrt(((2.0 * (n * U)) * (t + (l * (l * (((n / Om) * ((U_42_ - U) / Om)) - (2.0 / Om))))))); else tmp = sqrt((2.0 * (n * (U * t)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -5.5e+137], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 7e+267], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(l * N[(l * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+137}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2}{\frac{Om}{\ell \cdot \ell}}\right)\right)\right)}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+267}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} - \frac{2}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if t < -5.5000000000000002e137Initial program 39.0%
Simplified38.9%
Taylor expanded in n around 0 53.5%
associate-*r/53.5%
associate-/l*53.5%
unpow253.5%
Simplified53.5%
if -5.5000000000000002e137 < t < 6.9999999999999998e267Initial program 55.0%
Simplified55.7%
Taylor expanded in l around 0 48.4%
unpow248.4%
associate-*l*54.0%
associate-*r/54.0%
metadata-eval54.0%
*-commutative54.0%
unpow254.0%
times-frac59.3%
Simplified59.3%
if 6.9999999999999998e267 < t Initial program 51.2%
Simplified38.7%
Taylor expanded in t around inf 51.4%
*-commutative51.4%
associate-*l*75.4%
Simplified75.4%
Final simplification59.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.15e+171)
(sqrt
(*
(* 2.0 (* n U))
(+ t (- (/ U* (* (/ (/ Om l) l) (/ Om n))) (* l (* l (/ 2.0 Om)))))))
(sqrt
(*
(* (- (/ 2.0 Om) (* (/ n Om) (/ (- U* U) Om))) (* l (* n l)))
(* U -2.0)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.15e+171) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om)))))));
} else {
tmp = sqrt(((((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (l * (n * l))) * (U * -2.0)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.15d+171) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + ((u_42 / (((om / l) / l) * (om / n))) - (l * (l * (2.0d0 / om)))))))
else
tmp = sqrt(((((2.0d0 / om) - ((n / om) * ((u_42 - u) / om))) * (l * (n * l))) * (u * (-2.0d0))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.15e+171) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om)))))));
} else {
tmp = Math.sqrt(((((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (l * (n * l))) * (U * -2.0)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.15e+171: tmp = math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om))))))) else: tmp = math.sqrt(((((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (l * (n * l))) * (U * -2.0))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.15e+171) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(U_42_ / Float64(Float64(Float64(Om / l) / l) * Float64(Om / n))) - Float64(l * Float64(l * Float64(2.0 / Om))))))); else tmp = sqrt(Float64(Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om))) * Float64(l * Float64(n * l))) * Float64(U * -2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.15e+171) tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ / (((Om / l) / l) * (Om / n))) - (l * (l * (2.0 / Om))))))); else tmp = sqrt(((((2.0 / Om) - ((n / Om) * ((U_42_ - U) / Om))) * (l * (n * l))) * (U * -2.0))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.15e+171], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(U$42$ / N[(N[(N[(Om / l), $MachinePrecision] / l), $MachinePrecision] * N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * N[(l * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.15 \cdot 10^{+171}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\frac{U*}{\frac{\frac{Om}{\ell}}{\ell} \cdot \frac{Om}{n}} - \ell \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(\frac{2}{Om} - \frac{n}{Om} \cdot \frac{U* - U}{Om}\right) \cdot \left(\ell \cdot \left(n \cdot \ell\right)\right)\right) \cdot \left(U \cdot -2\right)}\\
\end{array}
\end{array}
if l < 1.15000000000000009e171Initial program 57.5%
Simplified57.3%
Taylor expanded in U around 0 48.5%
+-commutative48.5%
mul-1-neg48.5%
unsub-neg48.5%
associate-*r/48.5%
*-commutative48.5%
associate-*r/48.5%
unpow248.5%
metadata-eval48.5%
associate-*r/48.5%
associate-*l*48.5%
associate-*r/48.5%
metadata-eval48.5%
associate-/l*49.8%
unpow249.8%
times-frac53.8%
unpow253.8%
associate-/r*60.2%
Simplified60.2%
if 1.15000000000000009e171 < l Initial program 16.0%
Simplified19.3%
Taylor expanded in t around 0 14.0%
*-commutative14.0%
*-commutative14.0%
associate-*l*14.0%
Simplified44.4%
Final simplification58.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= n -3.6e-283) (not (<= n 1.22e-33)))
(sqrt
(*
(* 2.0 (* n U))
(+ t (* l (* l (- (/ U* (/ (* Om Om) n)) (/ 2.0 Om)))))))
(sqrt (* 2.0 (* U (* n (- t (/ 2.0 (/ Om (* l l))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -3.6e-283) || !(n <= 1.22e-33)) {
tmp = sqrt(((2.0 * (n * U)) * (t + (l * (l * ((U_42_ / ((Om * Om) / n)) - (2.0 / Om)))))));
} else {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((n <= (-3.6d-283)) .or. (.not. (n <= 1.22d-33))) then
tmp = sqrt(((2.0d0 * (n * u)) * (t + (l * (l * ((u_42 / ((om * om) / n)) - (2.0d0 / om)))))))
else
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 / (om / (l * l))))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((n <= -3.6e-283) || !(n <= 1.22e-33)) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + (l * (l * ((U_42_ / ((Om * Om) / n)) - (2.0 / Om)))))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (n <= -3.6e-283) or not (n <= 1.22e-33): tmp = math.sqrt(((2.0 * (n * U)) * (t + (l * (l * ((U_42_ / ((Om * Om) / n)) - (2.0 / Om))))))) else: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((n <= -3.6e-283) || !(n <= 1.22e-33)) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(l * Float64(l * Float64(Float64(U_42_ / Float64(Float64(Om * Om) / n)) - Float64(2.0 / Om))))))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 / Float64(Om / Float64(l * l)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((n <= -3.6e-283) || ~((n <= 1.22e-33))) tmp = sqrt(((2.0 * (n * U)) * (t + (l * (l * ((U_42_ / ((Om * Om) / n)) - (2.0 / Om))))))); else tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[n, -3.6e-283], N[Not[LessEqual[n, 1.22e-33]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(l * N[(l * N[(N[(U$42$ / N[(N[(Om * Om), $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -3.6 \cdot 10^{-283} \lor \neg \left(n \leq 1.22 \cdot 10^{-33}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{U*}{\frac{Om \cdot Om}{n}} - \frac{2}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2}{\frac{Om}{\ell \cdot \ell}}\right)\right)\right)}\\
\end{array}
\end{array}
if n < -3.6e-283 or 1.22e-33 < n Initial program 55.7%
Simplified55.4%
Taylor expanded in l around 0 49.4%
unpow249.4%
associate-*l*55.2%
associate-*r/55.2%
metadata-eval55.2%
*-commutative55.2%
unpow255.2%
times-frac60.6%
Simplified60.6%
Taylor expanded in U around 0 56.3%
+-commutative56.3%
mul-1-neg56.3%
unsub-neg56.3%
associate-*r/56.3%
metadata-eval56.3%
associate-/l*60.6%
unpow260.6%
Simplified60.6%
if -3.6e-283 < n < 1.22e-33Initial program 44.3%
Simplified45.8%
Taylor expanded in n around 0 50.5%
associate-*r/50.5%
associate-/l*50.5%
unpow250.5%
Simplified50.5%
Final simplification58.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n U))))
(if (or (<= U* -7.8e+67) (not (<= U* 8.2e-34)))
(sqrt (* t_1 (+ t (/ U* (* (/ Om n) (/ Om (* l l)))))))
(sqrt (* t_1 (- t (* l (* l (/ 2.0 Om)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if ((U_42_ <= -7.8e+67) || !(U_42_ <= 8.2e-34)) {
tmp = sqrt((t_1 * (t + (U_42_ / ((Om / n) * (Om / (l * l)))))));
} else {
tmp = sqrt((t_1 * (t - (l * (l * (2.0 / Om))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (n * u)
if ((u_42 <= (-7.8d+67)) .or. (.not. (u_42 <= 8.2d-34))) then
tmp = sqrt((t_1 * (t + (u_42 / ((om / n) * (om / (l * l)))))))
else
tmp = sqrt((t_1 * (t - (l * (l * (2.0d0 / om))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * U);
double tmp;
if ((U_42_ <= -7.8e+67) || !(U_42_ <= 8.2e-34)) {
tmp = Math.sqrt((t_1 * (t + (U_42_ / ((Om / n) * (Om / (l * l)))))));
} else {
tmp = Math.sqrt((t_1 * (t - (l * (l * (2.0 / Om))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * U) tmp = 0 if (U_42_ <= -7.8e+67) or not (U_42_ <= 8.2e-34): tmp = math.sqrt((t_1 * (t + (U_42_ / ((Om / n) * (Om / (l * l))))))) else: tmp = math.sqrt((t_1 * (t - (l * (l * (2.0 / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * U)) tmp = 0.0 if ((U_42_ <= -7.8e+67) || !(U_42_ <= 8.2e-34)) tmp = sqrt(Float64(t_1 * Float64(t + Float64(U_42_ / Float64(Float64(Om / n) * Float64(Om / Float64(l * l))))))); else tmp = sqrt(Float64(t_1 * Float64(t - Float64(l * Float64(l * Float64(2.0 / Om)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (n * U); tmp = 0.0; if ((U_42_ <= -7.8e+67) || ~((U_42_ <= 8.2e-34))) tmp = sqrt((t_1 * (t + (U_42_ / ((Om / n) * (Om / (l * l))))))); else tmp = sqrt((t_1 * (t - (l * (l * (2.0 / Om)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[U$42$, -7.8e+67], N[Not[LessEqual[U$42$, 8.2e-34]], $MachinePrecision]], N[Sqrt[N[(t$95$1 * N[(t + N[(U$42$ / N[(N[(Om / n), $MachinePrecision] * N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$1 * N[(t - N[(l * N[(l * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot U\right)\\
\mathbf{if}\;U* \leq -7.8 \cdot 10^{+67} \lor \neg \left(U* \leq 8.2 \cdot 10^{-34}\right):\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \frac{U*}{\frac{Om}{n} \cdot \frac{Om}{\ell \cdot \ell}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t - \ell \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if U* < -7.80000000000000013e67 or 8.2000000000000007e-34 < U* Initial program 50.9%
Simplified47.1%
Taylor expanded in U around 0 42.4%
+-commutative42.4%
mul-1-neg42.4%
unsub-neg42.4%
associate-*r/42.4%
*-commutative42.4%
associate-*r/42.4%
unpow242.4%
metadata-eval42.4%
associate-*r/42.4%
associate-*l*42.5%
associate-*r/42.5%
metadata-eval42.5%
associate-/l*45.3%
unpow245.3%
times-frac47.7%
unpow247.7%
associate-/r*52.6%
Simplified52.6%
Taylor expanded in Om around 0 48.6%
mul-1-neg48.6%
associate-/l*51.4%
unpow251.4%
times-frac53.8%
unpow253.8%
distribute-neg-frac53.8%
Simplified53.8%
if -7.80000000000000013e67 < U* < 8.2000000000000007e-34Initial program 55.1%
Simplified59.7%
Taylor expanded in Om around inf 51.8%
associate-*r/51.8%
*-commutative51.8%
associate-*r/51.8%
unpow251.8%
metadata-eval51.8%
associate-*r/51.8%
associate-*l*56.7%
associate-*r/56.7%
metadata-eval56.7%
Simplified56.7%
Final simplification55.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (sqrt (* (* 2.0 (* n U)) (- t (* l (* l (/ 2.0 Om))))))))
(if (<= Om -5.4e-19)
t_1
(if (<= Om 5.6e-145)
(sqrt (* 2.0 (* (* n U) (* (* (/ l Om) (/ l Om)) (* n (- U* U))))))
(if (<= Om 8e+150)
(sqrt (* 2.0 (* U (* n (- t (/ 2.0 (/ Om (* l l))))))))
t_1)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om))))));
double tmp;
if (Om <= -5.4e-19) {
tmp = t_1;
} else if (Om <= 5.6e-145) {
tmp = sqrt((2.0 * ((n * U) * (((l / Om) * (l / Om)) * (n * (U_42_ - U))))));
} else if (Om <= 8e+150) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((2.0d0 * (n * u)) * (t - (l * (l * (2.0d0 / om))))))
if (om <= (-5.4d-19)) then
tmp = t_1
else if (om <= 5.6d-145) then
tmp = sqrt((2.0d0 * ((n * u) * (((l / om) * (l / om)) * (n * (u_42 - u))))))
else if (om <= 8d+150) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 / (om / (l * l))))))))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om))))));
double tmp;
if (Om <= -5.4e-19) {
tmp = t_1;
} else if (Om <= 5.6e-145) {
tmp = Math.sqrt((2.0 * ((n * U) * (((l / Om) * (l / Om)) * (n * (U_42_ - U))))));
} else if (Om <= 8e+150) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om)))))) tmp = 0 if Om <= -5.4e-19: tmp = t_1 elif Om <= 5.6e-145: tmp = math.sqrt((2.0 * ((n * U) * (((l / Om) * (l / Om)) * (n * (U_42_ - U)))))) elif Om <= 8e+150: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))) else: tmp = t_1 return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(l * Float64(2.0 / Om)))))) tmp = 0.0 if (Om <= -5.4e-19) tmp = t_1; elseif (Om <= 5.6e-145) tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(Float64(Float64(l / Om) * Float64(l / Om)) * Float64(n * Float64(U_42_ - U)))))); elseif (Om <= 8e+150) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 / Float64(Om / Float64(l * l)))))))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om)))))); tmp = 0.0; if (Om <= -5.4e-19) tmp = t_1; elseif (Om <= 5.6e-145) tmp = sqrt((2.0 * ((n * U) * (((l / Om) * (l / Om)) * (n * (U_42_ - U)))))); elseif (Om <= 8e+150) tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(l * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -5.4e-19], t$95$1, If[LessEqual[Om, 5.6e-145], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(N[(N[(l / Om), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 8e+150], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)}\\
\mathbf{if}\;Om \leq -5.4 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;Om \leq 5.6 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\left(\frac{\ell}{Om} \cdot \frac{\ell}{Om}\right) \cdot \left(n \cdot \left(U* - U\right)\right)\right)\right)}\\
\mathbf{elif}\;Om \leq 8 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2}{\frac{Om}{\ell \cdot \ell}}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if Om < -5.4000000000000002e-19 or 7.99999999999999985e150 < Om Initial program 57.0%
Simplified58.2%
Taylor expanded in Om around inf 53.2%
associate-*r/53.2%
*-commutative53.2%
associate-*r/53.2%
unpow253.2%
metadata-eval53.2%
associate-*r/53.2%
associate-*l*60.8%
associate-*r/60.8%
metadata-eval60.8%
Simplified60.8%
if -5.4000000000000002e-19 < Om < 5.6000000000000002e-145Initial program 51.1%
Simplified47.0%
Taylor expanded in t around 0 26.6%
associate-*r*26.4%
*-commutative26.4%
associate-*l*26.6%
unpow226.6%
associate-*r/26.6%
*-commutative26.6%
*-commutative26.6%
associate-*l*26.6%
associate-*r/25.2%
associate-/l*25.3%
associate-*r/25.2%
unpow225.2%
associate-*l*25.3%
unpow225.3%
Simplified25.3%
Taylor expanded in Om around 0 36.6%
mul-1-neg36.6%
associate-/l*35.2%
distribute-neg-frac35.2%
unpow235.2%
unpow235.2%
Simplified35.2%
*-un-lft-identity35.2%
associate-/r/35.4%
distribute-rgt-neg-in35.4%
Applied egg-rr35.4%
*-lft-identity35.4%
associate-*r*35.1%
*-commutative35.1%
times-frac43.1%
Simplified43.1%
if 5.6000000000000002e-145 < Om < 7.99999999999999985e150Initial program 46.0%
Simplified47.2%
Taylor expanded in n around 0 51.3%
associate-*r/51.3%
associate-/l*51.3%
unpow251.3%
Simplified51.3%
Final simplification53.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (sqrt (* (* 2.0 (* n U)) (- t (* l (* l (/ 2.0 Om))))))))
(if (<= Om -6.5e-18)
t_1
(if (<= Om 1e-138)
(sqrt (* 2.0 (* (/ U Om) (/ (* U* (* (* n l) (* n l))) Om))))
(if (<= Om 8.5e+150)
(sqrt (* 2.0 (* U (* n (- t (/ 2.0 (/ Om (* l l))))))))
t_1)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om))))));
double tmp;
if (Om <= -6.5e-18) {
tmp = t_1;
} else if (Om <= 1e-138) {
tmp = sqrt((2.0 * ((U / Om) * ((U_42_ * ((n * l) * (n * l))) / Om))));
} else if (Om <= 8.5e+150) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt(((2.0d0 * (n * u)) * (t - (l * (l * (2.0d0 / om))))))
if (om <= (-6.5d-18)) then
tmp = t_1
else if (om <= 1d-138) then
tmp = sqrt((2.0d0 * ((u / om) * ((u_42 * ((n * l) * (n * l))) / om))))
else if (om <= 8.5d+150) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 / (om / (l * l))))))))
else
tmp = t_1
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om))))));
double tmp;
if (Om <= -6.5e-18) {
tmp = t_1;
} else if (Om <= 1e-138) {
tmp = Math.sqrt((2.0 * ((U / Om) * ((U_42_ * ((n * l) * (n * l))) / Om))));
} else if (Om <= 8.5e+150) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
} else {
tmp = t_1;
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om)))))) tmp = 0 if Om <= -6.5e-18: tmp = t_1 elif Om <= 1e-138: tmp = math.sqrt((2.0 * ((U / Om) * ((U_42_ * ((n * l) * (n * l))) / Om)))) elif Om <= 8.5e+150: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))) else: tmp = t_1 return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(l * Float64(2.0 / Om)))))) tmp = 0.0 if (Om <= -6.5e-18) tmp = t_1; elseif (Om <= 1e-138) tmp = sqrt(Float64(2.0 * Float64(Float64(U / Om) * Float64(Float64(U_42_ * Float64(Float64(n * l) * Float64(n * l))) / Om)))); elseif (Om <= 8.5e+150) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 / Float64(Om / Float64(l * l)))))))); else tmp = t_1; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om)))))); tmp = 0.0; if (Om <= -6.5e-18) tmp = t_1; elseif (Om <= 1e-138) tmp = sqrt((2.0 * ((U / Om) * ((U_42_ * ((n * l) * (n * l))) / Om)))); elseif (Om <= 8.5e+150) tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))); else tmp = t_1; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(l * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -6.5e-18], t$95$1, If[LessEqual[Om, 1e-138], N[Sqrt[N[(2.0 * N[(N[(U / Om), $MachinePrecision] * N[(N[(U$42$ * N[(N[(n * l), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 8.5e+150], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)}\\
\mathbf{if}\;Om \leq -6.5 \cdot 10^{-18}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;Om \leq 10^{-138}:\\
\;\;\;\;\sqrt{2 \cdot \left(\frac{U}{Om} \cdot \frac{U* \cdot \left(\left(n \cdot \ell\right) \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\
\mathbf{elif}\;Om \leq 8.5 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2}{\frac{Om}{\ell \cdot \ell}}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if Om < -6.50000000000000008e-18 or 8.4999999999999999e150 < Om Initial program 57.0%
Simplified58.2%
Taylor expanded in Om around inf 53.2%
associate-*r/53.2%
*-commutative53.2%
associate-*r/53.2%
unpow253.2%
metadata-eval53.2%
associate-*r/53.2%
associate-*l*60.8%
associate-*r/60.8%
metadata-eval60.8%
Simplified60.8%
if -6.50000000000000008e-18 < Om < 1.00000000000000007e-138Initial program 51.1%
Simplified47.0%
Taylor expanded in t around 0 26.6%
associate-*r*26.4%
*-commutative26.4%
associate-*l*26.6%
unpow226.6%
associate-*r/26.6%
*-commutative26.6%
*-commutative26.6%
associate-*l*26.6%
associate-*r/25.2%
associate-/l*25.3%
associate-*r/25.2%
unpow225.2%
associate-*l*25.3%
unpow225.3%
Simplified25.3%
Taylor expanded in Om around 0 36.6%
mul-1-neg36.6%
associate-/l*35.2%
distribute-neg-frac35.2%
unpow235.2%
unpow235.2%
Simplified35.2%
Taylor expanded in U around 0 35.1%
unpow235.1%
times-frac38.9%
unpow238.9%
unpow238.9%
swap-sqr42.2%
Simplified42.2%
if 1.00000000000000007e-138 < Om < 8.4999999999999999e150Initial program 46.0%
Simplified47.2%
Taylor expanded in n around 0 51.3%
associate-*r/51.3%
associate-/l*51.3%
unpow251.3%
Simplified51.3%
Final simplification53.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= t -4.5e+138)
(sqrt (* 2.0 (* U (* n (- t (/ 2.0 (/ Om (* l l))))))))
(if (<= t 1.05e+38)
(sqrt (* (* 2.0 (* n U)) (- t (* l (* l (/ 2.0 Om))))))
(pow (* 2.0 (* U (* n t))) 0.5))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -4.5e+138) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
} else if (t <= 1.05e+38) {
tmp = sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om))))));
} else {
tmp = pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= (-4.5d+138)) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 / (om / (l * l))))))))
else if (t <= 1.05d+38) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - (l * (l * (2.0d0 / om))))))
else
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -4.5e+138) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
} else if (t <= 1.05e+38) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om))))));
} else {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -4.5e+138: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))) elif t <= 1.05e+38: tmp = math.sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om)))))) else: tmp = math.pow((2.0 * (U * (n * t))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -4.5e+138) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 / Float64(Om / Float64(l * l)))))))); elseif (t <= 1.05e+38) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(l * Float64(l * Float64(2.0 / Om)))))); else tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -4.5e+138) tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))); elseif (t <= 1.05e+38) tmp = sqrt(((2.0 * (n * U)) * (t - (l * (l * (2.0 / Om)))))); else tmp = (2.0 * (U * (n * t))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -4.5e+138], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.05e+38], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(l * N[(l * N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+138}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2}{\frac{Om}{\ell \cdot \ell}}\right)\right)\right)}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+38}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(\ell \cdot \frac{2}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if t < -4.49999999999999982e138Initial program 39.0%
Simplified38.9%
Taylor expanded in n around 0 53.5%
associate-*r/53.5%
associate-/l*53.5%
unpow253.5%
Simplified53.5%
if -4.49999999999999982e138 < t < 1.05e38Initial program 58.3%
Simplified59.9%
Taylor expanded in Om around inf 45.4%
associate-*r/45.4%
*-commutative45.4%
associate-*r/45.3%
unpow245.3%
metadata-eval45.3%
associate-*r/45.3%
associate-*l*50.1%
associate-*r/50.1%
metadata-eval50.1%
Simplified50.1%
if 1.05e38 < t Initial program 46.2%
Simplified42.7%
Taylor expanded in t around inf 44.5%
pow1/251.0%
Applied egg-rr51.0%
Final simplification50.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 5.7e+57) (pow (* 2.0 (* U (* n t))) 0.5) (sqrt (* 2.0 (* n (* U (* (* l (/ l Om)) -2.0)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.7e+57) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = sqrt((2.0 * (n * (U * ((l * (l / Om)) * -2.0)))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 5.7d+57) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (n * (u * ((l * (l / om)) * (-2.0d0))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.7e+57) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (n * (U * ((l * (l / Om)) * -2.0)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5.7e+57: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.sqrt((2.0 * (n * (U * ((l * (l / Om)) * -2.0))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.7e+57) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(Float64(l * Float64(l / Om)) * -2.0))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 5.7e+57) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = sqrt((2.0 * (n * (U * ((l * (l / Om)) * -2.0))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5.7e+57], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.7 \cdot 10^{+57}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(\left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)\right)}\\
\end{array}
\end{array}
if l < 5.6999999999999998e57Initial program 59.6%
Simplified57.9%
Taylor expanded in t around inf 43.8%
pow1/245.7%
Applied egg-rr45.7%
if 5.6999999999999998e57 < l Initial program 23.6%
Simplified23.3%
Taylor expanded in t around 0 18.0%
associate-*r*11.9%
*-commutative11.9%
associate-*l*18.0%
unpow218.0%
associate-*r/18.1%
*-commutative18.1%
*-commutative18.1%
associate-*l*18.1%
associate-*r/24.2%
associate-/l*24.2%
associate-*r/22.1%
unpow222.1%
associate-*l*28.7%
unpow228.7%
Simplified28.7%
Taylor expanded in Om around inf 22.2%
*-commutative22.2%
unpow222.2%
associate-*r/28.2%
Simplified28.2%
Final simplification42.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n (- t (/ 2.0 (/ Om (* l l)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (u * (n * (t - (2.0d0 / (om / (l * l))))))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 / Float64(Om / Float64(l * l)))))))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l)))))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2}{\frac{Om}{\ell \cdot \ell}}\right)\right)\right)}
\end{array}
Initial program 52.8%
Simplified53.0%
Taylor expanded in n around 0 45.2%
associate-*r/45.2%
associate-/l*45.2%
unpow245.2%
Simplified45.2%
Final simplification45.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* U (* n t))) 0.5))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return pow((2.0 * (U * (n * t))), 0.5);
}
NOTE: l should be positive before calling this function
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 = (2.0d0 * (u * (n * t))) ** 0.5d0
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.pow((2.0 * (U * (n * t))), 0.5);
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.pow((2.0 * (U * (n * t))), 0.5)
l = abs(l) function code(n, U, t, l, Om, U_42_) return Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5 end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = (2.0 * (U * (n * t))) ^ 0.5; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}
\end{array}
Initial program 52.8%
Simplified53.0%
Taylor expanded in t around inf 36.3%
pow1/238.9%
Applied egg-rr38.9%
Final simplification38.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (u * (n * t))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * t))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 52.8%
Simplified53.0%
Taylor expanded in t around inf 36.3%
Final simplification36.3%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* n t) (* 2.0 U))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((n * t) * (2.0 * U)));
}
NOTE: l should be positive before calling this function
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(((n * t) * (2.0d0 * u)))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt(((n * t) * (2.0 * U)));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt(((n * t) * (2.0 * U)))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(n * t) * Float64(2.0 * U))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((n * t) * (2.0 * U))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}
\end{array}
Initial program 52.8%
Simplified53.0%
Taylor expanded in t around inf 36.3%
associate-*r*36.3%
Simplified36.3%
Final simplification36.3%
herbie shell --seed 2023277
(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*))))))