
(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 15 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 0.0)
(sqrt (* 2.0 (* U (* n (fma -2.0 (* l (/ l Om)) t)))))
(if (<= t_1 4e+296)
(sqrt t_1)
(*
(* l (sqrt 2.0))
(sqrt (/ (* n (* U (- (/ (* n (- U* 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 <= 0.0) {
tmp = sqrt((2.0 * (U * (n * fma(-2.0, (l * (l / Om)), t)))));
} else if (t_1 <= 4e+296) {
tmp = sqrt(t_1);
} else {
tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * (U_42_ - U)) / 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 <= 0.0) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * fma(-2.0, Float64(l * Float64(l / Om)), t))))); elseif (t_1 <= 4e+296) tmp = sqrt(t_1); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * Float64(U_42_ - U)) / 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, 0.0], 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, 4e+296], 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 * N[(U$42$ - U), $MachinePrecision]), $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 0:\\
\;\;\;\;\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 4 \cdot 10^{+296}:\\
\;\;\;\;\sqrt{t_1}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot \left(U* - U\right)}{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*)))) < 0.0Initial program 13.1%
Simplified40.9%
Taylor expanded in n around 0 40.5%
associate-*r*40.5%
+-commutative40.5%
unpow240.5%
fma-def40.5%
associate-*r/43.1%
Simplified43.1%
if 0.0 < (*.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*)))) < 3.99999999999999993e296Initial program 95.3%
if 3.99999999999999993e296 < (*.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.7%
Simplified40.9%
Taylor expanded in t around inf 44.8%
Taylor expanded in l around inf 29.9%
Final simplification59.5%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 2.5e+124)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(*
(sqrt 2.0)
(* l (sqrt (* n (* U (- (/ n (/ (* Om Om) U*)) (/ 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 <= 2.5e+124) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = sqrt(2.0) * (l * sqrt((n * (U * ((n / ((Om * Om) / U_42_)) - (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 <= 2.5d+124) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else
tmp = sqrt(2.0d0) * (l * sqrt((n * (u * ((n / ((om * om) / u_42)) - (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 <= 2.5e+124) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt((n * (U * ((n / ((Om * Om) / U_42_)) - (2.0 / Om))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.5e+124: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) else: tmp = math.sqrt(2.0) * (l * math.sqrt((n * (U * ((n / ((Om * Om) / U_42_)) - (2.0 / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.5e+124) 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(sqrt(2.0) * Float64(l * sqrt(Float64(n * Float64(U * Float64(Float64(n / Float64(Float64(Om * Om) / U_42_)) - Float64(2.0 / Om))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.5e+124) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); else tmp = sqrt(2.0) * (l * sqrt((n * (U * ((n / ((Om * Om) / U_42_)) - (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, 2.5e+124], 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[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n * N[(U * N[(N[(n / N[(N[(Om * Om), $MachinePrecision] / U$42$), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.5 \cdot 10^{+124}:\\
\;\;\;\;\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{2} \cdot \left(\ell \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{\frac{Om \cdot Om}{U*}} - \frac{2}{Om}\right)\right)}\right)\\
\end{array}
\end{array}
if l < 2.4999999999999998e124Initial program 53.9%
Simplified58.8%
Taylor expanded in U around 0 59.4%
if 2.4999999999999998e124 < l Initial program 41.5%
Simplified64.0%
Taylor expanded in U around 0 49.1%
Taylor expanded in l around inf 74.6%
associate-*l*74.5%
*-commutative74.5%
associate-/l*77.7%
unpow277.7%
associate-*r/77.7%
metadata-eval77.7%
Simplified77.7%
Final simplification61.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.3e+123)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(*
(* l (sqrt 2.0))
(sqrt (/ (* n (* U (- (/ (* n (- U* 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.3e+123) {
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_ - U)) / 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.3d+123) 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 - u)) / 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.3e+123) {
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_ - U)) / Om) - 2.0))) / Om));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.3e+123: 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_ - U)) / Om) - 2.0))) / Om)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.3e+123) 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 * Float64(U_42_ - U)) / 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.3e+123) 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_ - U)) / 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.3e+123], 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 * N[(U$42$ - U), $MachinePrecision]), $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.3 \cdot 10^{+123}:\\
\;\;\;\;\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 \left(U* - U\right)}{Om} - 2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.29999999999999993e123Initial program 54.1%
Simplified59.0%
Taylor expanded in U around 0 59.7%
if 1.29999999999999993e123 < l Initial program 40.2%
Simplified62.2%
Taylor expanded in t around inf 55.6%
Taylor expanded in l around inf 78.6%
Final simplification62.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* 2.0 (* n (* U t))))
(t_2 (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))))
(t_3 (* n (* U l))))
(if (<= Om -1.5e+149)
t_2
(if (<= Om -1.7e-244)
(sqrt
(-
t_1
(*
2.0
(* (- (* l -2.0) (/ (* (- U U*) (* n l)) Om)) (* t_3 (/ -1.0 Om))))))
(if (<= Om 2.75e-149)
(sqrt
(*
(* 2.0 n)
(*
U
(+ t (/ (* l (- (* l -2.0) (* (* U* (* n l)) (/ -1.0 Om)))) Om)))))
(if (<= Om 8.5e+165)
(sqrt
(+
t_1
(*
2.0
(/ (* t_3 (+ (* l -2.0) (/ (* n (* l (- U* U))) Om))) Om))))
t_2))))))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));
double t_2 = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
double t_3 = n * (U * l);
double tmp;
if (Om <= -1.5e+149) {
tmp = t_2;
} else if (Om <= -1.7e-244) {
tmp = sqrt((t_1 - (2.0 * (((l * -2.0) - (((U - U_42_) * (n * l)) / Om)) * (t_3 * (-1.0 / Om))))));
} else if (Om <= 2.75e-149) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) - ((U_42_ * (n * l)) * (-1.0 / Om)))) / Om)))));
} else if (Om <= 8.5e+165) {
tmp = sqrt((t_1 + (2.0 * ((t_3 * ((l * -2.0) + ((n * (l * (U_42_ - U))) / Om))) / Om))));
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * (n * (u * t))
t_2 = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
t_3 = n * (u * l)
if (om <= (-1.5d+149)) then
tmp = t_2
else if (om <= (-1.7d-244)) then
tmp = sqrt((t_1 - (2.0d0 * (((l * (-2.0d0)) - (((u - u_42) * (n * l)) / om)) * (t_3 * ((-1.0d0) / om))))))
else if (om <= 2.75d-149) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) - ((u_42 * (n * l)) * ((-1.0d0) / om)))) / om)))))
else if (om <= 8.5d+165) then
tmp = sqrt((t_1 + (2.0d0 * ((t_3 * ((l * (-2.0d0)) + ((n * (l * (u_42 - u))) / om))) / om))))
else
tmp = t_2
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = 2.0 * (n * (U * t));
double t_2 = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
double t_3 = n * (U * l);
double tmp;
if (Om <= -1.5e+149) {
tmp = t_2;
} else if (Om <= -1.7e-244) {
tmp = Math.sqrt((t_1 - (2.0 * (((l * -2.0) - (((U - U_42_) * (n * l)) / Om)) * (t_3 * (-1.0 / Om))))));
} else if (Om <= 2.75e-149) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) - ((U_42_ * (n * l)) * (-1.0 / Om)))) / Om)))));
} else if (Om <= 8.5e+165) {
tmp = Math.sqrt((t_1 + (2.0 * ((t_3 * ((l * -2.0) + ((n * (l * (U_42_ - U))) / Om))) / Om))));
} else {
tmp = t_2;
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = 2.0 * (n * (U * t)) t_2 = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) t_3 = n * (U * l) tmp = 0 if Om <= -1.5e+149: tmp = t_2 elif Om <= -1.7e-244: tmp = math.sqrt((t_1 - (2.0 * (((l * -2.0) - (((U - U_42_) * (n * l)) / Om)) * (t_3 * (-1.0 / Om)))))) elif Om <= 2.75e-149: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) - ((U_42_ * (n * l)) * (-1.0 / Om)))) / Om))))) elif Om <= 8.5e+165: tmp = math.sqrt((t_1 + (2.0 * ((t_3 * ((l * -2.0) + ((n * (l * (U_42_ - U))) / Om))) / Om)))) else: tmp = t_2 return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(2.0 * Float64(n * Float64(U * t))) t_2 = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))) t_3 = Float64(n * Float64(U * l)) tmp = 0.0 if (Om <= -1.5e+149) tmp = t_2; elseif (Om <= -1.7e-244) tmp = sqrt(Float64(t_1 - Float64(2.0 * Float64(Float64(Float64(l * -2.0) - Float64(Float64(Float64(U - U_42_) * Float64(n * l)) / Om)) * Float64(t_3 * Float64(-1.0 / Om)))))); elseif (Om <= 2.75e-149) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) - Float64(Float64(U_42_ * Float64(n * l)) * Float64(-1.0 / Om)))) / Om))))); elseif (Om <= 8.5e+165) tmp = sqrt(Float64(t_1 + Float64(2.0 * Float64(Float64(t_3 * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * Float64(U_42_ - U))) / Om))) / Om)))); else tmp = t_2; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = 2.0 * (n * (U * t)); t_2 = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); t_3 = n * (U * l); tmp = 0.0; if (Om <= -1.5e+149) tmp = t_2; elseif (Om <= -1.7e-244) tmp = sqrt((t_1 - (2.0 * (((l * -2.0) - (((U - U_42_) * (n * l)) / Om)) * (t_3 * (-1.0 / Om)))))); elseif (Om <= 2.75e-149) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) - ((U_42_ * (n * l)) * (-1.0 / Om)))) / Om))))); elseif (Om <= 8.5e+165) tmp = sqrt((t_1 + (2.0 * ((t_3 * ((l * -2.0) + ((n * (l * (U_42_ - U))) / Om))) / Om)))); else tmp = t_2; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Om, -1.5e+149], t$95$2, If[LessEqual[Om, -1.7e-244], N[Sqrt[N[(t$95$1 - N[(2.0 * N[(N[(N[(l * -2.0), $MachinePrecision] - N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[(t$95$3 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 2.75e-149], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] - N[(N[(U$42$ * N[(n * l), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 8.5e+165], N[Sqrt[N[(t$95$1 + N[(2.0 * N[(N[(t$95$3 * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := 2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\\
t_2 := \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\
t_3 := n \cdot \left(U \cdot \ell\right)\\
\mathbf{if}\;Om \leq -1.5 \cdot 10^{+149}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;Om \leq -1.7 \cdot 10^{-244}:\\
\;\;\;\;\sqrt{t_1 - 2 \cdot \left(\left(\ell \cdot -2 - \frac{\left(U - U*\right) \cdot \left(n \cdot \ell\right)}{Om}\right) \cdot \left(t_3 \cdot \frac{-1}{Om}\right)\right)}\\
\mathbf{elif}\;Om \leq 2.75 \cdot 10^{-149}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 - \left(U* \cdot \left(n \cdot \ell\right)\right) \cdot \frac{-1}{Om}\right)}{Om}\right)\right)}\\
\mathbf{elif}\;Om \leq 8.5 \cdot 10^{+165}:\\
\;\;\;\;\sqrt{t_1 + 2 \cdot \frac{t_3 \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot \left(U* - U\right)\right)}{Om}\right)}{Om}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if Om < -1.50000000000000002e149 or 8.5000000000000001e165 < Om Initial program 53.9%
Simplified57.4%
Taylor expanded in n around 0 57.6%
*-commutative57.6%
unpow257.6%
associate-*r/66.4%
Simplified66.4%
if -1.50000000000000002e149 < Om < -1.70000000000000004e-244Initial program 52.9%
Simplified55.5%
Taylor expanded in t around inf 61.6%
div-inv61.6%
associate-/l*59.1%
*-commutative59.1%
Applied egg-rr59.1%
associate-*l*58.2%
associate-/l*60.9%
+-commutative60.9%
*-commutative60.9%
associate-*l/59.6%
Simplified59.6%
Taylor expanded in n around 0 60.9%
associate-*r*66.4%
Simplified66.4%
if -1.70000000000000004e-244 < Om < 2.75000000000000021e-149Initial program 51.6%
Simplified77.7%
Taylor expanded in U around 0 74.7%
div-inv74.6%
associate-*r*74.8%
Applied egg-rr74.8%
if 2.75000000000000021e-149 < Om < 8.5000000000000001e165Initial program 49.5%
Simplified57.0%
Taylor expanded in t around inf 66.8%
Final simplification67.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 6.2e+71)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (- (* l -2.0) (* (* U* (* n l)) (/ -1.0 Om)))) Om)))))
(sqrt
(-
(* 2.0 (* n (* U t)))
(*
2.0
(*
(+ (* l -2.0) (* (* l (- U* U)) (/ n Om)))
(* (* n (* U l)) (/ -1.0 Om))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.2e+71) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) - ((U_42_ * (n * l)) * (-1.0 / Om)))) / Om)))));
} else {
tmp = sqrt(((2.0 * (n * (U * t))) - (2.0 * (((l * -2.0) + ((l * (U_42_ - U)) * (n / Om))) * ((n * (U * l)) * (-1.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 <= 6.2d+71) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) - ((u_42 * (n * l)) * ((-1.0d0) / om)))) / om)))))
else
tmp = sqrt(((2.0d0 * (n * (u * t))) - (2.0d0 * (((l * (-2.0d0)) + ((l * (u_42 - u)) * (n / om))) * ((n * (u * l)) * ((-1.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 <= 6.2e+71) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) - ((U_42_ * (n * l)) * (-1.0 / Om)))) / Om)))));
} else {
tmp = Math.sqrt(((2.0 * (n * (U * t))) - (2.0 * (((l * -2.0) + ((l * (U_42_ - U)) * (n / Om))) * ((n * (U * l)) * (-1.0 / Om))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.2e+71: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) - ((U_42_ * (n * l)) * (-1.0 / Om)))) / Om))))) else: tmp = math.sqrt(((2.0 * (n * (U * t))) - (2.0 * (((l * -2.0) + ((l * (U_42_ - U)) * (n / Om))) * ((n * (U * l)) * (-1.0 / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.2e+71) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) - Float64(Float64(U_42_ * Float64(n * l)) * Float64(-1.0 / Om)))) / Om))))); else tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) - Float64(2.0 * Float64(Float64(Float64(l * -2.0) + Float64(Float64(l * Float64(U_42_ - U)) * Float64(n / Om))) * Float64(Float64(n * Float64(U * l)) * Float64(-1.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 <= 6.2e+71) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) - ((U_42_ * (n * l)) * (-1.0 / Om)))) / Om))))); else tmp = sqrt(((2.0 * (n * (U * t))) - (2.0 * (((l * -2.0) + ((l * (U_42_ - U)) * (n / Om))) * ((n * (U * l)) * (-1.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, 6.2e+71], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] - N[(N[(U$42$ * N[(n * l), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(N[(N[(l * -2.0), $MachinePrecision] + N[(N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision] * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.2 \cdot 10^{+71}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 - \left(U* \cdot \left(n \cdot \ell\right)\right) \cdot \frac{-1}{Om}\right)}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) - 2 \cdot \left(\left(\ell \cdot -2 + \left(\ell \cdot \left(U* - U\right)\right) \cdot \frac{n}{Om}\right) \cdot \left(\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \frac{-1}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 6.20000000000000036e71Initial program 55.8%
Simplified61.0%
Taylor expanded in U around 0 61.6%
div-inv61.6%
associate-*r*61.1%
Applied egg-rr61.1%
if 6.20000000000000036e71 < l Initial program 35.4%
Simplified52.1%
Taylor expanded in t around inf 47.2%
div-inv47.2%
associate-/l*49.0%
*-commutative49.0%
Applied egg-rr49.0%
associate-*l*49.7%
associate-/l*47.9%
+-commutative47.9%
*-commutative47.9%
associate-*l/50.0%
Simplified50.0%
Final simplification59.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (or (<= Om -2.4e-117) (not (<= Om 1.45e-117)))
(sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om)))))))
(sqrt
(* -2.0 (* (/ n Om) (* l (* l (* U (+ 2.0 (/ (* n (- U U*)) Om))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((Om <= -2.4e-117) || !(Om <= 1.45e-117)) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * ((n / Om) * (l * (l * (U * (2.0 + ((n * (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 ((om <= (-2.4d-117)) .or. (.not. (om <= 1.45d-117))) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt(((-2.0d0) * ((n / om) * (l * (l * (u * (2.0d0 + ((n * (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 ((Om <= -2.4e-117) || !(Om <= 1.45e-117)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * ((n / Om) * (l * (l * (U * (2.0 + ((n * (U - U_42_)) / Om))))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -2.4e-117) or not (Om <= 1.45e-117): tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * ((n / Om) * (l * (l * (U * (2.0 + ((n * (U - U_42_)) / Om)))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -2.4e-117) || !(Om <= 1.45e-117)) 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 / Om) * Float64(l * Float64(l * Float64(U * Float64(2.0 + Float64(Float64(n * 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 ((Om <= -2.4e-117) || ~((Om <= 1.45e-117))) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * ((n / Om) * (l * (l * (U * (2.0 + ((n * (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[Or[LessEqual[Om, -2.4e-117], N[Not[LessEqual[Om, 1.45e-117]], $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 / Om), $MachinePrecision] * N[(l * N[(l * N[(U * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -2.4 \cdot 10^{-117} \lor \neg \left(Om \leq 1.45 \cdot 10^{-117}\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 \left(\frac{n}{Om} \cdot \left(\ell \cdot \left(\ell \cdot \left(U \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)\right)\right)\right)}\\
\end{array}
\end{array}
if Om < -2.40000000000000014e-117 or 1.45e-117 < Om Initial program 52.1%
Simplified56.8%
Taylor expanded in n around 0 54.4%
*-commutative54.4%
unpow254.4%
associate-*r/59.4%
Simplified59.4%
if -2.40000000000000014e-117 < Om < 1.45e-117Initial program 53.0%
Simplified68.1%
Taylor expanded in l around -inf 58.1%
unpow258.1%
*-commutative58.1%
mul-1-neg58.1%
associate-/l*47.3%
Simplified47.3%
Taylor expanded in l around 0 54.6%
associate-/l*46.7%
*-commutative46.7%
associate-*l/46.6%
associate-*r*50.1%
unpow250.1%
associate-/r/61.2%
associate-*l*64.9%
associate-*l/64.9%
Simplified64.9%
Final simplification60.7%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 5.2e+80)
(sqrt
(*
(* 2.0 n)
(* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
(if (<= l 7.6e+208)
(sqrt
(* -2.0 (* (/ n Om) (* l (* l (* U (+ 2.0 (/ (* n (- U U*)) Om))))))))
(pow (* -4.0 (/ (* U (* l (* n 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 <= 5.2e+80) {
tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (l <= 7.6e+208) {
tmp = sqrt((-2.0 * ((n / Om) * (l * (l * (U * (2.0 + ((n * (U - U_42_)) / Om))))))));
} else {
tmp = pow((-4.0 * ((U * (l * (n * 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 <= 5.2d+80) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
else if (l <= 7.6d+208) then
tmp = sqrt(((-2.0d0) * ((n / om) * (l * (l * (u * (2.0d0 + ((n * (u - u_42)) / om))))))))
else
tmp = ((-4.0d0) * ((u * (l * (n * 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 <= 5.2e+80) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
} else if (l <= 7.6e+208) {
tmp = Math.sqrt((-2.0 * ((n / Om) * (l * (l * (U * (2.0 + ((n * (U - U_42_)) / Om))))))));
} else {
tmp = Math.pow((-4.0 * ((U * (l * (n * l))) / Om)), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5.2e+80: tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))) elif l <= 7.6e+208: tmp = math.sqrt((-2.0 * ((n / Om) * (l * (l * (U * (2.0 + ((n * (U - U_42_)) / Om)))))))) else: tmp = math.pow((-4.0 * ((U * (l * (n * l))) / Om)), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.2e+80) 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 <= 7.6e+208) tmp = sqrt(Float64(-2.0 * Float64(Float64(n / Om) * Float64(l * Float64(l * Float64(U * Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om)))))))); else tmp = Float64(-4.0 * Float64(Float64(U * Float64(l * Float64(n * 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 <= 5.2e+80) tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))); elseif (l <= 7.6e+208) tmp = sqrt((-2.0 * ((n / Om) * (l * (l * (U * (2.0 + ((n * (U - U_42_)) / Om)))))))); else tmp = (-4.0 * ((U * (l * (n * 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, 5.2e+80], 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, 7.6e+208], N[Sqrt[N[(-2.0 * N[(N[(n / Om), $MachinePrecision] * N[(l * N[(l * N[(U * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(N[(U * N[(l * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.2 \cdot 10^{+80}:\\
\;\;\;\;\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 7.6 \cdot 10^{+208}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\frac{n}{Om} \cdot \left(\ell \cdot \left(\ell \cdot \left(U \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 5.19999999999999963e80Initial program 54.9%
Simplified59.9%
Taylor expanded in U around 0 60.6%
if 5.19999999999999963e80 < l < 7.6000000000000004e208Initial program 46.2%
Simplified60.6%
Taylor expanded in l around -inf 60.6%
unpow260.6%
*-commutative60.6%
mul-1-neg60.6%
associate-/l*54.7%
Simplified54.7%
Taylor expanded in l around 0 60.6%
associate-/l*46.8%
*-commutative46.8%
associate-*l/46.8%
associate-*r*46.8%
unpow246.8%
associate-/r/60.9%
associate-*l*69.5%
associate-*l/69.5%
Simplified69.5%
if 7.6000000000000004e208 < l Initial program 28.8%
Simplified51.9%
Taylor expanded in l around -inf 41.8%
unpow241.8%
*-commutative41.8%
mul-1-neg41.8%
associate-/l*41.8%
Simplified41.8%
Taylor expanded in n around 0 30.2%
associate-*r*30.2%
unpow230.2%
Simplified30.2%
pow1/241.8%
associate-*r*41.8%
metadata-eval41.8%
*-commutative41.8%
associate-*r*57.7%
Applied egg-rr57.7%
Final simplification61.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (or (<= Om -1.35e-117) (not (<= Om 1.6e-117))) (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))) (sqrt (* -2.0 (/ (* n (* (* l l) (* U (- 2.0 (/ (* n 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 <= -1.35e-117) || !(Om <= 1.6e-117)) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = sqrt((-2.0 * ((n * ((l * l) * (U * (2.0 - ((n * 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 <= (-1.35d-117)) .or. (.not. (om <= 1.6d-117))) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = sqrt(((-2.0d0) * ((n * ((l * l) * (u * (2.0d0 - ((n * 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 <= -1.35e-117) || !(Om <= 1.6e-117)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.sqrt((-2.0 * ((n * ((l * l) * (U * (2.0 - ((n * U_42_) / Om))))) / Om)));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if (Om <= -1.35e-117) or not (Om <= 1.6e-117): tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.sqrt((-2.0 * ((n * ((l * l) * (U * (2.0 - ((n * U_42_) / Om))))) / Om))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if ((Om <= -1.35e-117) || !(Om <= 1.6e-117)) 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(Float64(l * l) * Float64(U * Float64(2.0 - Float64(Float64(n * 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 <= -1.35e-117) || ~((Om <= 1.6e-117))) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = sqrt((-2.0 * ((n * ((l * l) * (U * (2.0 - ((n * 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, -1.35e-117], N[Not[LessEqual[Om, 1.6e-117]], $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[(l * l), $MachinePrecision] * N[(U * N[(2.0 - N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.35 \cdot 10^{-117} \lor \neg \left(Om \leq 1.6 \cdot 10^{-117}\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(\left(\ell \cdot \ell\right) \cdot \left(U \cdot \left(2 - \frac{n \cdot U*}{Om}\right)\right)\right)}{Om}}\\
\end{array}
\end{array}
if Om < -1.35000000000000001e-117 or 1.59999999999999998e-117 < Om Initial program 52.1%
Simplified56.8%
Taylor expanded in n around 0 54.4%
*-commutative54.4%
unpow254.4%
associate-*r/59.4%
Simplified59.4%
if -1.35000000000000001e-117 < Om < 1.59999999999999998e-117Initial program 53.0%
Simplified68.1%
Taylor expanded in l around -inf 58.1%
unpow258.1%
*-commutative58.1%
mul-1-neg58.1%
associate-/l*47.3%
Simplified47.3%
Taylor expanded in U* around inf 57.0%
Final simplification58.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (or (<= Om -1.85e-117) (not (<= Om 3e-123))) (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))) (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 ((Om <= -1.85e-117) || !(Om <= 3e-123)) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} 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 ((om <= (-1.85d-117)) .or. (.not. (om <= 3d-123))) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
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 ((Om <= -1.85e-117) || !(Om <= 3e-123)) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} 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 (Om <= -1.85e-117) or not (Om <= 3e-123): tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) 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 ((Om <= -1.85e-117) || !(Om <= 3e-123)) 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(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 ((Om <= -1.85e-117) || ~((Om <= 3e-123))) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); 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[Or[LessEqual[Om, -1.85e-117], N[Not[LessEqual[Om, 3e-123]], $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) / N[(Om / N[(N[(l * l), $MachinePrecision] * N[(U * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.85 \cdot 10^{-117} \lor \neg \left(Om \leq 3 \cdot 10^{-123}\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 \frac{-n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \left(U \cdot U*\right)}}}{Om}}\\
\end{array}
\end{array}
if Om < -1.8500000000000001e-117 or 2.99999999999999984e-123 < Om Initial program 51.9%
Simplified56.5%
Taylor expanded in n around 0 54.2%
*-commutative54.2%
unpow254.2%
associate-*r/59.1%
Simplified59.1%
if -1.8500000000000001e-117 < Om < 2.99999999999999984e-123Initial program 53.9%
Simplified69.2%
Taylor expanded in l around -inf 57.3%
unpow257.3%
*-commutative57.3%
mul-1-neg57.3%
associate-/l*46.4%
Simplified46.4%
Taylor expanded in U* around inf 49.2%
mul-1-neg49.2%
associate-/l*49.3%
distribute-neg-frac49.3%
*-commutative49.3%
unpow249.3%
Simplified49.3%
Final simplification56.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 5.8e+165) (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 (* l (/ l Om))))))) (pow (* -4.0 (/ (* U (* l (* n 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 <= 5.8e+165) {
tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = pow((-4.0 * ((U * (l * (n * 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 <= 5.8d+165) then
tmp = sqrt(((2.0d0 * n) * (u * (t + ((-2.0d0) * (l * (l / om)))))))
else
tmp = ((-4.0d0) * ((u * (l * (n * 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 <= 5.8e+165) {
tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om)))))));
} else {
tmp = Math.pow((-4.0 * ((U * (l * (n * l))) / Om)), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5.8e+165: tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))) else: tmp = math.pow((-4.0 * ((U * (l * (n * l))) / Om)), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.8e+165) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))); else tmp = Float64(-4.0 * Float64(Float64(U * Float64(l * Float64(n * 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 <= 5.8e+165) tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * (l * (l / Om))))))); else tmp = (-4.0 * ((U * (l * (n * 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, 5.8e+165], 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[(-4.0 * N[(N[(U * N[(l * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.8 \cdot 10^{+165}:\\
\;\;\;\;\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(-4 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 5.80000000000000011e165Initial program 53.5%
Simplified59.5%
Taylor expanded in n around 0 50.3%
*-commutative50.3%
unpow250.3%
associate-*r/53.6%
Simplified53.6%
if 5.80000000000000011e165 < l Initial program 38.9%
Simplified58.8%
Taylor expanded in l around -inf 50.1%
unpow250.1%
*-commutative50.1%
mul-1-neg50.1%
associate-/l*50.1%
Simplified50.1%
Taylor expanded in n around 0 40.2%
associate-*r*40.2%
unpow240.2%
Simplified40.2%
pow1/250.1%
associate-*r*50.1%
metadata-eval50.1%
*-commutative50.1%
associate-*r*63.8%
Applied egg-rr63.8%
Final simplification54.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 9.2e+39) (pow (* (* 2.0 n) (* U t)) 0.5) (pow (* -4.0 (/ (* U (* l (* n 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 <= 9.2e+39) {
tmp = pow(((2.0 * n) * (U * t)), 0.5);
} else {
tmp = pow((-4.0 * ((U * (l * (n * 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 <= 9.2d+39) then
tmp = ((2.0d0 * n) * (u * t)) ** 0.5d0
else
tmp = ((-4.0d0) * ((u * (l * (n * 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 <= 9.2e+39) {
tmp = Math.pow(((2.0 * n) * (U * t)), 0.5);
} else {
tmp = Math.pow((-4.0 * ((U * (l * (n * l))) / Om)), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 9.2e+39: tmp = math.pow(((2.0 * n) * (U * t)), 0.5) else: tmp = math.pow((-4.0 * ((U * (l * (n * l))) / Om)), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 9.2e+39) tmp = Float64(Float64(2.0 * n) * Float64(U * t)) ^ 0.5; else tmp = Float64(-4.0 * Float64(Float64(U * Float64(l * Float64(n * 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 <= 9.2e+39) tmp = ((2.0 * n) * (U * t)) ^ 0.5; else tmp = (-4.0 * ((U * (l * (n * 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, 9.2e+39], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(-4.0 * N[(N[(U * N[(l * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 9.2 \cdot 10^{+39}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 9.20000000000000047e39Initial program 55.3%
Simplified60.6%
Taylor expanded in t around inf 43.8%
pow1/244.4%
Applied egg-rr44.4%
if 9.20000000000000047e39 < l Initial program 40.4%
Simplified54.7%
Taylor expanded in l around -inf 45.5%
unpow245.5%
*-commutative45.5%
mul-1-neg45.5%
associate-/l*43.0%
Simplified43.0%
Taylor expanded in n around 0 27.6%
associate-*r*31.4%
unpow231.4%
Simplified31.4%
pow1/241.7%
associate-*r*41.7%
metadata-eval41.7%
*-commutative41.7%
associate-*r*47.4%
Applied egg-rr47.4%
Final simplification45.0%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.1e+40) (pow (* (* 2.0 n) (* U t)) 0.5) (sqrt (* -4.0 (/ n (/ (/ Om (* l l)) U))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.1e+40) {
tmp = pow(((2.0 * n) * (U * t)), 0.5);
} else {
tmp = sqrt((-4.0 * (n / ((Om / (l * l)) / 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.1d+40) then
tmp = ((2.0d0 * n) * (u * t)) ** 0.5d0
else
tmp = sqrt(((-4.0d0) * (n / ((om / (l * l)) / 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.1e+40) {
tmp = Math.pow(((2.0 * n) * (U * t)), 0.5);
} else {
tmp = Math.sqrt((-4.0 * (n / ((Om / (l * l)) / U))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.1e+40: tmp = math.pow(((2.0 * n) * (U * t)), 0.5) else: tmp = math.sqrt((-4.0 * (n / ((Om / (l * l)) / U)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.1e+40) tmp = Float64(Float64(2.0 * n) * Float64(U * t)) ^ 0.5; else tmp = sqrt(Float64(-4.0 * Float64(n / Float64(Float64(Om / Float64(l * l)) / 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.1e+40) tmp = ((2.0 * n) * (U * t)) ^ 0.5; else tmp = sqrt((-4.0 * (n / ((Om / (l * l)) / 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.1e+40], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(n / N[(N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision] / U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.1 \cdot 10^{+40}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{n}{\frac{\frac{Om}{\ell \cdot \ell}}{U}}}\\
\end{array}
\end{array}
if l < 1.0999999999999999e40Initial program 55.3%
Simplified60.6%
Taylor expanded in t around inf 43.8%
pow1/244.4%
Applied egg-rr44.4%
if 1.0999999999999999e40 < l Initial program 40.4%
Simplified54.7%
Taylor expanded in l around -inf 45.5%
unpow245.5%
*-commutative45.5%
mul-1-neg45.5%
associate-/l*43.0%
Simplified43.0%
Taylor expanded in n around 0 27.6%
associate-*r*31.4%
unpow231.4%
Simplified31.4%
*-un-lft-identity31.4%
associate-*r*31.4%
metadata-eval31.4%
*-commutative31.4%
associate-*r*37.0%
Applied egg-rr37.0%
*-lft-identity37.0%
*-commutative37.0%
associate-*l*31.4%
unpow231.4%
associate-*r*27.6%
associate-/l*27.1%
associate-/r*27.5%
unpow227.5%
Simplified27.5%
Final simplification41.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (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_) {
return pow(((2.0 * n) * (U * t)), 0.5);
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = ((2.0d0 * n) * (u * t)) ** 0.5d0
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.pow(((2.0 * n) * (U * t)), 0.5);
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.pow(((2.0 * n) * (U * t)), 0.5)
l = abs(l) function code(n, U, t, l, Om, U_42_) return Float64(Float64(2.0 * n) * Float64(U * t)) ^ 0.5 end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = ((2.0 * n) * (U * t)) ^ 0.5; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}
\end{array}
Initial program 52.3%
Simplified59.4%
Taylor expanded in t around inf 37.8%
pow1/239.5%
Applied egg-rr39.5%
Final simplification39.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 52.3%
Simplified59.4%
Taylor expanded in t around inf 37.8%
pow1/239.5%
Applied egg-rr39.5%
unpow-prod-down22.8%
*-commutative22.8%
*-commutative22.8%
pow1/222.4%
Applied egg-rr22.4%
unpow1/222.4%
Simplified22.4%
sqrt-unprod37.8%
*-commutative37.8%
*-commutative37.8%
associate-*r*37.8%
associate-*r*36.3%
Applied egg-rr36.3%
Final simplification36.3%
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 52.3%
Simplified59.4%
Taylor expanded in t around inf 37.8%
Final simplification37.8%
herbie shell --seed 2023215
(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*))))))