
(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 20 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
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 5e-322)
(*
(sqrt (* 2.0 n))
(sqrt (* U (+ t (* (/ l Om) (fma l -2.0 (* U* (/ n (/ Om l)))))))))
(if (<= t_1 2e+303)
(sqrt t_1)
(*
(* l (sqrt 2.0))
(pow (/ n (/ Om (* U (+ -2.0 (/ n (/ Om U*)))))) 0.5))))))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) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 5e-322) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t + ((l / Om) * fma(l, -2.0, (U_42_ * (n / (Om / l))))))));
} else if (t_1 <= 2e+303) {
tmp = sqrt(t_1);
} else {
tmp = (l * sqrt(2.0)) * pow((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))), 0.5);
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = 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 <= 5e-322) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(U_42_ * Float64(n / Float64(Om / l))))))))); elseif (t_1 <= 2e+303) tmp = sqrt(t_1); else tmp = Float64(Float64(l * sqrt(2.0)) * (Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / U_42_)))))) ^ 0.5)); 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[(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]}, If[LessEqual[t$95$1, 5e-322], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(U$42$ * N[(n / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+303], N[Sqrt[t$95$1], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \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 5 \cdot 10^{-322}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, U* \cdot \frac{n}{\frac{Om}{\ell}}\right)\right)}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\sqrt{t_1}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U*}}\right)}}\right)}^{0.5}\\
\end{array}
\end{array}
if (*.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*)))) < 4.99006e-322Initial program 8.3%
Simplified28.6%
Taylor expanded in U* around inf 28.3%
associate-/l*30.9%
associate-/r*31.1%
Simplified31.1%
sqrt-prod43.1%
associate-/r/43.1%
Applied egg-rr43.1%
if 4.99006e-322 < (*.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*)))) < 2e303Initial program 97.8%
if 2e303 < (*.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 25.0%
Simplified43.2%
Taylor expanded in t around 0 39.5%
Taylor expanded in U around 0 41.3%
*-commutative41.3%
*-commutative41.3%
fma-def41.3%
associate-/l*42.2%
*-commutative42.2%
associate-/r*41.4%
Simplified41.4%
Taylor expanded in l around 0 29.2%
pow1/229.3%
associate-/l*30.4%
*-commutative30.4%
sub-neg30.4%
associate-/l*30.3%
metadata-eval30.3%
Applied egg-rr30.3%
Final simplification61.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 (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
(if (<= t_1 4e-161)
(* (sqrt (* 2.0 n)) (sqrt (* U t)))
(if (<= t_1 5e+151)
t_1
(*
(* l (sqrt 2.0))
(pow (/ n (/ Om (* U (+ -2.0 (/ n (/ Om U*)))))) 0.5))))))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 <= 4e-161) {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
} else if (t_1 <= 5e+151) {
tmp = t_1;
} else {
tmp = (l * sqrt(2.0)) * pow((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))), 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) :: 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 <= 4d-161) then
tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
else if (t_1 <= 5d+151) then
tmp = t_1
else
tmp = (l * sqrt(2.0d0)) * ((n / (om / (u * ((-2.0d0) + (n / (om / u_42)))))) ** 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 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 <= 4e-161) {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
} else if (t_1 <= 5e+151) {
tmp = t_1;
} else {
tmp = (l * Math.sqrt(2.0)) * Math.pow((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))), 0.5);
}
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 <= 4e-161: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) elif t_1 <= 5e+151: tmp = t_1 else: tmp = (l * math.sqrt(2.0)) * math.pow((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))), 0.5) 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 <= 4e-161) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); elseif (t_1 <= 5e+151) tmp = t_1; else tmp = Float64(Float64(l * sqrt(2.0)) * (Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / U_42_)))))) ^ 0.5)); 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 <= 4e-161) tmp = sqrt((2.0 * n)) * sqrt((U * t)); elseif (t_1 <= 5e+151) tmp = t_1; else tmp = (l * sqrt(2.0)) * ((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))) ^ 0.5); 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, 4e-161], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+151], t$95$1, N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $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 4 \cdot 10^{-161}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U*}}\right)}}\right)}^{0.5}\\
\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*))))) < 4.00000000000000011e-161Initial program 9.6%
Simplified26.5%
Taylor expanded in t around inf 20.7%
sqrt-prod31.7%
*-commutative31.7%
Applied egg-rr31.7%
if 4.00000000000000011e-161 < (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*))))) < 5.0000000000000002e151Initial program 97.8%
if 5.0000000000000002e151 < (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 23.9%
Simplified43.1%
Taylor expanded in t around 0 37.9%
Taylor expanded in U around 0 39.6%
*-commutative39.6%
*-commutative39.6%
fma-def39.6%
associate-/l*41.2%
*-commutative41.2%
associate-/r*40.5%
Simplified40.5%
Taylor expanded in l around 0 27.9%
pow1/228.1%
associate-/l*29.1%
*-commutative29.1%
sub-neg29.1%
associate-/l*29.0%
metadata-eval29.0%
Applied egg-rr29.0%
Final simplification58.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.5e-261)
(sqrt
(* 2.0 (* U (* n (+ t (/ l (/ Om (- (* l -2.0) (/ n (/ Om (* U l)))))))))))
(if (<= l 1.45e+118)
(sqrt
(*
(* 2.0 n)
(* U (+ t (* (/ l Om) (fma l -2.0 (/ n (/ (/ Om l) U*))))))))
(*
(* l (sqrt 2.0))
(sqrt (/ n (/ Om (* U (+ -2.0 (/ n (/ Om (- U* U))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-261) {
tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l)))))))))));
} else if (l <= 1.45e+118) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l / Om) * fma(l, -2.0, (n / ((Om / l) / U_42_))))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((n / (Om / (U * (-2.0 + (n / (Om / (U_42_ - U))))))));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e-261) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(l / Float64(Om / Float64(Float64(l * -2.0) - Float64(n / Float64(Om / Float64(U * l))))))))))); elseif (l <= 1.45e+118) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(n / Float64(Float64(Om / l) / U_42_)))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / Float64(U_42_ - U))))))))); end return tmp end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e-261], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(l / N[(Om / N[(N[(l * -2.0), $MachinePrecision] - N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.45e+118], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(n / N[(N[(Om / l), $MachinePrecision] / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{-261}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell}{\frac{Om}{\ell \cdot -2 - \frac{n}{\frac{Om}{U \cdot \ell}}}}\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.45 \cdot 10^{+118}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{n}{\frac{\frac{Om}{\ell}}{U*}}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U* - U}}\right)}}}\\
\end{array}
\end{array}
if l < 1.5e-261Initial program 50.2%
Simplified53.7%
Taylor expanded in U* around 0 38.1%
associate-*r*40.7%
+-commutative40.7%
Simplified41.9%
if 1.5e-261 < l < 1.45000000000000008e118Initial program 69.9%
Simplified67.0%
Taylor expanded in U* around inf 68.8%
associate-/l*67.6%
associate-/r*67.6%
Simplified67.6%
if 1.45000000000000008e118 < l Initial program 33.7%
Simplified57.5%
Taylor expanded in t around inf 52.8%
distribute-lft-out52.8%
*-commutative52.8%
associate-/l*51.1%
+-commutative51.1%
*-commutative51.1%
associate-*r*60.0%
*-commutative60.0%
associate-*r*60.0%
associate-*l/60.1%
fma-udef60.1%
associate-*r*60.1%
Simplified60.1%
Taylor expanded in l around inf 76.1%
associate-/l*76.9%
*-commutative76.9%
sub-neg76.9%
associate-/l*76.6%
metadata-eval76.6%
Simplified76.6%
Final simplification54.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.5e-261)
(sqrt
(* 2.0 (* U (* n (+ t (/ l (/ Om (- (* l -2.0) (/ n (/ Om (* U l)))))))))))
(if (<= l 2.35e+104)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(*
(* l (sqrt 2.0))
(sqrt (/ n (/ Om (* U (+ -2.0 (/ n (/ Om (- U* U))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-261) {
tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l)))))))))));
} else if (l <= 2.35e+104) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((n / (Om / (U * (-2.0 + (n / (Om / (U_42_ - U))))))));
}
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.5d-261) then
tmp = sqrt((2.0d0 * (u * (n * (t + (l / (om / ((l * (-2.0d0)) - (n / (om / (u * l)))))))))))
else if (l <= 2.35d+104) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = (l * sqrt(2.0d0)) * sqrt((n / (om / (u * ((-2.0d0) + (n / (om / (u_42 - u))))))))
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.5e-261) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l)))))))))));
} else if (l <= 2.35e+104) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((n / (Om / (U * (-2.0 + (n / (Om / (U_42_ - U))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e-261: tmp = math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l))))))))))) elif l <= 2.35e+104: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((n / (Om / (U * (-2.0 + (n / (Om / (U_42_ - U)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e-261) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(l / Float64(Om / Float64(Float64(l * -2.0) - Float64(n / Float64(Om / Float64(U * l))))))))))); elseif (l <= 2.35e+104) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / Float64(U_42_ - U))))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.5e-261) tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l))))))))))); elseif (l <= 2.35e+104) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = (l * sqrt(2.0)) * sqrt((n / (Om / (U * (-2.0 + (n / (Om / (U_42_ - U)))))))); 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.5e-261], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(l / N[(Om / N[(N[(l * -2.0), $MachinePrecision] - N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.35e+104], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{-261}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell}{\frac{Om}{\ell \cdot -2 - \frac{n}{\frac{Om}{U \cdot \ell}}}}\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.35 \cdot 10^{+104}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U* - U}}\right)}}}\\
\end{array}
\end{array}
if l < 1.5e-261Initial program 50.2%
Simplified53.7%
Taylor expanded in U* around 0 38.1%
associate-*r*40.7%
+-commutative40.7%
Simplified41.9%
if 1.5e-261 < l < 2.35000000000000008e104Initial program 70.4%
Simplified66.1%
Taylor expanded in U around 0 67.9%
if 2.35000000000000008e104 < l Initial program 34.6%
Simplified59.8%
Taylor expanded in t around inf 55.4%
distribute-lft-out55.4%
*-commutative55.4%
associate-/l*53.8%
+-commutative53.8%
*-commutative53.8%
associate-*r*62.2%
*-commutative62.2%
associate-*r*62.2%
associate-*l/62.3%
fma-udef62.3%
associate-*r*62.3%
Simplified62.3%
Taylor expanded in l around inf 77.4%
associate-/l*78.1%
*-commutative78.1%
sub-neg78.1%
associate-/l*77.9%
metadata-eval77.9%
Simplified77.9%
Final simplification54.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.5e-261)
(sqrt
(* 2.0 (* U (* n (+ t (/ l (/ Om (- (* l -2.0) (/ n (/ Om (* U l)))))))))))
(if (<= l 2.15e+105)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(*
(* l (sqrt 2.0))
(pow (/ n (/ Om (* U (+ -2.0 (/ n (/ Om U*)))))) 0.5)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-261) {
tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l)))))))))));
} else if (l <= 2.15e+105) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = (l * sqrt(2.0)) * pow((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))), 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 (l <= 1.5d-261) then
tmp = sqrt((2.0d0 * (u * (n * (t + (l / (om / ((l * (-2.0d0)) - (n / (om / (u * l)))))))))))
else if (l <= 2.15d+105) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = (l * sqrt(2.0d0)) * ((n / (om / (u * ((-2.0d0) + (n / (om / u_42)))))) ** 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 (l <= 1.5e-261) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l)))))))))));
} else if (l <= 2.15e+105) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.pow((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e-261: tmp = math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l))))))))))) elif l <= 2.15e+105: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = (l * math.sqrt(2.0)) * math.pow((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e-261) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(l / Float64(Om / Float64(Float64(l * -2.0) - Float64(n / Float64(Om / Float64(U * l))))))))))); elseif (l <= 2.15e+105) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); else tmp = Float64(Float64(l * sqrt(2.0)) * (Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / U_42_)))))) ^ 0.5)); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.5e-261) tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l))))))))))); elseif (l <= 2.15e+105) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = (l * sqrt(2.0)) * ((n / (Om / (U * (-2.0 + (n / (Om / U_42_)))))) ^ 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[l, 1.5e-261], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(l / N[(Om / N[(N[(l * -2.0), $MachinePrecision] - N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.15e+105], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{-261}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell}{\frac{Om}{\ell \cdot -2 - \frac{n}{\frac{Om}{U \cdot \ell}}}}\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.15 \cdot 10^{+105}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U*}}\right)}}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.5e-261Initial program 50.2%
Simplified53.7%
Taylor expanded in U* around 0 38.1%
associate-*r*40.7%
+-commutative40.7%
Simplified41.9%
if 1.5e-261 < l < 2.1500000000000001e105Initial program 70.4%
Simplified66.1%
Taylor expanded in U around 0 67.9%
if 2.1500000000000001e105 < l Initial program 34.6%
Simplified59.8%
Taylor expanded in t around 0 46.0%
Taylor expanded in U around 0 46.3%
*-commutative46.3%
*-commutative46.3%
fma-def46.3%
associate-/l*49.0%
*-commutative49.0%
associate-/r*49.1%
Simplified49.1%
Taylor expanded in l around 0 74.3%
pow1/274.3%
associate-/l*75.0%
*-commutative75.0%
sub-neg75.0%
associate-/l*74.8%
metadata-eval74.8%
Applied egg-rr74.8%
Final simplification53.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.7e-261)
(sqrt
(* 2.0 (* U (* n (+ t (/ l (/ Om (- (* l -2.0) (/ n (/ Om (* U l)))))))))))
(if (<= l 8e+82)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(* (* l (sqrt 2.0)) (sqrt (/ (* n (* U (- (/ (* n U*) Om) 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-261) {
tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l)))))))))));
} else if (l <= 8e+82) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * U_42_) / Om) - 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-261) then
tmp = sqrt((2.0d0 * (u * (n * (t + (l / (om / ((l * (-2.0d0)) - (n / (om / (u * l)))))))))))
else if (l <= 8d+82) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = (l * sqrt(2.0d0)) * sqrt(((n * (u * (((n * u_42) / om) - 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-261) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l)))))))))));
} else if (l <= 8e+82) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.7e-261: tmp = math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l))))))))))) elif l <= 8e+82: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.7e-261) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(l / Float64(Om / Float64(Float64(l * -2.0) - Float64(n / Float64(Om / Float64(U * l))))))))))); elseif (l <= 8e+82) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * U_42_) / Om) - 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-261) tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l))))))))))); elseif (l <= 8e+82) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * U_42_) / Om) - 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-261], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(l / N[(Om / N[(N[(l * -2.0), $MachinePrecision] - N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 8e+82], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.7 \cdot 10^{-261}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell}{\frac{Om}{\ell \cdot -2 - \frac{n}{\frac{Om}{U \cdot \ell}}}}\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 8 \cdot 10^{+82}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.7e-261Initial program 50.2%
Simplified53.7%
Taylor expanded in U* around 0 38.1%
associate-*r*40.7%
+-commutative40.7%
Simplified41.9%
if 1.7e-261 < l < 7.9999999999999997e82Initial program 72.3%
Simplified67.7%
Taylor expanded in U around 0 69.6%
if 7.9999999999999997e82 < l Initial program 33.0%
Simplified57.0%
Taylor expanded in t around 0 46.4%
Taylor expanded in U around 0 46.7%
*-commutative46.7%
*-commutative46.7%
fma-def46.7%
associate-/l*49.2%
*-commutative49.2%
associate-/r*49.4%
Simplified49.4%
Taylor expanded in l around 0 73.2%
Final simplification54.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ l (/ Om l))))
(if (<= l 1.55e-84)
(sqrt (* (* (* 2.0 n) U) (+ t (* -2.0 t_1))))
(if (<= l 1200.0)
(sqrt (* (* 2.0 n) (* U (+ t (/ n (/ (* Om Om) (* (* l l) U*)))))))
(if (<= l 2.9e+84)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 t_1)))))
(if (<= l 7e+158)
(sqrt
(* -2.0 (/ (* (* n (* l l)) (* U (- 2.0 (/ n (/ Om U*))))) Om)))
(sqrt
(*
(* 2.0 n)
(* (/ l Om) (* U (* l (+ -2.0 (* U* (/ n Om))))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = l / (Om / l);
double tmp;
if (l <= 1.55e-84) {
tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1))));
} else if (l <= 1200.0) {
tmp = sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_)))))));
} else if (l <= 2.9e+84) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * t_1)))));
} else if (l <= 7e+158) {
tmp = sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / Om)));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / 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 = l / (om / l)
if (l <= 1.55d-84) then
tmp = sqrt((((2.0d0 * n) * u) * (t + ((-2.0d0) * t_1))))
else if (l <= 1200.0d0) then
tmp = sqrt(((2.0d0 * n) * (u * (t + (n / ((om * om) / ((l * l) * u_42)))))))
else if (l <= 2.9d+84) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * t_1)))))
else if (l <= 7d+158) then
tmp = sqrt(((-2.0d0) * (((n * (l * l)) * (u * (2.0d0 - (n / (om / u_42))))) / om)))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * (u * (l * ((-2.0d0) + (u_42 * (n / 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 = l / (Om / l);
double tmp;
if (l <= 1.55e-84) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1))));
} else if (l <= 1200.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_)))))));
} else if (l <= 2.9e+84) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * t_1)))));
} else if (l <= 7e+158) {
tmp = Math.sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / Om)));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = l / (Om / l) tmp = 0 if l <= 1.55e-84: tmp = math.sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1)))) elif l <= 1200.0: tmp = math.sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_))))))) elif l <= 2.9e+84: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * t_1))))) elif l <= 7e+158: tmp = math.sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / Om))) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / Om)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Float64(Om / l)) tmp = 0.0 if (l <= 1.55e-84) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(-2.0 * t_1)))); elseif (l <= 1200.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(n / Float64(Float64(Om * Om) / Float64(Float64(l * l) * U_42_))))))); elseif (l <= 2.9e+84) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * t_1))))); elseif (l <= 7e+158) tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(n * Float64(l * l)) * Float64(U * Float64(2.0 - Float64(n / Float64(Om / U_42_))))) / Om))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(U * Float64(l * Float64(-2.0 + Float64(U_42_ * Float64(n / Om)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = l / (Om / l); tmp = 0.0; if (l <= 1.55e-84) tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1)))); elseif (l <= 1200.0) tmp = sqrt(((2.0 * n) * (U * (t + (n / ((Om * Om) / ((l * l) * U_42_))))))); elseif (l <= 2.9e+84) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * t_1))))); elseif (l <= 7e+158) tmp = sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / Om))); else tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / 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[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 1.55e-84], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1200.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.9e+84], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 7e+158], N[Sqrt[N[(-2.0 * N[(N[(N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(U * N[(2.0 - N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(U * N[(l * N[(-2.0 + N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\ell}{\frac{Om}{\ell}}\\
\mathbf{if}\;\ell \leq 1.55 \cdot 10^{-84}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot t_1\right)}\\
\mathbf{elif}\;\ell \leq 1200:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{n}{\frac{Om \cdot Om}{\left(\ell \cdot \ell\right) \cdot U*}}\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.9 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot t_1\right)\right)}\\
\mathbf{elif}\;\ell \leq 7 \cdot 10^{+158}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(U \cdot \left(2 - \frac{n}{\frac{Om}{U*}}\right)\right)}{Om}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(\ell \cdot \left(-2 + U* \cdot \frac{n}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 1.55000000000000001e-84Initial program 56.1%
Taylor expanded in Om around inf 48.5%
unpow248.5%
associate-/l*49.6%
Simplified49.6%
if 1.55000000000000001e-84 < l < 1200Initial program 74.8%
associate-*l*77.3%
sub-neg77.3%
associate-+l-77.3%
sub-neg77.3%
associate-/l*77.3%
remove-double-neg77.3%
associate-*l*77.3%
Simplified77.3%
Taylor expanded in U* around inf 76.8%
mul-1-neg76.8%
associate-/l*76.8%
distribute-neg-frac76.8%
unpow276.8%
*-commutative76.8%
unpow276.8%
Simplified76.8%
if 1200 < l < 2.89999999999999989e84Initial program 48.5%
associate-*l*57.3%
sub-neg57.3%
associate-+l-57.3%
sub-neg57.3%
associate-/l*57.3%
remove-double-neg57.3%
associate-*l*57.3%
Simplified57.3%
Taylor expanded in Om around inf 57.2%
unpow257.2%
associate-/l*57.2%
Simplified57.2%
if 2.89999999999999989e84 < l < 7.0000000000000003e158Initial program 46.4%
Simplified58.0%
Taylor expanded in U* around inf 58.0%
associate-/l*58.0%
associate-/r*58.0%
Simplified58.0%
Taylor expanded in l around -inf 47.0%
associate-*r*79.0%
unpow279.0%
*-commutative79.0%
mul-1-neg79.0%
unsub-neg79.0%
associate-/l*78.1%
Simplified78.1%
if 7.0000000000000003e158 < l Initial program 28.9%
Simplified56.7%
Taylor expanded in t around 0 42.8%
Taylor expanded in U around 0 43.2%
*-commutative43.2%
*-commutative43.2%
fma-def43.2%
associate-/l*46.6%
*-commutative46.6%
associate-/r*46.8%
Simplified46.8%
*-un-lft-identity46.8%
associate-/l*60.1%
associate-/r/60.8%
associate-/r/60.8%
Applied egg-rr60.8%
*-lft-identity60.8%
associate-/r/60.8%
fma-udef60.8%
associate-*l/60.8%
*-commutative60.8%
distribute-lft-out60.8%
associate-*l/60.8%
*-commutative60.8%
Simplified60.8%
Final simplification54.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.5e-261)
(sqrt
(* 2.0 (* U (* n (+ t (/ l (/ Om (- (* l -2.0) (/ n (/ Om (* U l)))))))))))
(if (<= l 2.3e+83)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(sqrt (* (* 2.0 n) (* (/ l Om) (* U (* l (+ -2.0 (* U* (/ n Om)))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-261) {
tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l)))))))))));
} else if (l <= 2.3e+83) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / 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.5d-261) then
tmp = sqrt((2.0d0 * (u * (n * (t + (l / (om / ((l * (-2.0d0)) - (n / (om / (u * l)))))))))))
else if (l <= 2.3d+83) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * (u * (l * ((-2.0d0) + (u_42 * (n / 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.5e-261) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l)))))))))));
} else if (l <= 2.3e+83) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e-261: tmp = math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l))))))))))) elif l <= 2.3e+83: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / Om)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e-261) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(l / Float64(Om / Float64(Float64(l * -2.0) - Float64(n / Float64(Om / Float64(U * l))))))))))); elseif (l <= 2.3e+83) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(U * Float64(l * Float64(-2.0 + Float64(U_42_ * Float64(n / 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.5e-261) tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / (Om / (U * l))))))))))); elseif (l <= 2.3e+83) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / 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.5e-261], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(l / N[(Om / N[(N[(l * -2.0), $MachinePrecision] - N[(n / N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.3e+83], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(U * N[(l * N[(-2.0 + N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{-261}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell}{\frac{Om}{\ell \cdot -2 - \frac{n}{\frac{Om}{U \cdot \ell}}}}\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.3 \cdot 10^{+83}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(\ell \cdot \left(-2 + U* \cdot \frac{n}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 1.5e-261Initial program 50.2%
Simplified53.7%
Taylor expanded in U* around 0 38.1%
associate-*r*40.7%
+-commutative40.7%
Simplified41.9%
if 1.5e-261 < l < 2.29999999999999995e83Initial program 72.3%
Simplified67.7%
Taylor expanded in U around 0 69.6%
if 2.29999999999999995e83 < l Initial program 33.0%
Simplified57.0%
Taylor expanded in t around 0 46.4%
Taylor expanded in U around 0 46.7%
*-commutative46.7%
*-commutative46.7%
fma-def46.7%
associate-/l*49.2%
*-commutative49.2%
associate-/r*49.4%
Simplified49.4%
*-un-lft-identity49.4%
associate-/l*62.1%
associate-/r/62.6%
associate-/r/62.6%
Applied egg-rr62.6%
*-lft-identity62.6%
associate-/r/62.6%
fma-udef62.6%
associate-*l/62.6%
*-commutative62.6%
distribute-lft-out62.6%
associate-*l/62.6%
*-commutative62.6%
Simplified62.6%
Final simplification52.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ Om (* U l))))
(if (<= l 2.7e-261)
(sqrt (* 2.0 (* U (* n (+ t (/ l (/ Om (- (* l -2.0) (/ n t_1)))))))))
(if (<= l 2.4e+84)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(sqrt
(/ (* (* 2.0 n) (+ (* l -2.0) (/ (* (- U* U) (* n l)) Om))) t_1))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Om / (U * l);
double tmp;
if (l <= 2.7e-261) {
tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / t_1)))))))));
} else if (l <= 2.4e+84) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = sqrt((((2.0 * n) * ((l * -2.0) + (((U_42_ - U) * (n * l)) / Om))) / 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 = om / (u * l)
if (l <= 2.7d-261) then
tmp = sqrt((2.0d0 * (u * (n * (t + (l / (om / ((l * (-2.0d0)) - (n / t_1)))))))))
else if (l <= 2.4d+84) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = sqrt((((2.0d0 * n) * ((l * (-2.0d0)) + (((u_42 - u) * (n * l)) / om))) / 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 = Om / (U * l);
double tmp;
if (l <= 2.7e-261) {
tmp = Math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / t_1)))))))));
} else if (l <= 2.4e+84) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = Math.sqrt((((2.0 * n) * ((l * -2.0) + (((U_42_ - U) * (n * l)) / Om))) / t_1));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = Om / (U * l) tmp = 0 if l <= 2.7e-261: tmp = math.sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / t_1))))))))) elif l <= 2.4e+84: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = math.sqrt((((2.0 * n) * ((l * -2.0) + (((U_42_ - U) * (n * l)) / Om))) / t_1)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(Om / Float64(U * l)) tmp = 0.0 if (l <= 2.7e-261) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(l / Float64(Om / Float64(Float64(l * -2.0) - Float64(n / t_1))))))))); elseif (l <= 2.4e+84) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))))); else tmp = sqrt(Float64(Float64(Float64(2.0 * n) * Float64(Float64(l * -2.0) + Float64(Float64(Float64(U_42_ - U) * Float64(n * l)) / Om))) / t_1)); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = Om / (U * l); tmp = 0.0; if (l <= 2.7e-261) tmp = sqrt((2.0 * (U * (n * (t + (l / (Om / ((l * -2.0) - (n / t_1))))))))); elseif (l <= 2.4e+84) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = sqrt((((2.0 * n) * ((l * -2.0) + (((U_42_ - U) * (n * l)) / Om))) / 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[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 2.7e-261], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(l / N[(Om / N[(N[(l * -2.0), $MachinePrecision] - N[(n / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.4e+84], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{Om}{U \cdot \ell}\\
\mathbf{if}\;\ell \leq 2.7 \cdot 10^{-261}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell}{\frac{Om}{\ell \cdot -2 - \frac{n}{t_1}}}\right)\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.4 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(2 \cdot n\right) \cdot \left(\ell \cdot -2 + \frac{\left(U* - U\right) \cdot \left(n \cdot \ell\right)}{Om}\right)}{t_1}}\\
\end{array}
\end{array}
if l < 2.6999999999999999e-261Initial program 50.2%
Simplified53.7%
Taylor expanded in U* around 0 38.1%
associate-*r*40.7%
+-commutative40.7%
Simplified41.9%
if 2.6999999999999999e-261 < l < 2.4e84Initial program 72.3%
Simplified67.7%
Taylor expanded in U around 0 69.6%
if 2.4e84 < l Initial program 33.0%
Simplified57.0%
Taylor expanded in t around 0 46.4%
*-un-lft-identity46.4%
associate-/l*54.1%
*-commutative54.1%
*-commutative54.1%
Applied egg-rr54.1%
*-lft-identity54.1%
associate-*r/61.4%
+-commutative61.4%
associate-*r*69.3%
*-commutative69.3%
Simplified69.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 (/ l (/ Om l))))
(if (<= l 6.5e-51)
(sqrt (* (* (* 2.0 n) U) (+ t (* -2.0 t_1))))
(if (<= l 2.8e+84)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 t_1)))))
(if (<= l 7e+158)
(sqrt (* -2.0 (/ (* (* n (* l l)) (* U (- 2.0 (/ n (/ Om U*))))) Om)))
(sqrt
(* (* 2.0 n) (* (/ l Om) (* U (* l (+ -2.0 (* U* (/ n Om)))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = l / (Om / l);
double tmp;
if (l <= 6.5e-51) {
tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1))));
} else if (l <= 2.8e+84) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * t_1)))));
} else if (l <= 7e+158) {
tmp = sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / Om)));
} else {
tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / 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 = l / (om / l)
if (l <= 6.5d-51) then
tmp = sqrt((((2.0d0 * n) * u) * (t + ((-2.0d0) * t_1))))
else if (l <= 2.8d+84) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * t_1)))))
else if (l <= 7d+158) then
tmp = sqrt(((-2.0d0) * (((n * (l * l)) * (u * (2.0d0 - (n / (om / u_42))))) / om)))
else
tmp = sqrt(((2.0d0 * n) * ((l / om) * (u * (l * ((-2.0d0) + (u_42 * (n / 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 = l / (Om / l);
double tmp;
if (l <= 6.5e-51) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1))));
} else if (l <= 2.8e+84) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * t_1)))));
} else if (l <= 7e+158) {
tmp = Math.sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / Om)));
} else {
tmp = Math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = l / (Om / l) tmp = 0 if l <= 6.5e-51: tmp = math.sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1)))) elif l <= 2.8e+84: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * t_1))))) elif l <= 7e+158: tmp = math.sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / Om))) else: tmp = math.sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / Om)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Float64(Om / l)) tmp = 0.0 if (l <= 6.5e-51) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(-2.0 * t_1)))); elseif (l <= 2.8e+84) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * t_1))))); elseif (l <= 7e+158) tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(n * Float64(l * l)) * Float64(U * Float64(2.0 - Float64(n / Float64(Om / U_42_))))) / Om))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(l / Om) * Float64(U * Float64(l * Float64(-2.0 + Float64(U_42_ * Float64(n / Om)))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = l / (Om / l); tmp = 0.0; if (l <= 6.5e-51) tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1)))); elseif (l <= 2.8e+84) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * t_1))))); elseif (l <= 7e+158) tmp = sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / Om))); else tmp = sqrt(((2.0 * n) * ((l / Om) * (U * (l * (-2.0 + (U_42_ * (n / 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[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 6.5e-51], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.8e+84], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 7e+158], N[Sqrt[N[(-2.0 * N[(N[(N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(U * N[(2.0 - N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(U * N[(l * N[(-2.0 + N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\ell}{\frac{Om}{\ell}}\\
\mathbf{if}\;\ell \leq 6.5 \cdot 10^{-51}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot t_1\right)}\\
\mathbf{elif}\;\ell \leq 2.8 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot t_1\right)\right)}\\
\mathbf{elif}\;\ell \leq 7 \cdot 10^{+158}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(U \cdot \left(2 - \frac{n}{\frac{Om}{U*}}\right)\right)}{Om}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(\ell \cdot \left(-2 + U* \cdot \frac{n}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 6.5000000000000003e-51Initial program 57.9%
Taylor expanded in Om around inf 49.2%
unpow249.2%
associate-/l*50.3%
Simplified50.3%
if 6.5000000000000003e-51 < l < 2.79999999999999982e84Initial program 52.8%
associate-*l*59.5%
sub-neg59.5%
associate-+l-59.5%
sub-neg59.5%
associate-/l*59.5%
remove-double-neg59.5%
associate-*l*59.5%
Simplified59.5%
Taylor expanded in Om around inf 50.8%
unpow250.8%
associate-/l*50.8%
Simplified50.8%
if 2.79999999999999982e84 < l < 7.0000000000000003e158Initial program 46.4%
Simplified58.0%
Taylor expanded in U* around inf 58.0%
associate-/l*58.0%
associate-/r*58.0%
Simplified58.0%
Taylor expanded in l around -inf 47.0%
associate-*r*79.0%
unpow279.0%
*-commutative79.0%
mul-1-neg79.0%
unsub-neg79.0%
associate-/l*78.1%
Simplified78.1%
if 7.0000000000000003e158 < l Initial program 28.9%
Simplified56.7%
Taylor expanded in t around 0 42.8%
Taylor expanded in U around 0 43.2%
*-commutative43.2%
*-commutative43.2%
fma-def43.2%
associate-/l*46.6%
*-commutative46.6%
associate-/r*46.8%
Simplified46.8%
*-un-lft-identity46.8%
associate-/l*60.1%
associate-/r/60.8%
associate-/r/60.8%
Applied egg-rr60.8%
*-lft-identity60.8%
associate-/r/60.8%
fma-udef60.8%
associate-*l/60.8%
*-commutative60.8%
distribute-lft-out60.8%
associate-*l/60.8%
*-commutative60.8%
Simplified60.8%
Final simplification52.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ l (/ Om l))))
(if (<= l 4.6e-51)
(sqrt (* (* (* 2.0 n) U) (+ t (* -2.0 t_1))))
(if (<= l 3.55e+84)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 t_1)))))
(sqrt
(* -2.0 (/ (* (* n (* l l)) (* U (- 2.0 (/ n (/ Om U*))))) Om)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = l / (Om / l);
double tmp;
if (l <= 4.6e-51) {
tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1))));
} else if (l <= 3.55e+84) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * t_1)))));
} else {
tmp = sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / 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 = l / (om / l)
if (l <= 4.6d-51) then
tmp = sqrt((((2.0d0 * n) * u) * (t + ((-2.0d0) * t_1))))
else if (l <= 3.55d+84) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * t_1)))))
else
tmp = sqrt(((-2.0d0) * (((n * (l * l)) * (u * (2.0d0 - (n / (om / u_42))))) / 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 = l / (Om / l);
double tmp;
if (l <= 4.6e-51) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1))));
} else if (l <= 3.55e+84) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * t_1)))));
} else {
tmp = Math.sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = l / (Om / l) tmp = 0 if l <= 4.6e-51: tmp = math.sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1)))) elif l <= 3.55e+84: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * t_1))))) else: tmp = math.sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Float64(Om / l)) tmp = 0.0 if (l <= 4.6e-51) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(-2.0 * t_1)))); elseif (l <= 3.55e+84) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * t_1))))); else tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(n * Float64(l * l)) * Float64(U * Float64(2.0 - Float64(n / Float64(Om / U_42_))))) / Om))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = l / (Om / l); tmp = 0.0; if (l <= 4.6e-51) tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1)))); elseif (l <= 3.55e+84) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * t_1))))); else tmp = sqrt((-2.0 * (((n * (l * l)) * (U * (2.0 - (n / (Om / U_42_))))) / 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[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 4.6e-51], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.55e+84], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(U * N[(2.0 - N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\ell}{\frac{Om}{\ell}}\\
\mathbf{if}\;\ell \leq 4.6 \cdot 10^{-51}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot t_1\right)}\\
\mathbf{elif}\;\ell \leq 3.55 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot t_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(U \cdot \left(2 - \frac{n}{\frac{Om}{U*}}\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 4.60000000000000004e-51Initial program 57.9%
Taylor expanded in Om around inf 49.2%
unpow249.2%
associate-/l*50.3%
Simplified50.3%
if 4.60000000000000004e-51 < l < 3.5499999999999999e84Initial program 52.8%
associate-*l*59.5%
sub-neg59.5%
associate-+l-59.5%
sub-neg59.5%
associate-/l*59.5%
remove-double-neg59.5%
associate-*l*59.5%
Simplified59.5%
Taylor expanded in Om around inf 50.8%
unpow250.8%
associate-/l*50.8%
Simplified50.8%
if 3.5499999999999999e84 < l Initial program 33.0%
Simplified57.0%
Taylor expanded in U* around inf 51.9%
associate-/l*54.4%
associate-/r*57.0%
Simplified57.0%
Taylor expanded in l around -inf 42.2%
associate-*r*49.8%
unpow249.8%
*-commutative49.8%
mul-1-neg49.8%
unsub-neg49.8%
associate-/l*49.6%
Simplified49.6%
Final simplification50.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= n -3.9e+233)
(sqrt (* -2.0 (- (/ (/ (* (* (* n l) (* n l)) (* U U*)) Om) Om))))
(if (<= n 1.1e+179)
(sqrt (* (* (* 2.0 n) U) (+ t (* -2.0 (/ l (/ Om l))))))
(sqrt (* (* 2.0 n) (/ (/ n (/ Om (* (* l l) (* U U*)))) Om))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= -3.9e+233) {
tmp = sqrt((-2.0 * -(((((n * l) * (n * l)) * (U * U_42_)) / Om) / Om)));
} else if (n <= 1.1e+179) {
tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * (l / (Om / l))))));
} else {
tmp = sqrt(((2.0 * n) * ((n / (Om / ((l * l) * (U * U_42_)))) / 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 (n <= (-3.9d+233)) then
tmp = sqrt(((-2.0d0) * -(((((n * l) * (n * l)) * (u * u_42)) / om) / om)))
else if (n <= 1.1d+179) then
tmp = sqrt((((2.0d0 * n) * u) * (t + ((-2.0d0) * (l / (om / l))))))
else
tmp = sqrt(((2.0d0 * n) * ((n / (om / ((l * l) * (u * u_42)))) / 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 (n <= -3.9e+233) {
tmp = Math.sqrt((-2.0 * -(((((n * l) * (n * l)) * (U * U_42_)) / Om) / Om)));
} else if (n <= 1.1e+179) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (-2.0 * (l / (Om / l))))));
} else {
tmp = Math.sqrt(((2.0 * n) * ((n / (Om / ((l * l) * (U * U_42_)))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= -3.9e+233: tmp = math.sqrt((-2.0 * -(((((n * l) * (n * l)) * (U * U_42_)) / Om) / Om))) elif n <= 1.1e+179: tmp = math.sqrt((((2.0 * n) * U) * (t + (-2.0 * (l / (Om / l)))))) else: tmp = math.sqrt(((2.0 * n) * ((n / (Om / ((l * l) * (U * U_42_)))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= -3.9e+233) tmp = sqrt(Float64(-2.0 * Float64(-Float64(Float64(Float64(Float64(Float64(n * l) * Float64(n * l)) * Float64(U * U_42_)) / Om) / Om)))); elseif (n <= 1.1e+179) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(n / Float64(Om / Float64(Float64(l * l) * Float64(U * U_42_)))) / Om))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= -3.9e+233) tmp = sqrt((-2.0 * -(((((n * l) * (n * l)) * (U * U_42_)) / Om) / Om))); elseif (n <= 1.1e+179) tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * (l / (Om / l)))))); else tmp = sqrt(((2.0 * n) * ((n / (Om / ((l * l) * (U * U_42_)))) / 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[n, -3.9e+233], N[Sqrt[N[(-2.0 * (-N[(N[(N[(N[(N[(n * l), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] * N[(U * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] / Om), $MachinePrecision])), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 1.1e+179], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(n / N[(Om / N[(N[(l * l), $MachinePrecision] * N[(U * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -3.9 \cdot 10^{+233}:\\
\;\;\;\;\sqrt{-2 \cdot \left(-\frac{\frac{\left(\left(n \cdot \ell\right) \cdot \left(n \cdot \ell\right)\right) \cdot \left(U \cdot U*\right)}{Om}}{Om}\right)}\\
\mathbf{elif}\;n \leq 1.1 \cdot 10^{+179}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\frac{n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \left(U \cdot U*\right)}}}{Om}}\\
\end{array}
\end{array}
if n < -3.8999999999999999e233Initial program 65.5%
Simplified65.4%
Taylor expanded in U* around inf 65.7%
associate-/l*74.8%
associate-/r*83.6%
Simplified83.6%
Taylor expanded in l around -inf 54.5%
associate-*r*54.5%
unpow254.5%
*-commutative54.5%
mul-1-neg54.5%
unsub-neg54.5%
associate-/l*54.5%
Simplified54.5%
Taylor expanded in n around inf 54.5%
associate-*r/54.5%
mul-1-neg54.5%
associate-*r*54.5%
unpow254.5%
unpow254.5%
unswap-sqr73.9%
*-commutative73.9%
Simplified73.9%
if -3.8999999999999999e233 < n < 1.1e179Initial program 53.0%
Taylor expanded in Om around inf 49.4%
unpow249.4%
associate-/l*52.6%
Simplified52.6%
if 1.1e179 < n Initial program 55.0%
Simplified55.3%
Taylor expanded in t around 0 42.9%
Taylor expanded in U* around inf 42.8%
associate-/l*49.7%
*-commutative49.7%
unpow249.7%
Simplified49.7%
Final simplification53.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2.6e-84)
(sqrt (* (* (* 2.0 n) U) t))
(if (<= l 2.4e+145)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ l (/ Om l)))))))
(pow (* -4.0 (/ (* U (* n (* l l))) Om)) 0.5))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.6e-84) {
tmp = sqrt((((2.0 * n) * U) * t));
} else if (l <= 2.4e+145) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))));
} else {
tmp = pow((-4.0 * ((U * (n * (l * l))) / Om)), 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 (l <= 2.6d-84) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else if (l <= 2.4d+145) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l / (om / l)))))))
else
tmp = ((-4.0d0) * ((u * (n * (l * l))) / om)) ** 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 (l <= 2.6e-84) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else if (l <= 2.4e+145) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l)))))));
} else {
tmp = Math.pow((-4.0 * ((U * (n * (l * l))) / Om)), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.6e-84: tmp = math.sqrt((((2.0 * n) * U) * t)) elif l <= 2.4e+145: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l))))))) else: tmp = math.pow((-4.0 * ((U * (n * (l * l))) / Om)), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.6e-84) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); elseif (l <= 2.4e+145) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l / Float64(Om / l))))))); else tmp = Float64(-4.0 * Float64(Float64(U * Float64(n * Float64(l * l))) / Om)) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.6e-84) tmp = sqrt((((2.0 * n) * U) * t)); elseif (l <= 2.4e+145) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l / (Om / l))))))); else tmp = (-4.0 * ((U * (n * (l * l))) / Om)) ^ 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[l, 2.6e-84], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.4e+145], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(N[(U * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.6 \cdot 10^{-84}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{elif}\;\ell \leq 2.4 \cdot 10^{+145}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 2.6e-84Initial program 56.1%
Taylor expanded in t around inf 45.7%
if 2.6e-84 < l < 2.39999999999999992e145Initial program 60.8%
associate-*l*64.6%
sub-neg64.6%
associate-+l-64.6%
sub-neg64.6%
associate-/l*64.6%
remove-double-neg64.6%
associate-*l*64.6%
Simplified64.6%
Taylor expanded in Om around inf 52.9%
unpow252.9%
associate-/l*52.9%
Simplified52.9%
if 2.39999999999999992e145 < l Initial program 28.9%
Simplified56.7%
Taylor expanded in t around 0 42.8%
pow1/244.2%
associate-/l*50.8%
*-commutative50.8%
*-commutative50.8%
Applied egg-rr50.8%
Taylor expanded in n around 0 40.8%
associate-*r*40.8%
unpow240.8%
Simplified40.8%
Final simplification46.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ l (/ Om l))))
(if (<= l 1.8e-51)
(sqrt (* (* (* 2.0 n) U) (+ t (* -2.0 t_1))))
(if (<= l 9.2e+141)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 t_1)))))
(pow (* -4.0 (/ (* U (* n (* l l))) Om)) 0.5)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = l / (Om / l);
double tmp;
if (l <= 1.8e-51) {
tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1))));
} else if (l <= 9.2e+141) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * t_1)))));
} else {
tmp = pow((-4.0 * ((U * (n * (l * l))) / Om)), 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) :: t_1
real(8) :: tmp
t_1 = l / (om / l)
if (l <= 1.8d-51) then
tmp = sqrt((((2.0d0 * n) * u) * (t + ((-2.0d0) * t_1))))
else if (l <= 9.2d+141) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * t_1)))))
else
tmp = ((-4.0d0) * ((u * (n * (l * l))) / om)) ** 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 t_1 = l / (Om / l);
double tmp;
if (l <= 1.8e-51) {
tmp = Math.sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1))));
} else if (l <= 9.2e+141) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * t_1)))));
} else {
tmp = Math.pow((-4.0 * ((U * (n * (l * l))) / Om)), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = l / (Om / l) tmp = 0 if l <= 1.8e-51: tmp = math.sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1)))) elif l <= 9.2e+141: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * t_1))))) else: tmp = math.pow((-4.0 * ((U * (n * (l * l))) / Om)), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Float64(Om / l)) tmp = 0.0 if (l <= 1.8e-51) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(-2.0 * t_1)))); elseif (l <= 9.2e+141) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * t_1))))); else tmp = Float64(-4.0 * Float64(Float64(U * Float64(n * Float64(l * l))) / Om)) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = l / (Om / l); tmp = 0.0; if (l <= 1.8e-51) tmp = sqrt((((2.0 * n) * U) * (t + (-2.0 * t_1)))); elseif (l <= 9.2e+141) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * t_1))))); else tmp = (-4.0 * ((U * (n * (l * l))) / Om)) ^ 0.5; 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[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 1.8e-51], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 9.2e+141], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(N[(U * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \frac{\ell}{\frac{Om}{\ell}}\\
\mathbf{if}\;\ell \leq 1.8 \cdot 10^{-51}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot t_1\right)}\\
\mathbf{elif}\;\ell \leq 9.2 \cdot 10^{+141}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot t_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.8e-51Initial program 57.9%
Taylor expanded in Om around inf 49.2%
unpow249.2%
associate-/l*50.3%
Simplified50.3%
if 1.8e-51 < l < 9.2000000000000006e141Initial program 50.9%
associate-*l*55.7%
sub-neg55.7%
associate-+l-55.7%
sub-neg55.7%
associate-/l*55.7%
remove-double-neg55.7%
associate-*l*55.7%
Simplified55.7%
Taylor expanded in Om around inf 49.2%
unpow249.2%
associate-/l*49.2%
Simplified49.2%
if 9.2000000000000006e141 < l Initial program 28.9%
Simplified56.7%
Taylor expanded in t around 0 42.8%
pow1/244.2%
associate-/l*50.8%
*-commutative50.8%
*-commutative50.8%
Applied egg-rr50.8%
Taylor expanded in n around 0 40.8%
associate-*r*40.8%
unpow240.8%
Simplified40.8%
Final simplification49.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 5.6e+35) (sqrt (* (* (* 2.0 n) U) t)) (pow (* -4.0 (/ n (/ Om (* U (* l l))))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.6e+35) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = pow((-4.0 * (n / (Om / (U * (l * l))))), 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 (l <= 5.6d+35) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = ((-4.0d0) * (n / (om / (u * (l * l))))) ** 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 (l <= 5.6e+35) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.pow((-4.0 * (n / (Om / (U * (l * l))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5.6e+35: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.pow((-4.0 * (n / (Om / (U * (l * l))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.6e+35) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = Float64(-4.0 * Float64(n / Float64(Om / Float64(U * Float64(l * l))))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 5.6e+35) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = (-4.0 * (n / (Om / (U * (l * l))))) ^ 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[l, 5.6e+35], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(n / N[(Om / N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.6 \cdot 10^{+35}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \frac{n}{\frac{Om}{U \cdot \left(\ell \cdot \ell\right)}}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 5.59999999999999997e35Initial program 57.7%
Taylor expanded in t around inf 45.9%
if 5.59999999999999997e35 < l Initial program 34.4%
Simplified55.6%
Taylor expanded in t around 0 44.0%
pow1/244.9%
associate-/l*51.6%
*-commutative51.6%
*-commutative51.6%
Applied egg-rr51.6%
Taylor expanded in n around 0 35.5%
associate-/l*37.7%
*-commutative37.7%
unpow237.7%
Simplified37.7%
Final simplification44.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.8e+84) (sqrt (* (* (* 2.0 n) U) t)) (pow (* -4.0 (/ (* U (* n (* l l))) Om)) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.8e+84) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = pow((-4.0 * ((U * (n * (l * l))) / Om)), 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 (l <= 2.8d+84) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = ((-4.0d0) * ((u * (n * (l * l))) / om)) ** 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 (l <= 2.8e+84) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.pow((-4.0 * ((U * (n * (l * l))) / Om)), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.8e+84: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.pow((-4.0 * ((U * (n * (l * l))) / Om)), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.8e+84) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = Float64(-4.0 * Float64(Float64(U * Float64(n * Float64(l * l))) / Om)) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.8e+84) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = (-4.0 * ((U * (n * (l * l))) / Om)) ^ 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[l, 2.8e+84], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(N[(U * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.8 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 2.79999999999999982e84Initial program 57.4%
Taylor expanded in t around inf 45.4%
if 2.79999999999999982e84 < l Initial program 33.0%
Simplified57.0%
Taylor expanded in t around 0 46.4%
pow1/247.4%
associate-/l*55.0%
*-commutative55.0%
*-commutative55.0%
Applied egg-rr55.0%
Taylor expanded in n around 0 37.1%
associate-*r*42.4%
unpow242.4%
Simplified42.4%
Final simplification44.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 8e+81) (sqrt (* (* (* 2.0 n) U) t)) (sqrt (* -4.0 (/ n (/ Om (* U (* l l))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8e+81) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = sqrt((-4.0 * (n / (Om / (U * (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 (l <= 8d+81) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = sqrt(((-4.0d0) * (n / (om / (u * (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 (l <= 8e+81) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.sqrt((-4.0 * (n / (Om / (U * (l * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 8e+81: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.sqrt((-4.0 * (n / (Om / (U * (l * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 8e+81) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = sqrt(Float64(-4.0 * Float64(n / Float64(Om / Float64(U * 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 (l <= 8e+81) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = sqrt((-4.0 * (n / (Om / (U * (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[LessEqual[l, 8e+81], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(n / N[(Om / N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 8 \cdot 10^{+81}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{n}{\frac{Om}{U \cdot \left(\ell \cdot \ell\right)}}}\\
\end{array}
\end{array}
if l < 7.99999999999999937e81Initial program 57.4%
Taylor expanded in t around inf 45.4%
if 7.99999999999999937e81 < l Initial program 33.0%
Simplified57.0%
Taylor expanded in t around 0 46.4%
Taylor expanded in n around 0 26.3%
associate-/l*28.8%
*-commutative28.8%
unpow228.8%
Simplified28.8%
Final simplification42.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* 1.25e+24) (sqrt (* (* (* 2.0 n) U) t)) (pow (* 2.0 (* n (* U t))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= 1.25e+24) {
tmp = sqrt((((2.0 * n) * U) * t));
} else {
tmp = pow((2.0 * (n * (U * 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 (u_42 <= 1.25d+24) then
tmp = sqrt((((2.0d0 * n) * u) * t))
else
tmp = (2.0d0 * (n * (u * 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 (U_42_ <= 1.25e+24) {
tmp = Math.sqrt((((2.0 * n) * U) * t));
} else {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= 1.25e+24: tmp = math.sqrt((((2.0 * n) * U) * t)) else: tmp = math.pow((2.0 * (n * (U * t))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= 1.25e+24) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)); else tmp = Float64(2.0 * Float64(n * Float64(U * 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 (U_42_ <= 1.25e+24) tmp = sqrt((((2.0 * n) * U) * t)); else tmp = (2.0 * (n * (U * 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[U$42$, 1.25e+24], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq 1.25 \cdot 10^{+24}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if U* < 1.25000000000000011e24Initial program 52.9%
Taylor expanded in t around inf 41.1%
if 1.25000000000000011e24 < U* Initial program 56.7%
Simplified62.2%
Taylor expanded in t around inf 36.1%
pow1/241.1%
associate-*l*41.1%
*-commutative41.1%
Applied egg-rr41.1%
Final simplification41.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* 2.0 n) (* U t))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt(((2.0 * n) * (U * 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 * n) * (u * 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 * n) * (U * t)));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * n) * (U * t)))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * n) * Float64(U * t))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * n) * (U * t))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}
\end{array}
Initial program 53.8%
Simplified58.1%
Taylor expanded in t around inf 37.2%
Final simplification37.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) t)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * 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 * n) * u) * 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 * n) * U) * t));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * t))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * t)) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * t)); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}
\end{array}
Initial program 53.8%
Taylor expanded in t around inf 39.4%
Final simplification39.4%
herbie shell --seed 2023240
(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*))))))