
(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 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_))))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* n (pow (/ l Om) 2.0)))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U))))))
(if (<= t_2 1e-252)
(sqrt (* 2.0 (* n (* U (fma t_1 (- U* U) (fma -2.0 (* l (/ l Om)) t))))))
(if (<= t_2 5e+291)
(sqrt t_2)
(*
(sqrt (* U (* n (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om)))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = n * pow((l / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)));
double tmp;
if (t_2 <= 1e-252) {
tmp = sqrt((2.0 * (n * (U * fma(t_1, (U_42_ - U), fma(-2.0, (l * (l / Om)), t))))));
} else if (t_2 <= 5e+291) {
tmp = sqrt(t_2);
} else {
tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0));
}
return tmp;
}
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = Float64(n * (Float64(l / Om) ^ 2.0)) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U)))) tmp = 0.0 if (t_2 <= 1e-252) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * fma(t_1, Float64(U_42_ - U), fma(-2.0, Float64(l * Float64(l / Om)), t)))))); elseif (t_2 <= 5e+291) tmp = sqrt(t_2); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om))))) * Float64(l * sqrt(2.0))); end return tmp end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 1e-252], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t$95$1 * N[(U$42$ - U), $MachinePrecision] + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 5e+291], N[Sqrt[t$95$2], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_2 \leq 10^{-252}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \mathsf{fma}\left(t_1, U* - U, \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\right)\right)\right)}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+291}:\\
\;\;\;\;\sqrt{t_2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\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*)))) < 9.99999999999999943e-253Initial program 18.7%
Simplified25.8%
pow125.8%
Applied egg-rr25.8%
unpow125.8%
associate-*l*43.1%
fma-def43.1%
associate-*r*45.5%
fma-udef45.5%
*-commutative45.5%
associate-*r/38.1%
unpow238.1%
+-commutative38.1%
fma-def38.1%
+-commutative38.1%
unpow238.1%
associate-*r/45.5%
fma-def45.5%
Simplified45.5%
if 9.99999999999999943e-253 < (*.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.0000000000000001e291Initial program 99.7%
if 5.0000000000000001e291 < (*.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%
Simplified30.1%
Taylor expanded in l around inf 21.9%
sub-neg21.9%
unpow221.9%
times-frac25.0%
associate-*r/25.0%
metadata-eval25.0%
distribute-neg-frac25.0%
metadata-eval25.0%
Simplified25.0%
Final simplification55.1%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(sqrt (* (* 2.0 U) (* n t)))
(if (<= t_1 1e+146)
t_1
(*
(sqrt (* U (* n (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om)))))
(* l (sqrt 2.0)))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt(((2.0 * U) * (n * t)));
} else if (t_1 <= 1e+146) {
tmp = t_1;
} else {
tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 0.0d0) then
tmp = sqrt(((2.0d0 * u) * (n * t)))
else if (t_1 <= 1d+146) then
tmp = t_1
else
tmp = sqrt((u * (n * (((n / om) * ((u_42 - u) / om)) + ((-2.0d0) / om))))) * (l * sqrt(2.0d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt(((2.0 * U) * (n * t)));
} else if (t_1 <= 1e+146) {
tmp = t_1;
} else {
tmp = Math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt(((2.0 * U) * (n * t))) elif t_1 <= 1e+146: tmp = t_1 else: tmp = math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * t))); elseif (t_1 <= 1e+146) tmp = t_1; else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om))))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt(((2.0 * U) * (n * t))); elseif (t_1 <= 1e+146) tmp = t_1; else tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 1e+146], t$95$1, N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}\\
\mathbf{elif}\;t_1 \leq 10^{+146}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 0.0Initial program 14.4%
Simplified14.4%
Taylor expanded in t around inf 35.3%
associate-*r*35.5%
Simplified35.5%
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*))))) < 9.99999999999999934e145Initial program 99.6%
if 9.99999999999999934e145 < (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 20.6%
Simplified31.3%
Taylor expanded in l around inf 21.0%
sub-neg21.0%
unpow221.0%
times-frac25.6%
associate-*r/25.6%
metadata-eval25.6%
distribute-neg-frac25.6%
metadata-eval25.6%
Simplified25.6%
Final simplification54.3%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.8e+148)
(sqrt
(*
(* 2.0 (* n U))
(+ (+ t (* (/ (* l l) Om) -2.0)) (* n (* (pow (/ l Om) 2.0) (- U* U))))))
(*
(sqrt (* U (* n (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om)))))
(* l (sqrt 2.0)))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.8e+148) {
tmp = sqrt(((2.0 * (n * U)) * ((t + (((l * l) / Om) * -2.0)) + (n * (pow((l / Om), 2.0) * (U_42_ - U))))));
} else {
tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.8d+148) then
tmp = sqrt(((2.0d0 * (n * u)) * ((t + (((l * l) / om) * (-2.0d0))) + (n * (((l / om) ** 2.0d0) * (u_42 - u))))))
else
tmp = sqrt((u * (n * (((n / om) * ((u_42 - u) / om)) + ((-2.0d0) / om))))) * (l * sqrt(2.0d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.8e+148) {
tmp = Math.sqrt(((2.0 * (n * U)) * ((t + (((l * l) / Om) * -2.0)) + (n * (Math.pow((l / Om), 2.0) * (U_42_ - U))))));
} else {
tmp = Math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.8e+148: tmp = math.sqrt(((2.0 * (n * U)) * ((t + (((l * l) / Om) * -2.0)) + (n * (math.pow((l / Om), 2.0) * (U_42_ - U)))))) else: tmp = math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.8e+148) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U)))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om))))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.8e+148) tmp = sqrt(((2.0 * (n * U)) * ((t + (((l * l) / Om) * -2.0)) + (n * (((l / Om) ^ 2.0) * (U_42_ - U)))))); else tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.8e+148], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.8 \cdot 10^{+148}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if l < 1.80000000000000003e148Initial program 54.7%
Simplified54.3%
if 1.80000000000000003e148 < l Initial program 14.9%
Simplified28.5%
Taylor expanded in l around inf 50.6%
sub-neg50.6%
unpow250.6%
times-frac66.8%
associate-*r/66.8%
metadata-eval66.8%
distribute-neg-frac66.8%
metadata-eval66.8%
Simplified66.8%
Final simplification56.0%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.25e-81)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= l 2.6e+149)
(sqrt
(*
(* 2.0 (* n U))
(- t (* (* l l) (+ (/ 2.0 Om) (/ n (/ (* Om Om) (- U U*))))))))
(*
(sqrt (* U (* n (+ (* (/ n Om) (/ (- U* U) Om)) (/ -2.0 Om)))))
(* l (sqrt 2.0))))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.25e-81) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 2.6e+149) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_))))))));
} else {
tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.25d-81) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (l <= 2.6d+149) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - ((l * l) * ((2.0d0 / om) + (n / ((om * om) / (u - u_42))))))))
else
tmp = sqrt((u * (n * (((n / om) * ((u_42 - u) / om)) + ((-2.0d0) / om))))) * (l * sqrt(2.0d0))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.25e-81) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 2.6e+149) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_))))))));
} else {
tmp = Math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * Math.sqrt(2.0));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.25e-81: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif l <= 2.6e+149: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_)))))))) else: tmp = math.sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * math.sqrt(2.0)) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.25e-81) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (l <= 2.6e+149) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(l * l) * Float64(Float64(2.0 / Om) + Float64(n / Float64(Float64(Om * Om) / Float64(U - U_42_)))))))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) + Float64(-2.0 / Om))))) * Float64(l * sqrt(2.0))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.25e-81) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (l <= 2.6e+149) tmp = sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_)))))))); else tmp = sqrt((U * (n * (((n / Om) * ((U_42_ - U) / Om)) + (-2.0 / Om))))) * (l * sqrt(2.0)); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.25e-81], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 2.6e+149], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] + N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.25 \cdot 10^{-81}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(\frac{2}{Om} + \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if l < 1.24999999999999995e-81Initial program 52.6%
Simplified54.0%
Taylor expanded in t around inf 41.6%
associate-*r*41.6%
Simplified41.6%
pow1/243.9%
associate-*l*43.9%
Applied egg-rr43.9%
if 1.24999999999999995e-81 < l < 2.59999999999999979e149Initial program 62.6%
Simplified62.5%
Taylor expanded in l around 0 62.5%
unpow262.5%
associate-*r/62.5%
metadata-eval62.5%
associate-/l*62.5%
unpow262.5%
Simplified62.5%
if 2.59999999999999979e149 < l Initial program 14.9%
Simplified28.5%
Taylor expanded in l around inf 50.6%
sub-neg50.6%
unpow250.6%
times-frac66.8%
associate-*r/66.8%
metadata-eval66.8%
distribute-neg-frac66.8%
metadata-eval66.8%
Simplified66.8%
Final simplification50.4%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 3e-83)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= l 1.22e+151)
(sqrt
(*
(* 2.0 (* n U))
(- t (* (* l l) (+ (/ 2.0 Om) (/ n (/ (* Om Om) (- U U*))))))))
(*
(* l (sqrt 2.0))
(sqrt (* U (* n (- (/ (* n U*) (* Om 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 <= 3e-83) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 1.22e+151) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_))))))));
} else {
tmp = (l * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / (Om * 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 <= 3d-83) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (l <= 1.22d+151) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - ((l * l) * ((2.0d0 / om) + (n / ((om * om) / (u - u_42))))))))
else
tmp = (l * sqrt(2.0d0)) * sqrt((u * (n * (((n * u_42) / (om * 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 <= 3e-83) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 1.22e+151) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_))))))));
} else {
tmp = (l * Math.sqrt(2.0)) * Math.sqrt((U * (n * (((n * U_42_) / (Om * Om)) - (2.0 / Om)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 3e-83: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif l <= 1.22e+151: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_)))))))) else: tmp = (l * math.sqrt(2.0)) * math.sqrt((U * (n * (((n * U_42_) / (Om * Om)) - (2.0 / Om))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 3e-83) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (l <= 1.22e+151) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(l * l) * Float64(Float64(2.0 / Om) + Float64(n / Float64(Float64(Om * Om) / Float64(U - U_42_)))))))); else tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / Float64(Om * 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 <= 3e-83) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (l <= 1.22e+151) tmp = sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_)))))))); else tmp = (l * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / (Om * 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, 3e-83], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 1.22e+151], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] + N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3 \cdot 10^{-83}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 1.22 \cdot 10^{+151}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(\frac{2}{Om} + \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{Om \cdot Om} - \frac{2}{Om}\right)\right)}\\
\end{array}
\end{array}
if l < 3.0000000000000001e-83Initial program 52.6%
Simplified54.0%
Taylor expanded in t around inf 41.6%
associate-*r*41.6%
Simplified41.6%
pow1/243.9%
associate-*l*43.9%
Applied egg-rr43.9%
if 3.0000000000000001e-83 < l < 1.22000000000000005e151Initial program 62.6%
Simplified62.5%
Taylor expanded in l around 0 62.5%
unpow262.5%
associate-*r/62.5%
metadata-eval62.5%
associate-/l*62.5%
unpow262.5%
Simplified62.5%
if 1.22000000000000005e151 < l Initial program 14.9%
Simplified28.5%
Taylor expanded in l around inf 50.6%
unpow250.6%
associate-*r/50.6%
metadata-eval50.6%
Simplified50.6%
Taylor expanded in U* around inf 50.6%
*-commutative50.6%
unpow250.6%
Simplified50.6%
Final simplification48.2%
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.5e-83)
(pow (* 2.0 (* U (* n t))) 0.5)
(if (<= l 3.8e+112)
(sqrt
(*
(* 2.0 (* n U))
(- t (* (* l l) (+ (/ 2.0 Om) (/ n (/ (* Om Om) (- U U*))))))))
(pow (* 2.0 (* (* n U) (- t (* (/ l Om) (* 2.0 l))))) 0.5))))l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-83) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 3.8e+112) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_))))))));
} else {
tmp = pow((2.0 * ((n * U) * (t - ((l / Om) * (2.0 * l))))), 0.5);
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 1.5d-83) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else if (l <= 3.8d+112) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - ((l * l) * ((2.0d0 / om) + (n / ((om * om) / (u - u_42))))))))
else
tmp = (2.0d0 * ((n * u) * (t - ((l / om) * (2.0d0 * l))))) ** 0.5d0
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-83) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else if (l <= 3.8e+112) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_))))))));
} else {
tmp = Math.pow((2.0 * ((n * U) * (t - ((l / Om) * (2.0 * l))))), 0.5);
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e-83: tmp = math.pow((2.0 * (U * (n * t))), 0.5) elif l <= 3.8e+112: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_)))))))) else: tmp = math.pow((2.0 * ((n * U) * (t - ((l / Om) * (2.0 * l))))), 0.5) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e-83) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; elseif (l <= 3.8e+112) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(l * l) * Float64(Float64(2.0 / Om) + Float64(n / Float64(Float64(Om * Om) / Float64(U - U_42_)))))))); else tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t - Float64(Float64(l / Om) * Float64(2.0 * l))))) ^ 0.5; end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.5e-83) tmp = (2.0 * (U * (n * t))) ^ 0.5; elseif (l <= 3.8e+112) tmp = sqrt(((2.0 * (n * U)) * (t - ((l * l) * ((2.0 / Om) + (n / ((Om * Om) / (U - U_42_)))))))); else tmp = (2.0 * ((n * U) * (t - ((l / Om) * (2.0 * l))))) ^ 0.5; end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e-83], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 3.8e+112], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / Om), $MachinePrecision] + N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t - N[(N[(l / Om), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{-83}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;\ell \leq 3.8 \cdot 10^{+112}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(\frac{2}{Om} + \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right)\right)\right)}^{0.5}\\
\end{array}
\end{array}
if l < 1.50000000000000005e-83Initial program 52.6%
Simplified54.0%
Taylor expanded in t around inf 41.6%
associate-*r*41.6%
Simplified41.6%
pow1/243.9%
associate-*l*43.9%
Applied egg-rr43.9%
if 1.50000000000000005e-83 < l < 3.80000000000000008e112Initial program 60.9%
Simplified60.8%
Taylor expanded in l around 0 60.8%
unpow260.8%
associate-*r/60.8%
metadata-eval60.8%
associate-/l*60.8%
unpow260.8%
Simplified60.8%
if 3.80000000000000008e112 < l Initial program 24.1%
Simplified35.8%
Taylor expanded in Om around inf 25.0%
unpow225.0%
associate-*r/29.6%
associate-*r*29.6%
Simplified29.6%
pow1/237.5%
associate-*l*37.5%
Applied egg-rr37.5%
Final simplification45.4%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 4e-77) (pow (* 2.0 (* U (* n t))) 0.5) (sqrt (* (* 2.0 (* n U)) (- t (* (/ l Om) (* 2.0 l)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4e-77) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = sqrt(((2.0 * (n * U)) * (t - ((l / Om) * (2.0 * 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 <= 4d-77) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = sqrt(((2.0d0 * (n * u)) * (t - ((l / om) * (2.0d0 * 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 <= 4e-77) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((l / Om) * (2.0 * l)))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4e-77: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((l / Om) * (2.0 * l))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4e-77) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(l / Om) * Float64(2.0 * l))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4e-77) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = sqrt(((2.0 * (n * U)) * (t - ((l / Om) * (2.0 * 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, 4e-77], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(l / Om), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4 \cdot 10^{-77}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right)}\\
\end{array}
\end{array}
if l < 3.9999999999999997e-77Initial program 53.2%
Simplified54.5%
Taylor expanded in t around inf 41.1%
associate-*r*41.1%
Simplified41.1%
pow1/243.4%
associate-*l*43.4%
Applied egg-rr43.4%
if 3.9999999999999997e-77 < l Initial program 40.2%
Simplified46.4%
Taylor expanded in Om around inf 32.4%
unpow232.4%
associate-*r/34.9%
associate-*r*34.9%
Simplified34.9%
Final simplification40.8%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* (* n U) (- t (* (/ l Om) (* 2.0 l))))) 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 - ((l / Om) * (2.0 * l))))), 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 - ((l / om) * (2.0d0 * l))))) ** 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 - ((l / Om) * (2.0 * l))))), 0.5);
}
l = abs(l) def code(n, U, t, l, Om, U_42_): return math.pow((2.0 * ((n * U) * (t - ((l / Om) * (2.0 * l))))), 0.5)
l = abs(l) function code(n, U, t, l, Om, U_42_) return Float64(2.0 * Float64(Float64(n * U) * Float64(t - Float64(Float64(l / Om) * Float64(2.0 * l))))) ^ 0.5 end
l = abs(l) function tmp = code(n, U, t, l, Om, U_42_) tmp = (2.0 * ((n * U) * (t - ((l / Om) * (2.0 * l))))) ^ 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), $MachinePrecision] * N[(t - N[(N[(l / Om), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right)\right)\right)}^{0.5}
\end{array}
Initial program 49.1%
Simplified52.0%
Taylor expanded in Om around inf 42.3%
unpow242.3%
associate-*r/46.1%
associate-*r*46.1%
Simplified46.1%
pow1/250.2%
associate-*l*50.2%
Applied egg-rr50.2%
Final simplification50.2%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 5.8e+99) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* (* U -2.0) (* 2.0 (/ (* l (* n l)) Om))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 5.8e+99) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt(((U * -2.0) * (2.0 * ((l * (n * 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 <= 5.8d+99) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((u * (-2.0d0)) * (2.0d0 * ((l * (n * 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 <= 5.8e+99) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt(((U * -2.0) * (2.0 * ((l * (n * l)) / Om))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 5.8e+99: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt(((U * -2.0) * (2.0 * ((l * (n * l)) / Om)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 5.8e+99) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(Float64(U * -2.0) * Float64(2.0 * Float64(Float64(l * Float64(n * 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 <= 5.8e+99) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt(((U * -2.0) * (2.0 * ((l * (n * 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, 5.8e+99], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(N[(U * -2.0), $MachinePrecision] * N[(2.0 * N[(N[(l * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.8 \cdot 10^{+99}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left(2 \cdot \frac{\ell \cdot \left(n \cdot \ell\right)}{Om}\right)}\\
\end{array}
\end{array}
if l < 5.8000000000000004e99Initial program 54.2%
Simplified57.8%
Taylor expanded in l around 0 39.7%
associate-*r*41.6%
*-commutative41.6%
Simplified41.6%
pow1/244.0%
associate-*l*44.8%
Applied egg-rr44.8%
if 5.8000000000000004e99 < l Initial program 25.3%
Simplified36.4%
Taylor expanded in l around inf 30.8%
associate-*r*30.8%
associate-*r*33.1%
*-commutative33.1%
unpow233.1%
associate-*r/33.1%
metadata-eval33.1%
unpow233.1%
times-frac37.8%
Simplified37.8%
Taylor expanded in n around 0 30.2%
*-commutative30.2%
unpow230.2%
associate-*r*40.8%
Simplified40.8%
Final simplification44.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= l 2.1e+101) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* -4.0 (/ U (/ Om (* l (* n l))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.1e+101) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((-4.0 * (U / (Om / (l * (n * l))))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 2.1d+101) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt(((-4.0d0) * (u / (om / (l * (n * l))))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 2.1e+101) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((-4.0 * (U / (Om / (l * (n * l))))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 2.1e+101: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((-4.0 * (U / (Om / (l * (n * l)))))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 2.1e+101) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(l * Float64(n * l)))))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 2.1e+101) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((-4.0 * (U / (Om / (l * (n * l)))))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.1e+101], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(l * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.1 \cdot 10^{+101}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{\ell \cdot \left(n \cdot \ell\right)}}}\\
\end{array}
\end{array}
if l < 2.1e101Initial program 54.2%
Simplified57.8%
Taylor expanded in l around 0 39.7%
associate-*r*41.6%
*-commutative41.6%
Simplified41.6%
pow1/244.0%
associate-*l*44.8%
Applied egg-rr44.8%
if 2.1e101 < l Initial program 25.3%
Simplified36.4%
Taylor expanded in Om around inf 26.1%
unpow226.1%
associate-*r/30.5%
associate-*r*30.5%
Simplified30.5%
Taylor expanded in t around 0 28.0%
associate-/l*30.1%
*-commutative30.1%
unpow230.1%
associate-*r*40.8%
Simplified40.8%
Final simplification44.1%
NOTE: l should be positive before calling this function (FPCore (n U t l Om U*) :precision binary64 (if (<= U* -1.4e+73) (pow (* 2.0 (* U (* n t))) 0.5) (sqrt (* 2.0 (* n (* U t))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -1.4e+73) {
tmp = pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = sqrt((2.0 * (n * (U * t))));
}
return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u_42 <= (-1.4d+73)) then
tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (n * (u * t))))
end if
code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U_42_ <= -1.4e+73) {
tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (n * (U * t))));
}
return tmp;
}
l = abs(l) def code(n, U, t, l, Om, U_42_): tmp = 0 if U_42_ <= -1.4e+73: tmp = math.pow((2.0 * (U * (n * t))), 0.5) else: tmp = math.sqrt((2.0 * (n * (U * t)))) return tmp
l = abs(l) function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U_42_ <= -1.4e+73) tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); end return tmp end
l = abs(l) function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U_42_ <= -1.4e+73) tmp = (2.0 * (U * (n * t))) ^ 0.5; else tmp = sqrt((2.0 * (n * (U * t)))); end tmp_2 = tmp; end
NOTE: l should be positive before calling this function code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, -1.4e+73], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U* \leq -1.4 \cdot 10^{+73}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\end{array}
\end{array}
if U* < -1.40000000000000004e73Initial program 48.2%
Simplified52.8%
Taylor expanded in t around inf 27.7%
associate-*r*27.7%
Simplified27.7%
pow1/237.0%
associate-*l*37.0%
Applied egg-rr37.0%
if -1.40000000000000004e73 < U* Initial program 49.4%
Simplified53.4%
pow153.4%
Applied egg-rr53.4%
unpow153.4%
associate-*l*53.6%
fma-def53.6%
associate-*r*55.7%
fma-udef55.7%
*-commutative55.7%
associate-*r/51.1%
unpow251.1%
+-commutative51.1%
fma-def51.1%
+-commutative51.1%
unpow251.1%
associate-*r/55.7%
fma-def55.7%
Simplified55.7%
Taylor expanded in l around 0 39.9%
Final simplification39.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(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 49.1%
Simplified54.0%
Taylor expanded in l around 0 33.9%
associate-*r*35.5%
*-commutative35.5%
Simplified35.5%
pow1/237.9%
associate-*l*38.6%
Applied egg-rr38.6%
Final simplification38.6%
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 49.1%
Simplified54.0%
pow154.0%
Applied egg-rr54.0%
unpow154.0%
associate-*l*53.7%
fma-def53.7%
associate-*r*55.3%
fma-udef55.3%
*-commutative55.3%
associate-*r/49.9%
unpow249.9%
+-commutative49.9%
fma-def49.9%
+-commutative49.9%
unpow249.9%
associate-*r/55.3%
fma-def55.3%
Simplified55.3%
Taylor expanded in l around 0 36.2%
Final simplification36.2%
herbie shell --seed 2023279
(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*))))))