
(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
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(sqrt (* 2.0 (* n (* U (+ t (* -2.0 (* l (/ l Om))))))))
(if (<= t_1 5e+151)
t_1
(*
(sqrt 2.0)
(*
l
(sqrt (* n (* U (+ (* (/ n Om) (/ (- 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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))));
} else if (t_1 <= 5e+151) {
tmp = t_1;
} else {
tmp = sqrt(2.0) * (l * sqrt((n * (U * (((n / Om) * ((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) :: t_1
real(8) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 0.0d0) then
tmp = sqrt((2.0d0 * (n * (u * (t + ((-2.0d0) * (l * (l / om))))))))
else if (t_1 <= 5d+151) then
tmp = t_1
else
tmp = sqrt(2.0d0) * (l * sqrt((n * (u * (((n / om) * ((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 t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))));
} else if (t_1 <= 5e+151) {
tmp = t_1;
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt((n * (U * (((n / Om) * ((U_42_ - U) / 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 - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om)))))))) elif t_1 <= 5e+151: tmp = t_1 else: tmp = math.sqrt(2.0) * (l * math.sqrt((n * (U * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))))))); elseif (t_1 <= 5e+151) tmp = t_1; else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n * Float64(U * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-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 - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om)))))))); elseif (t_1 <= 5e+151) tmp = t_1; else tmp = sqrt(2.0) * (l * sqrt((n * (U * (((n / Om) * ((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$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 5e+151], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n * N[(U * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 10.2%
Simplified9.9%
associate-*l/9.9%
Applied egg-rr9.9%
Taylor expanded in n around 0 50.8%
*-commutative50.8%
unpow250.8%
associate-*r/50.8%
Simplified50.8%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 5.0000000000000002e151Initial program 97.0%
if 5.0000000000000002e151 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) Initial program 21.4%
Simplified27.3%
Taylor expanded in l around inf 23.8%
associate-*l*23.8%
associate-*r*23.8%
sub-neg23.8%
associate-/l*24.0%
unpow224.0%
associate-*r/24.0%
metadata-eval24.0%
distribute-neg-frac24.0%
metadata-eval24.0%
Simplified24.0%
*-un-lft-identity24.0%
associate-*l*24.0%
associate-/l*25.9%
Applied egg-rr25.9%
*-lft-identity25.9%
associate-/r/26.7%
Simplified26.7%
Final simplification55.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 3.9e+31)
(pow (* 2.0 (* n (* U (+ t (* -2.0 (* l (/ l Om))))))) 0.5)
(*
(sqrt 2.0)
(* l (sqrt (* n (* U (+ (* (/ n Om) (/ (- 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 <= 3.9e+31) {
tmp = pow((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))), 0.5);
} else {
tmp = sqrt(2.0) * (l * sqrt((n * (U * (((n / Om) * ((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 <= 3.9d+31) then
tmp = (2.0d0 * (n * (u * (t + ((-2.0d0) * (l * (l / om))))))) ** 0.5d0
else
tmp = sqrt(2.0d0) * (l * sqrt((n * (u * (((n / om) * ((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 <= 3.9e+31) {
tmp = Math.pow((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))), 0.5);
} else {
tmp = Math.sqrt(2.0) * (l * Math.sqrt((n * (U * (((n / Om) * ((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 <= 3.9e+31: tmp = math.pow((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))), 0.5) else: tmp = math.sqrt(2.0) * (l * math.sqrt((n * (U * (((n / Om) * ((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 <= 3.9e+31) tmp = Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))) ^ 0.5; else tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n * Float64(U * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + 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 <= 3.9e+31) tmp = (2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))) ^ 0.5; else tmp = sqrt(2.0) * (l * sqrt((n * (U * (((n / Om) * ((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, 3.9e+31], N[Power[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n * N[(U * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.9 \cdot 10^{+31}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)}\right)\\
\end{array}
\end{array}
if l < 3.89999999999999999e31Initial program 49.9%
Simplified48.4%
associate-*l/50.4%
Applied egg-rr50.4%
Taylor expanded in n around 0 48.0%
*-commutative48.0%
unpow248.0%
associate-*r/49.0%
Simplified49.0%
pow1/252.0%
Applied egg-rr52.0%
if 3.89999999999999999e31 < l Initial program 38.7%
Simplified44.4%
Taylor expanded in l around inf 61.9%
associate-*l*62.0%
associate-*r*62.0%
sub-neg62.0%
associate-/l*62.5%
unpow262.5%
associate-*r/62.5%
metadata-eval62.5%
distribute-neg-frac62.5%
metadata-eval62.5%
Simplified62.5%
*-un-lft-identity62.5%
associate-*l*62.5%
associate-/l*67.2%
Applied egg-rr67.2%
*-lft-identity67.2%
associate-/r/70.7%
Simplified70.7%
Final simplification55.9%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (+ t (* -2.0 (* l (/ l Om))))))
(if (<= l 4.2e-163)
(sqrt (* (* 2.0 n) (* U t)))
(if (<= l 2.36e-23)
(sqrt (* (* 2.0 (* n U)) (+ t_1 (/ n (* (/ Om (* l l)) (/ Om U*))))))
(if (<= l 3.4e+31)
(pow (* 2.0 (* n (* U t_1))) 0.5)
(if (<= l 2.2e+143)
(sqrt
(*
-2.0
(* (* n (* l l)) (* U (- (/ 2.0 Om) (* (/ n Om) (/ U* Om)))))))
(* l (* (sqrt 2.0) (sqrt (* -2.0 (/ U (/ Om n))))))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = t + (-2.0 * (l * (l / Om)));
double tmp;
if (l <= 4.2e-163) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else if (l <= 2.36e-23) {
tmp = sqrt(((2.0 * (n * U)) * (t_1 + (n / ((Om / (l * l)) * (Om / U_42_))))));
} else if (l <= 3.4e+31) {
tmp = pow((2.0 * (n * (U * t_1))), 0.5);
} else if (l <= 2.2e+143) {
tmp = sqrt((-2.0 * ((n * (l * l)) * (U * ((2.0 / Om) - ((n / Om) * (U_42_ / Om)))))));
} else {
tmp = l * (sqrt(2.0) * sqrt((-2.0 * (U / (Om / n)))));
}
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 = t + ((-2.0d0) * (l * (l / om)))
if (l <= 4.2d-163) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else if (l <= 2.36d-23) then
tmp = sqrt(((2.0d0 * (n * u)) * (t_1 + (n / ((om / (l * l)) * (om / u_42))))))
else if (l <= 3.4d+31) then
tmp = (2.0d0 * (n * (u * t_1))) ** 0.5d0
else if (l <= 2.2d+143) then
tmp = sqrt(((-2.0d0) * ((n * (l * l)) * (u * ((2.0d0 / om) - ((n / om) * (u_42 / om)))))))
else
tmp = l * (sqrt(2.0d0) * sqrt(((-2.0d0) * (u / (om / n)))))
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 = t + (-2.0 * (l * (l / Om)));
double tmp;
if (l <= 4.2e-163) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else if (l <= 2.36e-23) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t_1 + (n / ((Om / (l * l)) * (Om / U_42_))))));
} else if (l <= 3.4e+31) {
tmp = Math.pow((2.0 * (n * (U * t_1))), 0.5);
} else if (l <= 2.2e+143) {
tmp = Math.sqrt((-2.0 * ((n * (l * l)) * (U * ((2.0 / Om) - ((n / Om) * (U_42_ / Om)))))));
} else {
tmp = l * (Math.sqrt(2.0) * Math.sqrt((-2.0 * (U / (Om / n)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = t + (-2.0 * (l * (l / Om))) tmp = 0 if l <= 4.2e-163: tmp = math.sqrt(((2.0 * n) * (U * t))) elif l <= 2.36e-23: tmp = math.sqrt(((2.0 * (n * U)) * (t_1 + (n / ((Om / (l * l)) * (Om / U_42_)))))) elif l <= 3.4e+31: tmp = math.pow((2.0 * (n * (U * t_1))), 0.5) elif l <= 2.2e+143: tmp = math.sqrt((-2.0 * ((n * (l * l)) * (U * ((2.0 / Om) - ((n / Om) * (U_42_ / Om))))))) else: tmp = l * (math.sqrt(2.0) * math.sqrt((-2.0 * (U / (Om / n))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))) tmp = 0.0 if (l <= 4.2e-163) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); elseif (l <= 2.36e-23) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t_1 + Float64(n / Float64(Float64(Om / Float64(l * l)) * Float64(Om / U_42_)))))); elseif (l <= 3.4e+31) tmp = Float64(2.0 * Float64(n * Float64(U * t_1))) ^ 0.5; elseif (l <= 2.2e+143) tmp = sqrt(Float64(-2.0 * Float64(Float64(n * Float64(l * l)) * Float64(U * Float64(Float64(2.0 / Om) - Float64(Float64(n / Om) * Float64(U_42_ / Om))))))); else tmp = Float64(l * Float64(sqrt(2.0) * sqrt(Float64(-2.0 * Float64(U / Float64(Om / n)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = t + (-2.0 * (l * (l / Om))); tmp = 0.0; if (l <= 4.2e-163) tmp = sqrt(((2.0 * n) * (U * t))); elseif (l <= 2.36e-23) tmp = sqrt(((2.0 * (n * U)) * (t_1 + (n / ((Om / (l * l)) * (Om / U_42_)))))); elseif (l <= 3.4e+31) tmp = (2.0 * (n * (U * t_1))) ^ 0.5; elseif (l <= 2.2e+143) tmp = sqrt((-2.0 * ((n * (l * l)) * (U * ((2.0 / Om) - ((n / Om) * (U_42_ / Om))))))); else tmp = l * (sqrt(2.0) * sqrt((-2.0 * (U / (Om / n))))); 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[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 4.2e-163], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.36e-23], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 + N[(n / N[(N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.4e+31], N[Power[N[(2.0 * N[(n * N[(U * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 2.2e+143], N[Sqrt[N[(-2.0 * N[(N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(U * N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l * N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(U / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\\
\mathbf{if}\;\ell \leq 4.2 \cdot 10^{-163}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{elif}\;\ell \leq 2.36 \cdot 10^{-23}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t_1 + \frac{n}{\frac{Om}{\ell \cdot \ell} \cdot \frac{Om}{U*}}\right)}\\
\mathbf{elif}\;\ell \leq 3.4 \cdot 10^{+31}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t_1\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 2.2 \cdot 10^{+143}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(U \cdot \left(\frac{2}{Om} - \frac{n}{Om} \cdot \frac{U*}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(\sqrt{2} \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\right)\\
\end{array}
\end{array}
if l < 4.19999999999999996e-163Initial program 49.2%
Simplified49.8%
Taylor expanded in l around 0 37.5%
Taylor expanded in n around 0 42.0%
associate-*r*42.0%
*-commutative42.0%
Simplified42.0%
if 4.19999999999999996e-163 < l < 2.3600000000000001e-23Initial program 64.2%
Simplified64.2%
associate-*l/64.2%
Applied egg-rr64.2%
Taylor expanded in U around 0 60.8%
mul-1-neg60.8%
associate-/l*60.8%
distribute-neg-frac60.8%
unpow260.8%
times-frac67.7%
unpow267.7%
Simplified67.7%
if 2.3600000000000001e-23 < l < 3.3999999999999998e31Initial program 33.3%
Simplified33.0%
associate-*l/32.9%
Applied egg-rr32.9%
Taylor expanded in n around 0 32.7%
*-commutative32.7%
unpow232.7%
associate-*r/32.7%
Simplified32.7%
pow1/238.9%
Applied egg-rr38.9%
if 3.3999999999999998e31 < l < 2.20000000000000014e143Initial program 49.5%
Simplified49.6%
Taylor expanded in l around inf 43.9%
*-commutative43.9%
*-commutative43.9%
unpow243.9%
+-commutative43.9%
associate-*r/43.9%
metadata-eval43.9%
associate-/l*43.9%
unpow243.9%
Simplified43.9%
Taylor expanded in U around 0 44.2%
associate-*r/44.2%
mul-1-neg44.2%
unpow244.2%
Simplified44.2%
Taylor expanded in U around 0 47.4%
associate-*r*58.5%
unpow258.5%
*-commutative58.5%
associate-*r/58.5%
metadata-eval58.5%
+-commutative58.5%
mul-1-neg58.5%
unsub-neg58.5%
unpow258.5%
times-frac58.5%
Simplified58.5%
if 2.20000000000000014e143 < l Initial program 33.6%
Simplified44.8%
Taylor expanded in l around inf 65.2%
associate-*l*65.3%
associate-*r*65.2%
sub-neg65.2%
associate-/l*66.0%
unpow266.0%
associate-*r/66.0%
metadata-eval66.0%
distribute-neg-frac66.0%
metadata-eval66.0%
Simplified66.0%
Taylor expanded in n around 0 47.4%
associate-*r/47.4%
associate-*l/47.4%
*-commutative47.4%
Simplified47.4%
pow147.4%
*-commutative47.4%
associate-*l*50.0%
Applied egg-rr50.0%
unpow150.0%
associate-*l*50.0%
associate-*r*47.4%
associate-*r/47.4%
associate-*l/47.4%
*-commutative47.4%
*-commutative47.4%
associate-/l*55.4%
Simplified55.4%
Final simplification47.6%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 6.2e+28)
(pow (* 2.0 (* n (* U t))) 0.5)
(if (<= l 8.8e+150)
(sqrt (* -2.0 (* 2.0 (/ (* (* l l) (* n U)) Om))))
(sqrt (* -2.0 (* n (* U (* 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 (l <= 6.2e+28) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else if (l <= 8.8e+150) {
tmp = sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / Om))));
} else {
tmp = sqrt((-2.0 * (n * (U * (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 (l <= 6.2d+28) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else if (l <= 8.8d+150) then
tmp = sqrt(((-2.0d0) * (2.0d0 * (((l * l) * (n * u)) / om))))
else
tmp = sqrt(((-2.0d0) * (n * (u * (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 (l <= 6.2e+28) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else if (l <= 8.8e+150) {
tmp = Math.sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / Om))));
} else {
tmp = Math.sqrt((-2.0 * (n * (U * (2.0 * (l * (l / Om)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.2e+28: tmp = math.pow((2.0 * (n * (U * t))), 0.5) elif l <= 8.8e+150: tmp = math.sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / Om)))) else: tmp = math.sqrt((-2.0 * (n * (U * (2.0 * (l * (l / Om))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.2e+28) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; elseif (l <= 8.8e+150) tmp = sqrt(Float64(-2.0 * Float64(2.0 * Float64(Float64(Float64(l * l) * Float64(n * U)) / Om)))); else tmp = sqrt(Float64(-2.0 * Float64(n * Float64(U * 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 (l <= 6.2e+28) tmp = (2.0 * (n * (U * t))) ^ 0.5; elseif (l <= 8.8e+150) tmp = sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / Om)))); else tmp = sqrt((-2.0 * (n * (U * (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[l, 6.2e+28], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 8.8e+150], N[Sqrt[N[(-2.0 * N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(n * N[(U * 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}\;\ell \leq 6.2 \cdot 10^{+28}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 8.8 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{-2 \cdot \left(2 \cdot \frac{\left(\ell \cdot \ell\right) \cdot \left(n \cdot U\right)}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(n \cdot \left(U \cdot \left(2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 6.2000000000000001e28Initial program 49.9%
Simplified50.4%
Taylor expanded in l around 0 41.9%
pow1/242.9%
*-commutative42.9%
Applied egg-rr42.9%
if 6.2000000000000001e28 < l < 8.79999999999999998e150Initial program 48.4%
Simplified45.3%
Taylor expanded in l around inf 40.8%
*-commutative40.8%
*-commutative40.8%
unpow240.8%
+-commutative40.8%
associate-*r/40.8%
metadata-eval40.8%
associate-/l*40.9%
unpow240.9%
Simplified40.9%
Taylor expanded in n around 0 30.3%
*-commutative30.3%
associate-*r*43.9%
unpow243.9%
Simplified43.9%
if 8.79999999999999998e150 < l Initial program 33.6%
Simplified42.1%
Taylor expanded in l around inf 37.7%
*-commutative37.7%
*-commutative37.7%
unpow237.7%
+-commutative37.7%
associate-*r/37.7%
metadata-eval37.7%
associate-/l*43.7%
unpow243.7%
Simplified43.7%
Taylor expanded in U around 0 37.2%
associate-*r*34.8%
unpow234.8%
+-commutative34.8%
mul-1-neg34.8%
unsub-neg34.8%
associate-*r/34.8%
metadata-eval34.8%
unpow234.8%
Simplified34.8%
Taylor expanded in Om around inf 34.9%
unpow234.9%
associate-*r/43.4%
Simplified43.4%
Final simplification43.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.2e+28)
(pow (* 2.0 (* n (* U t))) 0.5)
(if (<= l 1.04e+152)
(sqrt (* -2.0 (* 2.0 (/ (* (* l l) (* n U)) Om))))
(sqrt (* -2.0 (* n (* (/ 2.0 Om) (* l (* U l)))))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.2e+28) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else if (l <= 1.04e+152) {
tmp = sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / Om))));
} else {
tmp = sqrt((-2.0 * (n * ((2.0 / Om) * (l * (U * 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 <= 4.2d+28) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else if (l <= 1.04d+152) then
tmp = sqrt(((-2.0d0) * (2.0d0 * (((l * l) * (n * u)) / om))))
else
tmp = sqrt(((-2.0d0) * (n * ((2.0d0 / om) * (l * (u * 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 <= 4.2e+28) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else if (l <= 1.04e+152) {
tmp = Math.sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / Om))));
} else {
tmp = Math.sqrt((-2.0 * (n * ((2.0 / Om) * (l * (U * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.2e+28: tmp = math.pow((2.0 * (n * (U * t))), 0.5) elif l <= 1.04e+152: tmp = math.sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / Om)))) else: tmp = math.sqrt((-2.0 * (n * ((2.0 / Om) * (l * (U * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.2e+28) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; elseif (l <= 1.04e+152) tmp = sqrt(Float64(-2.0 * Float64(2.0 * Float64(Float64(Float64(l * l) * Float64(n * U)) / Om)))); else tmp = sqrt(Float64(-2.0 * Float64(n * Float64(Float64(2.0 / Om) * Float64(l * Float64(U * l)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.2e+28) tmp = (2.0 * (n * (U * t))) ^ 0.5; elseif (l <= 1.04e+152) tmp = sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / Om)))); else tmp = sqrt((-2.0 * (n * ((2.0 / Om) * (l * (U * 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, 4.2e+28], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 1.04e+152], N[Sqrt[N[(-2.0 * N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(n * N[(N[(2.0 / Om), $MachinePrecision] * N[(l * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.2 \cdot 10^{+28}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 1.04 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{-2 \cdot \left(2 \cdot \frac{\left(\ell \cdot \ell\right) \cdot \left(n \cdot U\right)}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(n \cdot \left(\frac{2}{Om} \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 4.19999999999999978e28Initial program 49.9%
Simplified50.4%
Taylor expanded in l around 0 41.9%
pow1/242.9%
*-commutative42.9%
Applied egg-rr42.9%
if 4.19999999999999978e28 < l < 1.04000000000000005e152Initial program 48.4%
Simplified45.3%
Taylor expanded in l around inf 40.8%
*-commutative40.8%
*-commutative40.8%
unpow240.8%
+-commutative40.8%
associate-*r/40.8%
metadata-eval40.8%
associate-/l*40.9%
unpow240.9%
Simplified40.9%
Taylor expanded in n around 0 30.3%
*-commutative30.3%
associate-*r*43.9%
unpow243.9%
Simplified43.9%
if 1.04000000000000005e152 < l Initial program 33.6%
Simplified42.1%
Taylor expanded in l around inf 37.7%
*-commutative37.7%
*-commutative37.7%
unpow237.7%
+-commutative37.7%
associate-*r/37.7%
metadata-eval37.7%
associate-/l*43.7%
unpow243.7%
Simplified43.7%
Taylor expanded in U around 0 37.2%
associate-*r*34.8%
unpow234.8%
+-commutative34.8%
mul-1-neg34.8%
unsub-neg34.8%
associate-*r/34.8%
metadata-eval34.8%
unpow234.8%
Simplified34.8%
Taylor expanded in Om around inf 37.8%
associate-*r/37.8%
*-commutative37.8%
unpow237.8%
associate-*l/37.8%
associate-*r*46.3%
Simplified46.3%
Final simplification43.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.8) (pow (* 2.0 (* n (* U t))) 0.5) (pow (* 2.0 (* n (* -2.0 (* U (/ (* l l) Om))))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.8) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = pow((2.0 * (n * (-2.0 * (U * ((l * l) / Om))))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 4.8d0) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = (2.0d0 * (n * ((-2.0d0) * (u * ((l * l) / om))))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.8) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.pow((2.0 * (n * (-2.0 * (U * ((l * l) / Om))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.8: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.pow((2.0 * (n * (-2.0 * (U * ((l * l) / Om))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.8) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = Float64(2.0 * Float64(n * Float64(-2.0 * Float64(U * Float64(Float64(l * l) / Om))))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.8) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = (2.0 * (n * (-2.0 * (U * ((l * l) / Om))))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.8], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(-2.0 * N[(U * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.8:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(-2 \cdot \left(U \cdot \frac{\ell \cdot \ell}{Om}\right)\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 4.79999999999999982Initial program 51.0%
Simplified51.5%
Taylor expanded in l around 0 43.1%
pow1/244.1%
*-commutative44.1%
Applied egg-rr44.1%
if 4.79999999999999982 < l Initial program 37.4%
Simplified35.8%
associate-*l/41.9%
Applied egg-rr41.9%
Taylor expanded in n around 0 33.9%
*-commutative33.9%
unpow233.9%
associate-*r/41.4%
Simplified41.4%
pow1/248.0%
Applied egg-rr48.0%
Taylor expanded in t around 0 38.6%
associate-*l/38.7%
unpow238.7%
associate-*r/43.2%
associate-*r/38.7%
Simplified38.7%
Final simplification42.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.3e+28) (pow (* 2.0 (* n (* U t))) 0.5) (pow (* 2.0 (/ (* -2.0 (* (* l l) (* n U))) 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 <= 1.3e+28) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = pow((2.0 * ((-2.0 * ((l * l) * (n * U))) / 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 <= 1.3d+28) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = (2.0d0 * (((-2.0d0) * ((l * l) * (n * u))) / 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 <= 1.3e+28) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.pow((2.0 * ((-2.0 * ((l * l) * (n * U))) / Om)), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.3e+28: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.pow((2.0 * ((-2.0 * ((l * l) * (n * U))) / Om)), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.3e+28) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = Float64(2.0 * Float64(Float64(-2.0 * Float64(Float64(l * l) * Float64(n * U))) / 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 <= 1.3e+28) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = (2.0 * ((-2.0 * ((l * l) * (n * U))) / 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, 1.3e+28], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(2.0 * N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.3 \cdot 10^{+28}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \frac{-2 \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot U\right)\right)}{Om}\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.3000000000000001e28Initial program 49.9%
Simplified50.4%
Taylor expanded in l around 0 41.9%
pow1/242.9%
*-commutative42.9%
Applied egg-rr42.9%
if 1.3000000000000001e28 < l Initial program 39.2%
Simplified37.5%
associate-*l/44.5%
Applied egg-rr44.5%
Taylor expanded in n around 0 35.1%
*-commutative35.1%
unpow235.1%
associate-*r/43.9%
Simplified43.9%
pow1/251.5%
Applied egg-rr51.5%
Taylor expanded in t around 0 42.6%
associate-*r/42.6%
*-commutative42.6%
associate-*r*45.8%
unpow245.8%
Simplified45.8%
Final simplification43.5%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* n (* U (+ t (* -2.0 (* l (/ l Om))))))) 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 + (-2.0 * (l * (l / Om))))))), 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 + ((-2.0d0) * (l * (l / om))))))) ** 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 + (-2.0 * (l * (l / Om))))))), 0.5);
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.pow((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))), 0.5)
l = abs(l) function code(n, U, t, l, Om, U_42_) return Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))) ^ 0.5 end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = (2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))) ^ 0.5; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right)}^{0.5}
\end{array}
Initial program 47.6%
Simplified46.0%
associate-*l/49.1%
Applied egg-rr49.1%
Taylor expanded in n around 0 45.2%
*-commutative45.2%
unpow245.2%
associate-*r/47.9%
Simplified47.9%
pow1/251.9%
Applied egg-rr51.9%
Final simplification51.9%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.8) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* -2.0 (* 2.0 (* (/ n Om) (* U (* l l))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.8) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((-2.0 * (2.0 * ((n / Om) * (U * (l * l))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 4.8d0) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((-2.0d0) * (2.0d0 * ((n / om) * (u * (l * l))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.8) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((-2.0 * (2.0 * ((n / Om) * (U * (l * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.8: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((-2.0 * (2.0 * ((n / Om) * (U * (l * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.8) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(-2.0 * Float64(2.0 * Float64(Float64(n / 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 <= 4.8) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((-2.0 * (2.0 * ((n / Om) * (U * (l * l)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.8], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(2.0 * N[(N[(n / Om), $MachinePrecision] * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.8:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(2 \cdot \left(\frac{n}{Om} \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}\\
\end{array}
\end{array}
if l < 4.79999999999999982Initial program 51.0%
Simplified51.5%
Taylor expanded in l around 0 43.1%
pow1/244.1%
*-commutative44.1%
Applied egg-rr44.1%
if 4.79999999999999982 < l Initial program 37.4%
Simplified40.8%
Taylor expanded in l around inf 36.8%
*-commutative36.8%
*-commutative36.8%
unpow236.8%
+-commutative36.8%
associate-*r/36.8%
metadata-eval36.8%
associate-/l*40.0%
unpow240.0%
Simplified40.0%
Taylor expanded in U around 0 40.2%
associate-*r/40.2%
mul-1-neg40.2%
unpow240.2%
Simplified40.2%
Taylor expanded in n around 0 31.9%
associate-/l*32.0%
associate-/r/30.4%
*-commutative30.4%
unpow230.4%
Simplified30.4%
Final simplification40.7%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.8) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* -2.0 (* 2.0 (/ n (/ Om (* U (* l l)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.8) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((-2.0 * (2.0 * (n / (Om / (U * (l * l)))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 4.8d0) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((-2.0d0) * (2.0d0 * (n / (om / (u * (l * l)))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.8) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((-2.0 * (2.0 * (n / (Om / (U * (l * l)))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.8: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((-2.0 * (2.0 * (n / (Om / (U * (l * l))))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.8) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(-2.0 * Float64(2.0 * Float64(n / Float64(Om / Float64(U * Float64(l * l))))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.8) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((-2.0 * (2.0 * (n / (Om / (U * (l * l))))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.8], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(2.0 * N[(n / N[(Om / N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.8:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(2 \cdot \frac{n}{\frac{Om}{U \cdot \left(\ell \cdot \ell\right)}}\right)}\\
\end{array}
\end{array}
if l < 4.79999999999999982Initial program 51.0%
Simplified51.5%
Taylor expanded in l around 0 43.1%
pow1/244.1%
*-commutative44.1%
Applied egg-rr44.1%
if 4.79999999999999982 < l Initial program 37.4%
Simplified40.8%
Taylor expanded in l around inf 36.8%
*-commutative36.8%
*-commutative36.8%
unpow236.8%
+-commutative36.8%
associate-*r/36.8%
metadata-eval36.8%
associate-/l*40.0%
unpow240.0%
Simplified40.0%
Taylor expanded in n around 0 31.9%
associate-/l*32.0%
*-commutative32.0%
unpow232.0%
Simplified32.0%
Final simplification41.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.2e+28) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* -2.0 (* 2.0 (/ (* (* l l) (* n U)) Om))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.2e+28) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / 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 <= 4.2d+28) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((-2.0d0) * (2.0d0 * (((l * l) * (n * u)) / 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 <= 4.2e+28) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / Om))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.2e+28: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / Om)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.2e+28) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(-2.0 * Float64(2.0 * Float64(Float64(Float64(l * l) * Float64(n * U)) / Om)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.2e+28) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((-2.0 * (2.0 * (((l * l) * (n * U)) / 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, 4.2e+28], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(2.0 * N[(N[(N[(l * l), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.2 \cdot 10^{+28}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(2 \cdot \frac{\left(\ell \cdot \ell\right) \cdot \left(n \cdot U\right)}{Om}\right)}\\
\end{array}
\end{array}
if l < 4.19999999999999978e28Initial program 49.9%
Simplified50.4%
Taylor expanded in l around 0 41.9%
pow1/242.9%
*-commutative42.9%
Applied egg-rr42.9%
if 4.19999999999999978e28 < l Initial program 39.2%
Simplified43.4%
Taylor expanded in l around inf 38.9%
*-commutative38.9%
*-commutative38.9%
unpow238.9%
+-commutative38.9%
associate-*r/38.9%
metadata-eval38.9%
associate-/l*42.6%
unpow242.6%
Simplified42.6%
Taylor expanded in n around 0 34.9%
*-commutative34.9%
associate-*r*38.2%
unpow238.2%
Simplified38.2%
Final simplification41.9%
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 (/ 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 * (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 * (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 * (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 * (l / Om))))))))
l = abs(l) function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(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 * (l / Om)))))))); end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}
\end{array}
Initial program 47.6%
Simplified46.0%
associate-*l/49.1%
Applied egg-rr49.1%
Taylor expanded in n around 0 45.2%
*-commutative45.2%
unpow245.2%
associate-*r/47.9%
Simplified47.9%
Final simplification47.9%
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(2.0 * Float64(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[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}
\end{array}
Initial program 47.6%
Simplified49.1%
Taylor expanded in l around 0 34.9%
pow1/236.0%
*-commutative36.0%
Applied egg-rr36.0%
Final simplification36.0%
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(2.0 * Float64(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[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Initial program 47.6%
Simplified49.1%
Taylor expanded in l around 0 34.9%
Final simplification34.9%
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 47.6%
Simplified49.1%
Taylor expanded in l around 0 31.4%
Taylor expanded in n around 0 34.9%
associate-*r*34.9%
*-commutative34.9%
Simplified34.9%
Final simplification34.9%
herbie shell --seed 2023263
(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*))))))