
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 5e-301)
(sqrt (* 2.0 (* U (* n (fma -2.0 (* l (/ l Om)) t)))))
(if (<= t_1 2e+295)
(sqrt t_1)
(*
(* 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 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-301) {
tmp = sqrt((2.0 * (U * (n * fma(-2.0, (l * (l / Om)), t)))));
} else if (t_1 <= 2e+295) {
tmp = sqrt(t_1);
} else {
tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om));
}
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-301) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * fma(-2.0, Float64(l * Float64(l / Om)), t))))); elseif (t_1 <= 2e+295) tmp = sqrt(t_1); 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
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-301], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 2e+295], N[Sqrt[t$95$1], $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}
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^{-301}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\right)\right)}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;\sqrt{t_1}\\
\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 (*.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.00000000000000013e-301Initial program 14.8%
Simplified45.4%
Taylor expanded in n around 0 45.2%
associate-*r*47.3%
+-commutative47.3%
unpow247.3%
fma-def47.3%
associate-*r/49.5%
Simplified49.5%
if 5.00000000000000013e-301 < (*.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*)))) < 2e295Initial program 97.1%
if 2e295 < (*.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 22.1%
Simplified39.7%
Taylor expanded in t around inf 41.7%
distribute-lft-out41.7%
*-commutative41.7%
associate-/l*43.3%
+-commutative43.3%
*-commutative43.3%
associate-*r*43.5%
*-commutative43.5%
associate-*r*41.7%
associate-*l/45.0%
fma-udef45.0%
*-commutative45.0%
Simplified45.0%
Taylor expanded in U* around inf 43.5%
Taylor expanded in l around inf 40.1%
Final simplification62.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2e-100)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(if (<= l 0.009)
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (/ n (/ (* Om Om) (* l l))) (- U* U)))))
(if (<= l 2.6e+82)
(sqrt
(*
(* 2.0 n)
(* U (+ t (* (/ l Om) (fma l -2.0 (* (/ l Om) (* n (- U* U)))))))))
(*
(* 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 <= 2e-100) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (l <= 0.009) {
tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n / ((Om * Om) / (l * l))) * (U_42_ - U)))));
} else if (l <= 2.6e+82) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l / Om) * fma(l, -2.0, ((l / Om) * (n * (U_42_ - U)))))))));
} else {
tmp = (l * sqrt(2.0)) * 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 <= 2e-100) 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))))); elseif (l <= 0.009) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n / Float64(Float64(Om * Om) / Float64(l * l))) * Float64(U_42_ - U))))); elseif (l <= 2.6e+82) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(Float64(l / Om) * Float64(n * Float64(U_42_ - U))))))))); 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
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2e-100], 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], If[LessEqual[l, 0.009], 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[(N[(Om * Om), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.6e+82], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(N[(l / Om), $MachinePrecision] * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 2 \cdot 10^{-100}:\\
\;\;\;\;\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{elif}\;\ell \leq 0.009:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \frac{n}{\frac{Om \cdot Om}{\ell \cdot \ell}} \cdot \left(U* - U\right)\right)}\\
\mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+82}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right)\right)\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 < 2e-100Initial program 50.9%
Simplified55.7%
Taylor expanded in U around 0 55.9%
if 2e-100 < l < 0.00899999999999999932Initial program 62.8%
Taylor expanded in n around 0 62.7%
associate-/l*62.8%
unpow262.8%
unpow262.8%
Simplified62.8%
if 0.00899999999999999932 < l < 2.5999999999999998e82Initial program 67.5%
Simplified68.0%
if 2.5999999999999998e82 < l Initial program 25.7%
Simplified52.4%
Taylor expanded in t around inf 49.6%
distribute-lft-out49.6%
*-commutative49.6%
associate-/l*53.4%
+-commutative53.4%
*-commutative53.4%
associate-*r*53.5%
*-commutative53.5%
associate-*r*55.6%
associate-*l/63.7%
fma-udef63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in U* around inf 54.0%
Taylor expanded in l around inf 78.4%
Final simplification61.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.15e+40)
(sqrt
(*
(* 2.0 n)
(*
U
(+ t (- (* n (* (pow (/ l Om) 2.0) (- U* U))) (* 2.0 (/ l (/ Om l))))))))
(* (* 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.15e+40) {
tmp = sqrt(((2.0 * n) * (U * (t + ((n * (pow((l / Om), 2.0) * (U_42_ - U))) - (2.0 * (l / (Om / l))))))));
} 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.15d+40) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((n * (((l / om) ** 2.0d0) * (u_42 - u))) - (2.0d0 * (l / (om / l))))))))
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.15e+40) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((n * (Math.pow((l / Om), 2.0) * (U_42_ - U))) - (2.0 * (l / (Om / l))))))));
} 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.15e+40: tmp = math.sqrt(((2.0 * n) * (U * (t + ((n * (math.pow((l / Om), 2.0) * (U_42_ - U))) - (2.0 * (l / (Om / l)))))))) 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.15e+40) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U))) - Float64(2.0 * Float64(l / Float64(Om / l)))))))); 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.15e+40) tmp = sqrt(((2.0 * n) * (U * (t + ((n * (((l / Om) ^ 2.0) * (U_42_ - U))) - (2.0 * (l / (Om / l)))))))); 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.15e+40], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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.15 \cdot 10^{+40}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \left(n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right) - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\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.14999999999999997e40Initial program 52.0%
associate-*l*54.7%
sub-neg54.7%
associate-+l-54.7%
sub-neg54.7%
associate-/l*56.2%
remove-double-neg56.2%
associate-*l*56.2%
Simplified56.2%
if 1.14999999999999997e40 < l Initial program 34.2%
Simplified54.6%
Taylor expanded in t around inf 55.4%
distribute-lft-out55.4%
*-commutative55.4%
associate-/l*58.5%
+-commutative58.5%
*-commutative58.5%
associate-*r*58.6%
*-commutative58.6%
associate-*r*60.3%
associate-*l/66.9%
fma-udef66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in U* around inf 59.0%
Taylor expanded in l around inf 77.4%
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 (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))))
(if (<= l 2.2e-100)
t_1
(if (<= l 0.027)
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (/ n (/ (* Om Om) (* l l))) (- U* U)))))
(if (<= l 7.8e+67)
t_1
(*
(* 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 t_1 = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
double tmp;
if (l <= 2.2e-100) {
tmp = t_1;
} else if (l <= 0.027) {
tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n / ((Om * Om) / (l * l))) * (U_42_ - U)))));
} else if (l <= 7.8e+67) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
if (l <= 2.2d-100) then
tmp = t_1
else if (l <= 0.027d0) then
tmp = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n / ((om * om) / (l * l))) * (u_42 - u)))))
else if (l <= 7.8d+67) then
tmp = t_1
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 t_1 = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
double tmp;
if (l <= 2.2e-100) {
tmp = t_1;
} else if (l <= 0.027) {
tmp = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n / ((Om * Om) / (l * l))) * (U_42_ - U)))));
} else if (l <= 7.8e+67) {
tmp = t_1;
} 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_): t_1 = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) tmp = 0 if l <= 2.2e-100: tmp = t_1 elif l <= 0.027: tmp = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n / ((Om * Om) / (l * l))) * (U_42_ - U))))) elif l <= 7.8e+67: tmp = t_1 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_) t_1 = 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))))) tmp = 0.0 if (l <= 2.2e-100) tmp = t_1; elseif (l <= 0.027) tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n / Float64(Float64(Om * Om) / Float64(l * l))) * Float64(U_42_ - U))))); elseif (l <= 7.8e+67) tmp = t_1; 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_) t_1 = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); tmp = 0.0; if (l <= 2.2e-100) tmp = t_1; elseif (l <= 0.027) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n / ((Om * Om) / (l * l))) * (U_42_ - U))))); elseif (l <= 7.8e+67) tmp = t_1; 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$_] := Block[{t$95$1 = 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]}, If[LessEqual[l, 2.2e-100], t$95$1, If[LessEqual[l, 0.027], 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[(N[(Om * Om), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 7.8e+67], t$95$1, 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}
t_1 := \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{if}\;\ell \leq 2.2 \cdot 10^{-100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\ell \leq 0.027:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \frac{n}{\frac{Om \cdot Om}{\ell \cdot \ell}} \cdot \left(U* - U\right)\right)}\\
\mathbf{elif}\;\ell \leq 7.8 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\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 < 2.19999999999999989e-100 or 0.0269999999999999997 < l < 7.80000000000000013e67Initial program 51.7%
Simplified56.2%
Taylor expanded in U around 0 56.9%
if 2.19999999999999989e-100 < l < 0.0269999999999999997Initial program 62.8%
Taylor expanded in n around 0 62.7%
associate-/l*62.8%
unpow262.8%
unpow262.8%
Simplified62.8%
if 7.80000000000000013e67 < l Initial program 29.4%
Simplified54.1%
Taylor expanded in t around inf 53.3%
distribute-lft-out53.3%
*-commutative53.3%
associate-/l*56.9%
+-commutative56.9%
*-commutative56.9%
associate-*r*56.9%
*-commutative56.9%
associate-*r*58.9%
associate-*l/66.3%
fma-udef66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in U* around inf 57.4%
Taylor expanded in l around inf 79.9%
Final simplification62.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)))
(*
2.0
(/ (* (- (* l -2.0) (/ (* n (* l (- U U*))) Om)) (* n (* U l))) Om)))))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))) + (2.0 * ((((l * -2.0) - ((n * (l * (U - U_42_))) / Om)) * (n * (U * l))) / Om))));
}
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))) + (2.0d0 * ((((l * (-2.0d0)) - ((n * (l * (u - u_42))) / om)) * (n * (u * l))) / om))))
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))) + (2.0 * ((((l * -2.0) - ((n * (l * (U - U_42_))) / Om)) * (n * (U * l))) / Om))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt(((2.0 * (n * (U * t))) + (2.0 * ((((l * -2.0) - ((n * (l * (U - U_42_))) / Om)) * (n * (U * l))) / Om))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(Float64(Float64(l * -2.0) - Float64(Float64(n * Float64(l * Float64(U - U_42_))) / Om)) * Float64(n * Float64(U * l))) / Om)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * ((((l * -2.0) - ((n * (l * (U - U_42_))) / Om)) * (n * (U * l))) / Om)))); 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[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(N[(N[(l * -2.0), $MachinePrecision] - N[(N[(n * N[(l * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{\left(\ell \cdot -2 - \frac{n \cdot \left(\ell \cdot \left(U - U*\right)\right)}{Om}\right) \cdot \left(n \cdot \left(U \cdot \ell\right)\right)}{Om}}
\end{array}
Initial program 47.8%
Simplified55.4%
Taylor expanded in t around inf 55.6%
Final simplification55.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= Om -1.2e-49) (not (<= Om 3.9e-118)))
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))
(sqrt
(* -2.0 (/ n (/ (/ (/ Om U) (- 2.0 (/ n (/ Om (- U* U))))) (* l l)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -1.2e-49) || !(Om <= 3.9e-118)) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * (n / (((Om / U) / (2.0 - (n / (Om / (U_42_ - 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 ((om <= (-1.2d-49)) .or. (.not. (om <= 3.9d-118))) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
else
tmp = sqrt(((-2.0d0) * (n / (((om / u) / (2.0d0 - (n / (om / (u_42 - 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 ((Om <= -1.2e-49) || !(Om <= 3.9e-118)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * (n / (((Om / U) / (2.0 - (n / (Om / (U_42_ - U))))) / (l * l)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -1.2e-49) or not (Om <= 3.9e-118): tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * (n / (((Om / U) / (2.0 - (n / (Om / (U_42_ - U))))) / (l * l))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -1.2e-49) || !(Om <= 3.9e-118)) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(-2.0 * Float64(n / Float64(Float64(Float64(Om / U) / Float64(2.0 - Float64(n / Float64(Om / Float64(U_42_ - 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 ((Om <= -1.2e-49) || ~((Om <= 3.9e-118))) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * (n / (((Om / U) / (2.0 - (n / (Om / (U_42_ - 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[Or[LessEqual[Om, -1.2e-49], N[Not[LessEqual[Om, 3.9e-118]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(n / N[(N[(N[(Om / U), $MachinePrecision] / N[(2.0 - N[(n / N[(Om / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.2 \cdot 10^{-49} \lor \neg \left(Om \leq 3.9 \cdot 10^{-118}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{\frac{\frac{Om}{U}}{2 - \frac{n}{\frac{Om}{U* - U}}}}{\ell \cdot \ell}}}\\
\end{array}
\end{array}
if Om < -1.19999999999999996e-49 or 3.90000000000000001e-118 < Om Initial program 51.3%
associate-*l*52.3%
sub-neg52.3%
associate-+l-52.3%
sub-neg52.3%
associate-/l*57.1%
remove-double-neg57.1%
associate-*l*55.5%
Simplified55.5%
Taylor expanded in Om around inf 46.3%
unpow246.3%
associate-*r/50.3%
Simplified50.3%
if -1.19999999999999996e-49 < Om < 3.90000000000000001e-118Initial program 39.2%
Simplified61.4%
Taylor expanded in l around -inf 49.2%
associate-/l*50.5%
*-commutative50.5%
associate-/r*50.4%
*-commutative50.4%
associate-/r*50.4%
mul-1-neg50.4%
unsub-neg50.4%
associate-/l*50.3%
unpow250.3%
Simplified50.3%
Final simplification50.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= Om -7.2e-24) (not (<= Om 1.3e-168)))
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))
(sqrt
(* 2.0 (/ (* n (* l (* U (+ (* l -2.0) (/ (* n (* l U*)) Om))))) Om)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -7.2e-24) || !(Om <= 1.3e-168)) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((2.0 * ((n * (l * (U * ((l * -2.0) + ((n * (l * U_42_)) / Om))))) / 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 ((om <= (-7.2d-24)) .or. (.not. (om <= 1.3d-168))) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
else
tmp = sqrt((2.0d0 * ((n * (l * (u * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))))) / 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 ((Om <= -7.2e-24) || !(Om <= 1.3e-168)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((2.0 * ((n * (l * (U * ((l * -2.0) + ((n * (l * U_42_)) / Om))))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -7.2e-24) or not (Om <= 1.3e-168): tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((2.0 * ((n * (l * (U * ((l * -2.0) + ((n * (l * U_42_)) / Om))))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -7.2e-24) || !(Om <= 1.3e-168)) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(l * Float64(U * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))))) / Om))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((Om <= -7.2e-24) || ~((Om <= 1.3e-168))) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))); else tmp = sqrt((2.0 * ((n * (l * (U * ((l * -2.0) + ((n * (l * U_42_)) / Om))))) / Om))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -7.2e-24], N[Not[LessEqual[Om, 1.3e-168]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(l * N[(U * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -7.2 \cdot 10^{-24} \lor \neg \left(Om \leq 1.3 \cdot 10^{-168}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\ell \cdot \left(U \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)\right)\right)}{Om}}\\
\end{array}
\end{array}
if Om < -7.2000000000000002e-24 or 1.3e-168 < Om Initial program 50.7%
associate-*l*52.5%
sub-neg52.5%
associate-+l-52.5%
sub-neg52.5%
associate-/l*57.0%
remove-double-neg57.0%
associate-*l*55.4%
Simplified55.4%
Taylor expanded in Om around inf 46.8%
unpow246.8%
associate-*r/50.6%
Simplified50.6%
if -7.2000000000000002e-24 < Om < 1.3e-168Initial program 39.2%
Simplified62.1%
Taylor expanded in t around 0 56.1%
Taylor expanded in U around 0 59.9%
Final simplification53.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= Om 1.4e+89)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= 1.4e+89) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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 (om <= 1.4d+89) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / 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 (Om <= 1.4e+89) {
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) * (U * (t - (2.0 * (l * (l / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= 1.4e+89: 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) * (U * (t - (2.0 * (l * (l / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= 1.4e+89) 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(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= 1.4e+89) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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[Om, 1.4e+89], 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[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq 1.4 \cdot 10^{+89}:\\
\;\;\;\;\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(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if Om < 1.3999999999999999e89Initial program 48.3%
Simplified56.6%
Taylor expanded in U around 0 55.2%
if 1.3999999999999999e89 < Om Initial program 45.7%
associate-*l*47.5%
sub-neg47.5%
associate-+l-47.5%
sub-neg47.5%
associate-/l*58.8%
remove-double-neg58.8%
associate-*l*56.8%
Simplified56.8%
Taylor expanded in Om around inf 47.8%
unpow247.8%
associate-*r/56.3%
Simplified56.3%
Final simplification55.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* -3.6e+68) (sqrt (* -2.0 (/ n (/ Om (* (* l l) (/ (- n) (/ Om (* U U*)))))))) (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -3.6e+68) {
tmp = sqrt((-2.0 * (n / (Om / ((l * l) * (-n / (Om / (U * U_42_))))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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 (u_42 <= (-3.6d+68)) then
tmp = sqrt(((-2.0d0) * (n / (om / ((l * l) * (-n / (om / (u * u_42))))))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / 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 (U_42_ <= -3.6e+68) {
tmp = Math.sqrt((-2.0 * (n / (Om / ((l * l) * (-n / (Om / (U * U_42_))))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -3.6e+68: tmp = math.sqrt((-2.0 * (n / (Om / ((l * l) * (-n / (Om / (U * U_42_)))))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -3.6e+68) tmp = sqrt(Float64(-2.0 * Float64(n / Float64(Om / Float64(Float64(l * l) * Float64(Float64(-n) / Float64(Om / Float64(U * U_42_)))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -3.6e+68) tmp = sqrt((-2.0 * (n / (Om / ((l * l) * (-n / (Om / (U * U_42_)))))))); else tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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[U$42$, -3.6e+68], N[Sqrt[N[(-2.0 * N[(n / N[(Om / N[(N[(l * l), $MachinePrecision] * N[((-n) / N[(Om / N[(U * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -3.6 \cdot 10^{+68}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \frac{-n}{\frac{Om}{U \cdot U*}}}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if U* < -3.5999999999999999e68Initial program 46.8%
Simplified52.2%
Taylor expanded in l around -inf 37.2%
associate-/l*37.2%
unpow237.2%
*-commutative37.2%
mul-1-neg37.2%
associate-/l*35.7%
Simplified35.7%
Taylor expanded in U* around inf 38.9%
mul-1-neg38.9%
associate-/l*39.0%
distribute-neg-frac39.0%
Simplified39.0%
if -3.5999999999999999e68 < U* Initial program 48.1%
associate-*l*51.1%
sub-neg51.1%
associate-+l-51.1%
sub-neg51.1%
associate-/l*55.0%
remove-double-neg55.0%
associate-*l*54.4%
Simplified54.4%
Taylor expanded in Om around inf 47.1%
unpow247.1%
associate-*r/50.5%
Simplified50.5%
Final simplification48.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* -3.9e+53) (sqrt (* -2.0 (/ n (/ Om (* (* l l) (/ (* n (- (* U U*))) Om)))))) (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -3.9e+53) {
tmp = sqrt((-2.0 * (n / (Om / ((l * l) * ((n * -(U * U_42_)) / Om))))));
} else {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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 (u_42 <= (-3.9d+53)) then
tmp = sqrt(((-2.0d0) * (n / (om / ((l * l) * ((n * -(u * u_42)) / om))))))
else
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / 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 (U_42_ <= -3.9e+53) {
tmp = Math.sqrt((-2.0 * (n / (Om / ((l * l) * ((n * -(U * U_42_)) / Om))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -3.9e+53: tmp = math.sqrt((-2.0 * (n / (Om / ((l * l) * ((n * -(U * U_42_)) / Om)))))) else: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -3.9e+53) tmp = sqrt(Float64(-2.0 * Float64(n / Float64(Om / Float64(Float64(l * l) * Float64(Float64(n * Float64(-Float64(U * U_42_))) / Om)))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -3.9e+53) tmp = sqrt((-2.0 * (n / (Om / ((l * l) * ((n * -(U * U_42_)) / Om)))))); else tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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[U$42$, -3.9e+53], N[Sqrt[N[(-2.0 * N[(n / N[(Om / N[(N[(l * l), $MachinePrecision] * N[(N[(n * (-N[(U * U$42$), $MachinePrecision])), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -3.9 \cdot 10^{+53}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \frac{n \cdot \left(-U \cdot U*\right)}{Om}}}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if U* < -3.89999999999999976e53Initial program 46.9%
Simplified52.1%
Taylor expanded in l around -inf 37.7%
associate-/l*37.8%
unpow237.8%
*-commutative37.8%
mul-1-neg37.8%
associate-/l*36.3%
Simplified36.3%
Taylor expanded in U* around inf 39.3%
if -3.89999999999999976e53 < U* Initial program 48.1%
associate-*l*51.1%
sub-neg51.1%
associate-+l-51.1%
sub-neg51.1%
associate-/l*55.0%
remove-double-neg55.0%
associate-*l*54.5%
Simplified54.5%
Taylor expanded in Om around inf 47.5%
unpow247.5%
associate-*r/50.9%
Simplified50.9%
Final simplification48.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2e-133)
(sqrt (* 2.0 (* U (* n t))))
(if (<= l 5.35e+247)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))
(pow (* 2.0 (* (* -2.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 <= 2e-133) {
tmp = sqrt((2.0 * (U * (n * t))));
} else if (l <= 5.35e+247) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = pow((2.0 * ((-2.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 <= 2d-133) then
tmp = sqrt((2.0d0 * (u * (n * t))))
else if (l <= 5.35d+247) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
else
tmp = (2.0d0 * (((-2.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 <= 2e-133) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} else if (l <= 5.35e+247) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
} else {
tmp = Math.pow((2.0 * ((-2.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 <= 2e-133: tmp = math.sqrt((2.0 * (U * (n * t)))) elif l <= 5.35e+247: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) else: tmp = math.pow((2.0 * ((-2.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 <= 2e-133) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); elseif (l <= 5.35e+247) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); else tmp = Float64(2.0 * Float64(Float64(-2.0 * Float64(n / 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 <= 2e-133) tmp = sqrt((2.0 * (U * (n * t)))); elseif (l <= 5.35e+247) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))); else tmp = (2.0 * ((-2.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, 2e-133], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 5.35e+247], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(-2.0 * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2 \cdot 10^{-133}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 5.35 \cdot 10^{+247}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(-2 \cdot \frac{n}{Om}\right) \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 2.0000000000000001e-133Initial program 50.6%
Simplified55.5%
Taylor expanded in n around 0 45.0%
associate-*r*46.8%
+-commutative46.8%
unpow246.8%
fma-def46.8%
associate-*r/48.6%
Simplified48.6%
Taylor expanded in l around 0 36.6%
if 2.0000000000000001e-133 < l < 5.3500000000000001e247Initial program 49.2%
associate-*l*48.0%
sub-neg48.0%
associate-+l-48.0%
sub-neg48.0%
associate-/l*54.8%
remove-double-neg54.8%
associate-*l*52.0%
Simplified52.0%
Taylor expanded in Om around inf 42.8%
unpow242.8%
associate-*r/47.7%
Simplified47.7%
if 5.3500000000000001e247 < l Initial program 17.6%
Simplified50.1%
Taylor expanded in t around 0 43.5%
Taylor expanded in n around 0 18.6%
associate-/l*18.6%
associate-*r/18.6%
*-commutative18.6%
unpow218.6%
Simplified18.6%
pow1/244.9%
associate-/r/44.2%
associate-*r/44.2%
Applied egg-rr44.2%
Final simplification40.3%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* -3.9e+53) (sqrt (* 2.0 (/ (* n (/ n (/ Om (* (* l l) (* U U*))))) Om))) (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -3.9e+53) {
tmp = sqrt((2.0 * ((n * (n / (Om / ((l * l) * (U * U_42_))))) / Om)));
} else {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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 (u_42 <= (-3.9d+53)) then
tmp = sqrt((2.0d0 * ((n * (n / (om / ((l * l) * (u * u_42))))) / om)))
else
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / 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 (U_42_ <= -3.9e+53) {
tmp = Math.sqrt((2.0 * ((n * (n / (Om / ((l * l) * (U * U_42_))))) / Om)));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -3.9e+53: tmp = math.sqrt((2.0 * ((n * (n / (Om / ((l * l) * (U * U_42_))))) / Om))) else: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -3.9e+53) tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(n / Float64(Om / Float64(Float64(l * l) * Float64(U * U_42_))))) / Om))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -3.9e+53) tmp = sqrt((2.0 * ((n * (n / (Om / ((l * l) * (U * U_42_))))) / Om))); else tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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[U$42$, -3.9e+53], N[Sqrt[N[(2.0 * N[(N[(n * N[(n / N[(Om / N[(N[(l * l), $MachinePrecision] * N[(U * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -3.9 \cdot 10^{+53}:\\
\;\;\;\;\sqrt{2 \cdot \frac{n \cdot \frac{n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \left(U \cdot U*\right)}}}{Om}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
\end{array}
\end{array}
if U* < -3.89999999999999976e53Initial program 46.9%
Simplified52.1%
Taylor expanded in t around 0 40.0%
Taylor expanded in U* around inf 39.5%
associate-/l*37.8%
unpow237.8%
Simplified37.8%
if -3.89999999999999976e53 < U* Initial program 48.1%
associate-*l*51.1%
sub-neg51.1%
associate-+l-51.1%
sub-neg51.1%
associate-/l*55.0%
remove-double-neg55.0%
associate-*l*54.5%
Simplified54.5%
Taylor expanded in Om around inf 47.5%
unpow247.5%
associate-*r/50.9%
Simplified50.9%
Final simplification48.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5e-63)
(sqrt (* 2.0 (* U (* n t))))
(if (<= l 9.8e+38)
(sqrt (* (* 2.0 n) (* U t)))
(pow (* 2.0 (* (* -2.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 <= 5e-63) {
tmp = sqrt((2.0 * (U * (n * t))));
} else if (l <= 9.8e+38) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = pow((2.0 * ((-2.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 <= 5d-63) then
tmp = sqrt((2.0d0 * (u * (n * t))))
else if (l <= 9.8d+38) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = (2.0d0 * (((-2.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 <= 5e-63) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} else if (l <= 9.8e+38) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.pow((2.0 * ((-2.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 <= 5e-63: tmp = math.sqrt((2.0 * (U * (n * t)))) elif l <= 9.8e+38: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.pow((2.0 * ((-2.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 <= 5e-63) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); elseif (l <= 9.8e+38) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = Float64(2.0 * Float64(Float64(-2.0 * Float64(n / 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 <= 5e-63) tmp = sqrt((2.0 * (U * (n * t)))); elseif (l <= 9.8e+38) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = (2.0 * ((-2.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, 5e-63], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 9.8e+38], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(-2.0 * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5 \cdot 10^{-63}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 9.8 \cdot 10^{+38}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(-2 \cdot \frac{n}{Om}\right) \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 5.0000000000000002e-63Initial program 50.7%
Simplified54.1%
Taylor expanded in n around 0 44.5%
associate-*r*46.7%
+-commutative46.7%
unpow246.7%
fma-def46.7%
associate-*r/48.3%
Simplified48.3%
Taylor expanded in l around 0 37.2%
if 5.0000000000000002e-63 < l < 9.80000000000000004e38Initial program 66.3%
Simplified72.0%
Taylor expanded in t around inf 37.6%
if 9.80000000000000004e38 < l Initial program 34.2%
Simplified54.6%
Taylor expanded in t around 0 45.9%
Taylor expanded in n around 0 30.0%
associate-/l*30.0%
associate-*r/30.0%
*-commutative30.0%
unpow230.0%
Simplified30.0%
pow1/245.1%
associate-/r/44.6%
associate-*r/44.6%
Applied egg-rr44.6%
Final simplification39.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2.25e-63)
(sqrt (* 2.0 (* U (* n t))))
(if (<= l 3.4e+39)
(sqrt (* (* 2.0 n) (* U t)))
(sqrt (* 2.0 (* U (/ (* n -2.0) (/ Om (* l l)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.25e-63) {
tmp = sqrt((2.0 * (U * (n * t))));
} else if (l <= 3.4e+39) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = sqrt((2.0 * (U * ((n * -2.0) / (Om / (l * l))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 2.25d-63) then
tmp = sqrt((2.0d0 * (u * (n * t))))
else if (l <= 3.4d+39) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = sqrt((2.0d0 * (u * ((n * (-2.0d0)) / (om / (l * l))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.25e-63) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} else if (l <= 3.4e+39) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.sqrt((2.0 * (U * ((n * -2.0) / (Om / (l * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.25e-63: tmp = math.sqrt((2.0 * (U * (n * t)))) elif l <= 3.4e+39: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.sqrt((2.0 * (U * ((n * -2.0) / (Om / (l * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.25e-63) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); elseif (l <= 3.4e+39) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(Float64(n * -2.0) / Float64(Om / Float64(l * l)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.25e-63) tmp = sqrt((2.0 * (U * (n * t)))); elseif (l <= 3.4e+39) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = sqrt((2.0 * (U * ((n * -2.0) / (Om / (l * l)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.25e-63], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.4e+39], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(N[(n * -2.0), $MachinePrecision] / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.25 \cdot 10^{-63}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 3.4 \cdot 10^{+39}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \frac{n \cdot -2}{\frac{Om}{\ell \cdot \ell}}\right)}\\
\end{array}
\end{array}
if l < 2.25e-63Initial program 50.7%
Simplified54.1%
Taylor expanded in n around 0 44.5%
associate-*r*46.7%
+-commutative46.7%
unpow246.7%
fma-def46.7%
associate-*r/48.3%
Simplified48.3%
Taylor expanded in l around 0 37.2%
if 2.25e-63 < l < 3.3999999999999999e39Initial program 66.3%
Simplified72.0%
Taylor expanded in t around inf 37.6%
if 3.3999999999999999e39 < l Initial program 34.2%
Simplified54.6%
Taylor expanded in n around 0 31.8%
associate-*r*33.3%
+-commutative33.3%
unpow233.3%
fma-def33.3%
associate-*r/42.1%
Simplified42.1%
Taylor expanded in l around inf 31.5%
associate-/l*30.0%
associate-*r/30.0%
*-commutative30.0%
unpow230.0%
Simplified30.0%
Final simplification35.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2.9e-63)
(sqrt (* 2.0 (* U (* n t))))
(if (<= l 1.65e+41)
(sqrt (* (* 2.0 n) (* U t)))
(sqrt (/ (* n -4.0) (/ 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 <= 2.9e-63) {
tmp = sqrt((2.0 * (U * (n * t))));
} else if (l <= 1.65e+41) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = sqrt(((n * -4.0) / (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 <= 2.9d-63) then
tmp = sqrt((2.0d0 * (u * (n * t))))
else if (l <= 1.65d+41) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = sqrt(((n * (-4.0d0)) / (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 <= 2.9e-63) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} else if (l <= 1.65e+41) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.sqrt(((n * -4.0) / (Om / (U * (l * l)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.9e-63: tmp = math.sqrt((2.0 * (U * (n * t)))) elif l <= 1.65e+41: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.sqrt(((n * -4.0) / (Om / (U * (l * l))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.9e-63) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); elseif (l <= 1.65e+41) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = sqrt(Float64(Float64(n * -4.0) / 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 <= 2.9e-63) tmp = sqrt((2.0 * (U * (n * t)))); elseif (l <= 1.65e+41) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = sqrt(((n * -4.0) / (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, 2.9e-63], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.65e+41], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(n * -4.0), $MachinePrecision] / N[(Om / N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.9 \cdot 10^{-63}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+41}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{n \cdot -4}{\frac{Om}{U \cdot \left(\ell \cdot \ell\right)}}}\\
\end{array}
\end{array}
if l < 2.89999999999999975e-63Initial program 50.7%
Simplified54.1%
Taylor expanded in n around 0 44.5%
associate-*r*46.7%
+-commutative46.7%
unpow246.7%
fma-def46.7%
associate-*r/48.3%
Simplified48.3%
Taylor expanded in l around 0 37.2%
if 2.89999999999999975e-63 < l < 1.65e41Initial program 66.3%
Simplified72.0%
Taylor expanded in t around inf 37.6%
if 1.65e41 < l Initial program 34.2%
Simplified54.6%
Taylor expanded in l around -inf 48.2%
associate-/l*48.2%
unpow248.2%
*-commutative48.2%
mul-1-neg48.2%
associate-/l*48.2%
Simplified48.2%
*-un-lft-identity48.2%
associate-/r/47.7%
unsub-neg47.7%
associate-/r/47.7%
Applied egg-rr47.7%
*-lft-identity47.7%
associate-*r*47.7%
unpow247.7%
associate-*r*47.7%
*-commutative47.7%
unpow247.7%
*-commutative47.7%
Simplified47.7%
Taylor expanded in n around 0 30.0%
associate-/l*30.0%
*-commutative30.0%
unpow230.0%
associate-*r/30.0%
Simplified30.0%
Final simplification35.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* -9e-168) (sqrt (* 2.0 (* U (* n 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_ <= -9e-168) {
tmp = sqrt((2.0 * (U * (n * 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 <= (-9d-168)) then
tmp = sqrt((2.0d0 * (u * (n * 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_ <= -9e-168) {
tmp = Math.sqrt((2.0 * (U * (n * 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_ <= -9e-168: tmp = math.sqrt((2.0 * (U * (n * 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_ <= -9e-168) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); else tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -9e-168) tmp = sqrt((2.0 * (U * (n * 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$, -9e-168], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -9 \cdot 10^{-168}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if U* < -9.0000000000000002e-168Initial program 47.1%
Simplified52.6%
Taylor expanded in n around 0 32.4%
associate-*r*38.4%
+-commutative38.4%
unpow238.4%
fma-def38.4%
associate-*r/41.8%
Simplified41.8%
Taylor expanded in l around 0 31.8%
if -9.0000000000000002e-168 < U* Initial program 48.2%
Simplified57.2%
Taylor expanded in t around inf 31.3%
pow1/232.1%
associate-*l*32.1%
*-commutative32.1%
Applied egg-rr32.1%
Final simplification32.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* -6e-168) (sqrt (* 2.0 (* U (* n t)))) (sqrt (* (* 2.0 n) (* U t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -6e-168) {
tmp = sqrt((2.0 * (U * (n * t))));
} else {
tmp = sqrt(((2.0 * n) * (U * t)));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u_42 <= (-6d-168)) then
tmp = sqrt((2.0d0 * (u * (n * t))))
else
tmp = sqrt(((2.0d0 * n) * (u * t)))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -6e-168) {
tmp = Math.sqrt((2.0 * (U * (n * t))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -6e-168: tmp = math.sqrt((2.0 * (U * (n * t)))) else: tmp = math.sqrt(((2.0 * n) * (U * t))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -6e-168) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -6e-168) tmp = sqrt((2.0 * (U * (n * t)))); else tmp = sqrt(((2.0 * n) * (U * t))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, -6e-168], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -6 \cdot 10^{-168}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\end{array}
\end{array}
if U* < -5.99999999999999983e-168Initial program 47.1%
Simplified52.6%
Taylor expanded in n around 0 32.4%
associate-*r*38.4%
+-commutative38.4%
unpow238.4%
fma-def38.4%
associate-*r/41.8%
Simplified41.8%
Taylor expanded in l around 0 31.8%
if -5.99999999999999983e-168 < U* Initial program 48.2%
Simplified57.2%
Taylor expanded in t around inf 31.3%
Final simplification31.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (u * (n * t))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * t))));
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 47.8%
Simplified55.4%
Taylor expanded in n around 0 42.4%
associate-*r*43.6%
+-commutative43.6%
unpow243.6%
fma-def43.6%
associate-*r/46.8%
Simplified46.8%
Taylor expanded in l around 0 29.9%
Final simplification29.9%
herbie shell --seed 2023224
(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*))))))