
(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}
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_1 5e+152)
t_1
(if (<= t_1 INFINITY)
(* l_m (fabs (* (* n (sqrt 2.0)) (/ (sqrt (* U U*)) Om))))
(*
(sqrt (* U (* n (- (* n (/ (- U* U) (pow Om 2.0))) (/ 2.0 Om)))))
(* l_m (sqrt 2.0))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_1 <= 5e+152) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = l_m * fabs(((n * sqrt(2.0)) * (sqrt((U * U_42_)) / Om)));
} else {
tmp = sqrt((U * (n * ((n * ((U_42_ - U) / pow(Om, 2.0))) - (2.0 / Om))))) * (l_m * sqrt(2.0));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_1 <= 5e+152) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = l_m * Math.abs(((n * Math.sqrt(2.0)) * (Math.sqrt((U * U_42_)) / Om)));
} else {
tmp = Math.sqrt((U * (n * ((n * ((U_42_ - U) / Math.pow(Om, 2.0))) - (2.0 / Om))))) * (l_m * Math.sqrt(2.0));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_1 <= 5e+152: tmp = t_1 elif t_1 <= math.inf: tmp = l_m * math.fabs(((n * math.sqrt(2.0)) * (math.sqrt((U * U_42_)) / Om))) else: tmp = math.sqrt((U * (n * ((n * ((U_42_ - U) / math.pow(Om, 2.0))) - (2.0 / Om))))) * (l_m * math.sqrt(2.0)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_1 <= 5e+152) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(l_m * abs(Float64(Float64(n * sqrt(2.0)) * Float64(sqrt(Float64(U * U_42_)) / Om)))); else tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(n * Float64(Float64(U_42_ - U) / (Om ^ 2.0))) - Float64(2.0 / Om))))) * Float64(l_m * sqrt(2.0))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_1 <= 5e+152) tmp = t_1; elseif (t_1 <= Inf) tmp = l_m * abs(((n * sqrt(2.0)) * (sqrt((U * U_42_)) / Om))); else tmp = sqrt((U * (n * ((n * ((U_42_ - U) / (Om ^ 2.0))) - (2.0 / Om))))) * (l_m * sqrt(2.0)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, 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$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / 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 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 5e+152], t$95$1, If[LessEqual[t$95$1, Infinity], N[(l$95$m * N[Abs[N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(n * N[(N[(U$42$ - U), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;l\_m \cdot \left|\left(n \cdot \sqrt{2}\right) \cdot \frac{\sqrt{U \cdot U*}}{Om}\right|\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(n \cdot \frac{U* - U}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(l\_m \cdot \sqrt{2}\right)\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 13.4%
Simplified41.9%
Taylor expanded in Om around inf 41.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 5e152Initial program 99.1%
if 5e152 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 30.0%
Simplified36.8%
Taylor expanded in U* around inf 24.6%
associate-/l*24.4%
Simplified24.4%
Taylor expanded in l around 0 24.6%
associate-/l*24.4%
associate-*r/24.4%
associate-*r*23.4%
*-commutative23.4%
Simplified23.4%
add-sqr-sqrt14.7%
sqrt-unprod23.0%
pow223.0%
Applied egg-rr23.0%
unpow223.0%
rem-sqrt-square25.2%
*-commutative25.2%
associate-*r/25.2%
associate-*l/24.2%
associate-/l*24.2%
Simplified24.2%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified5.7%
Taylor expanded in l around inf 25.7%
associate-/l*25.7%
associate-*r/25.7%
metadata-eval25.7%
Simplified25.7%
Final simplification54.2%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l_m l_m) Om)))
(* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
(if (<= t_1 0.0)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_1 5e+152)
t_1
(* l_m (fabs (* (* n (sqrt 2.0)) (/ (sqrt (* U U*)) Om))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_1 <= 5e+152) {
tmp = t_1;
} else {
tmp = l_m * fabs(((n * sqrt(2.0)) * (sqrt((U * U_42_)) / Om)));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
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_m * l_m) / om))) + ((n * ((l_m / om) ** 2.0d0)) * (u_42 - u)))))
if (t_1 <= 0.0d0) then
tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * ((l_m ** 2.0d0) / om))))))
else if (t_1 <= 5d+152) then
tmp = t_1
else
tmp = l_m * abs(((n * sqrt(2.0d0)) * (sqrt((u * u_42)) / om)))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_1 <= 5e+152) {
tmp = t_1;
} else {
tmp = l_m * Math.abs(((n * Math.sqrt(2.0)) * (Math.sqrt((U * U_42_)) / Om)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U))))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_1 <= 5e+152: tmp = t_1 else: tmp = l_m * math.fabs(((n * math.sqrt(2.0)) * (math.sqrt((U * U_42_)) / Om))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_1 <= 5e+152) tmp = t_1; else tmp = Float64(l_m * abs(Float64(Float64(n * sqrt(2.0)) * Float64(sqrt(Float64(U * U_42_)) / Om)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U))))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_1 <= 5e+152) tmp = t_1; else tmp = l_m * abs(((n * sqrt(2.0)) * (sqrt((U * U_42_)) / Om))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, 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$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / 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 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 5e+152], t$95$1, N[(l$95$m * N[Abs[N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;l\_m \cdot \left|\left(n \cdot \sqrt{2}\right) \cdot \frac{\sqrt{U \cdot U*}}{Om}\right|\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 13.4%
Simplified41.9%
Taylor expanded in Om around inf 41.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 5e152Initial program 99.1%
if 5e152 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 20.2%
Simplified26.7%
Taylor expanded in U* around inf 20.8%
associate-/l*20.7%
Simplified20.7%
Taylor expanded in l around 0 20.8%
associate-/l*20.7%
associate-*r/20.7%
associate-*r*20.0%
*-commutative20.0%
Simplified20.0%
add-sqr-sqrt11.8%
sqrt-unprod21.5%
pow221.5%
Applied egg-rr21.5%
unpow221.5%
rem-sqrt-square23.7%
*-commutative23.7%
associate-*r/23.7%
associate-*l/23.0%
associate-/l*23.0%
Simplified23.0%
Final simplification53.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
(t_2
(sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
(t_3 (* l_m (/ l_m Om))))
(if (<= t_2 0.0)
(sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
(if (<= t_2 INFINITY)
(sqrt (* (* 2.0 (* n U)) (- t (- (* 2.0 t_3) t_1))))
(sqrt (fabs (* 2.0 (* (* n U) (+ t (* -2.0 t_3))))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double t_3 = l_m * (l_m / Om);
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * t_3) - t_1))));
} else {
tmp = sqrt(fabs((2.0 * ((n * U) * (t + (-2.0 * t_3))))));
}
return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
double t_3 = l_m * (l_m / Om);
double tmp;
if (t_2 <= 0.0) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * t_3) - t_1))));
} else {
tmp = Math.sqrt(Math.abs((2.0 * ((n * U) * (t + (-2.0 * t_3))))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U) t_2 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) t_3 = l_m * (l_m / Om) tmp = 0 if t_2 <= 0.0: tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t - ((2.0 * t_3) - t_1)))) else: tmp = math.sqrt(math.fabs((2.0 * ((n * U) * (t + (-2.0 * t_3)))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) t_3 = Float64(l_m * Float64(l_m / Om)) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(Float64(2.0 * t_3) - t_1)))); else tmp = sqrt(abs(Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * t_3)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U); t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))); t_3 = l_m * (l_m / Om); tmp = 0.0; if (t_2 <= 0.0) tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om)))))); elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t - ((2.0 * t_3) - t_1)))); else tmp = sqrt(abs((2.0 * ((n * U) * (t + (-2.0 * t_3)))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * t$95$3), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
t_3 := l\_m \cdot \frac{l\_m}{Om}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(2 \cdot t\_3 - t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t\_3\right)\right)\right|}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0Initial program 13.4%
Simplified41.9%
Taylor expanded in Om around inf 41.9%
if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0Initial program 66.1%
Simplified68.8%
if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) Initial program 0.0%
Simplified0.4%
Taylor expanded in n around 0 1.2%
add-sqr-sqrt1.2%
pow1/21.2%
pow1/224.6%
pow-prod-down24.7%
pow224.7%
associate-*l*24.7%
cancel-sign-sub-inv24.7%
metadata-eval24.7%
Applied egg-rr24.7%
unpow1/224.7%
unpow224.7%
rem-sqrt-square24.7%
Simplified24.7%
pow224.7%
associate-*r/25.0%
*-commutative25.0%
Applied egg-rr25.0%
Final simplification57.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* l_m (/ l_m Om))))
(if (or (<= n -1.65e-100) (not (<= n 7.5e-130)))
(sqrt (fabs (* 2.0 (* (* n U) (+ t (* -2.0 t_1))))))
(* (sqrt 2.0) (sqrt (* U (* n (- t (* 2.0 t_1)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = l_m * (l_m / Om);
double tmp;
if ((n <= -1.65e-100) || !(n <= 7.5e-130)) {
tmp = sqrt(fabs((2.0 * ((n * U) * (t + (-2.0 * t_1))))));
} else {
tmp = sqrt(2.0) * sqrt((U * (n * (t - (2.0 * t_1)))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = l_m * (l_m / om)
if ((n <= (-1.65d-100)) .or. (.not. (n <= 7.5d-130))) then
tmp = sqrt(abs((2.0d0 * ((n * u) * (t + ((-2.0d0) * t_1))))))
else
tmp = sqrt(2.0d0) * sqrt((u * (n * (t - (2.0d0 * t_1)))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = l_m * (l_m / Om);
double tmp;
if ((n <= -1.65e-100) || !(n <= 7.5e-130)) {
tmp = Math.sqrt(Math.abs((2.0 * ((n * U) * (t + (-2.0 * t_1))))));
} else {
tmp = Math.sqrt(2.0) * Math.sqrt((U * (n * (t - (2.0 * t_1)))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = l_m * (l_m / Om) tmp = 0 if (n <= -1.65e-100) or not (n <= 7.5e-130): tmp = math.sqrt(math.fabs((2.0 * ((n * U) * (t + (-2.0 * t_1)))))) else: tmp = math.sqrt(2.0) * math.sqrt((U * (n * (t - (2.0 * t_1))))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(l_m * Float64(l_m / Om)) tmp = 0.0 if ((n <= -1.65e-100) || !(n <= 7.5e-130)) tmp = sqrt(abs(Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * t_1)))))); else tmp = Float64(sqrt(2.0) * sqrt(Float64(U * Float64(n * Float64(t - Float64(2.0 * t_1)))))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = l_m * (l_m / Om); tmp = 0.0; if ((n <= -1.65e-100) || ~((n <= 7.5e-130))) tmp = sqrt(abs((2.0 * ((n * U) * (t + (-2.0 * t_1)))))); else tmp = sqrt(2.0) * sqrt((U * (n * (t - (2.0 * t_1))))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[n, -1.65e-100], N[Not[LessEqual[n, 7.5e-130]], $MachinePrecision]], N[Sqrt[N[Abs[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := l\_m \cdot \frac{l\_m}{Om}\\
\mathbf{if}\;n \leq -1.65 \cdot 10^{-100} \lor \neg \left(n \leq 7.5 \cdot 10^{-130}\right):\\
\;\;\;\;\sqrt{\left|2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t\_1\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2} \cdot \sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot t\_1\right)\right)}\\
\end{array}
\end{array}
if n < -1.64999999999999998e-100 or 7.4999999999999994e-130 < n Initial program 51.6%
Simplified52.9%
Taylor expanded in n around 0 42.5%
add-sqr-sqrt42.5%
pow1/242.5%
pow1/250.9%
pow-prod-down39.4%
pow239.4%
associate-*l*39.4%
cancel-sign-sub-inv39.4%
metadata-eval39.4%
Applied egg-rr39.4%
unpow1/239.4%
unpow239.4%
rem-sqrt-square51.6%
Simplified51.6%
pow251.6%
associate-*r/52.8%
*-commutative52.8%
Applied egg-rr52.8%
if -1.64999999999999998e-100 < n < 7.4999999999999994e-130Initial program 41.9%
Simplified45.9%
Taylor expanded in n around 0 46.7%
pow239.5%
associate-*r/42.5%
*-commutative42.5%
Applied egg-rr52.6%
Final simplification52.7%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= l_m 3.6e+88) (sqrt (* (* n (+ t (/ (* (pow l_m 2.0) -2.0) Om))) (* 2.0 U))) (* l_m (* (sqrt (* U U*)) (* n (/ (sqrt 2.0) Om))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 3.6e+88) {
tmp = sqrt(((n * (t + ((pow(l_m, 2.0) * -2.0) / Om))) * (2.0 * U)));
} else {
tmp = l_m * (sqrt((U * U_42_)) * (n * (sqrt(2.0) / Om)));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l_m <= 3.6d+88) then
tmp = sqrt(((n * (t + (((l_m ** 2.0d0) * (-2.0d0)) / om))) * (2.0d0 * u)))
else
tmp = l_m * (sqrt((u * u_42)) * (n * (sqrt(2.0d0) / om)))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (l_m <= 3.6e+88) {
tmp = Math.sqrt(((n * (t + ((Math.pow(l_m, 2.0) * -2.0) / Om))) * (2.0 * U)));
} else {
tmp = l_m * (Math.sqrt((U * U_42_)) * (n * (Math.sqrt(2.0) / Om)));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if l_m <= 3.6e+88: tmp = math.sqrt(((n * (t + ((math.pow(l_m, 2.0) * -2.0) / Om))) * (2.0 * U))) else: tmp = l_m * (math.sqrt((U * U_42_)) * (n * (math.sqrt(2.0) / Om))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (l_m <= 3.6e+88) tmp = sqrt(Float64(Float64(n * Float64(t + Float64(Float64((l_m ^ 2.0) * -2.0) / Om))) * Float64(2.0 * U))); else tmp = Float64(l_m * Float64(sqrt(Float64(U * U_42_)) * Float64(n * Float64(sqrt(2.0) / Om)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (l_m <= 3.6e+88) tmp = sqrt(((n * (t + (((l_m ^ 2.0) * -2.0) / Om))) * (2.0 * U))); else tmp = l_m * (sqrt((U * U_42_)) * (n * (sqrt(2.0) / Om))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 3.6e+88], N[Sqrt[N[(N[(n * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 3.6 \cdot 10^{+88}:\\
\;\;\;\;\sqrt{\left(n \cdot \left(t + \frac{{l\_m}^{2} \cdot -2}{Om}\right)\right) \cdot \left(2 \cdot U\right)}\\
\mathbf{else}:\\
\;\;\;\;l\_m \cdot \left(\sqrt{U \cdot U*} \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\\
\end{array}
\end{array}
if l < 3.6000000000000002e88Initial program 53.4%
Simplified52.7%
Taylor expanded in n around 0 47.4%
associate-*r*47.4%
metadata-eval47.4%
cancel-sign-sub-inv47.4%
cancel-sign-sub-inv47.4%
metadata-eval47.4%
associate-*r/47.4%
Simplified47.4%
if 3.6000000000000002e88 < l Initial program 20.9%
Simplified28.2%
Taylor expanded in U* around inf 26.9%
associate-/l*30.9%
Simplified30.9%
Taylor expanded in l around 0 26.9%
associate-/l*30.9%
associate-*r/31.0%
associate-*r*31.0%
*-commutative31.0%
Simplified31.0%
Final simplification44.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (fabs (* 2.0 (* (* n U) (+ t (* -2.0 (* l_m (/ l_m Om)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt(fabs((2.0 * ((n * U) * (t + (-2.0 * (l_m * (l_m / Om))))))));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt(abs((2.0d0 * ((n * u) * (t + ((-2.0d0) * (l_m * (l_m / om))))))))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt(Math.abs((2.0 * ((n * U) * (t + (-2.0 * (l_m * (l_m / Om))))))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt(math.fabs((2.0 * ((n * U) * (t + (-2.0 * (l_m * (l_m / Om))))))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(abs(Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64(l_m * Float64(l_m / Om)))))))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt(abs((2.0 * ((n * U) * (t + (-2.0 * (l_m * (l_m / Om)))))))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[Abs[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left|2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)\right|}
\end{array}
Initial program 47.9%
Simplified49.8%
Taylor expanded in n around 0 41.2%
add-sqr-sqrt41.2%
pow1/241.2%
pow1/246.5%
pow-prod-down34.8%
pow234.8%
associate-*l*34.8%
cancel-sign-sub-inv34.8%
metadata-eval34.8%
Applied egg-rr34.8%
unpow1/234.8%
unpow234.8%
rem-sqrt-square47.0%
Simplified47.0%
pow247.0%
associate-*r/48.9%
*-commutative48.9%
Applied egg-rr48.9%
Final simplification48.9%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= t 1.88e+68) (sqrt (* (* 2.0 (* n U)) (- t (* 2.0 (* l_m (/ l_m Om)))))) (sqrt (fabs (* (* n t) (* 2.0 U))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 1.88e+68) {
tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l_m * (l_m / Om))))));
} else {
tmp = sqrt(fabs(((n * t) * (2.0 * U))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= 1.88d+68) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - (2.0d0 * (l_m * (l_m / om))))))
else
tmp = sqrt(abs(((n * t) * (2.0d0 * u))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 1.88e+68) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l_m * (l_m / Om))))));
} else {
tmp = Math.sqrt(Math.abs(((n * t) * (2.0 * U))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= 1.88e+68: tmp = math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l_m * (l_m / Om)))))) else: tmp = math.sqrt(math.fabs(((n * t) * (2.0 * U)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= 1.88e+68) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))); else tmp = sqrt(abs(Float64(Float64(n * t) * Float64(2.0 * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (t <= 1.88e+68) tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l_m * (l_m / Om)))))); else tmp = sqrt(abs(((n * t) * (2.0 * U)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, 1.88e+68], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.88 \cdot 10^{+68}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right|}\\
\end{array}
\end{array}
if t < 1.88000000000000007e68Initial program 48.4%
Simplified50.3%
Taylor expanded in n around 0 40.9%
pow246.5%
associate-*r/48.5%
*-commutative48.5%
Applied egg-rr42.8%
if 1.88000000000000007e68 < t Initial program 46.1%
Simplified48.0%
Taylor expanded in l around 0 46.0%
associate-*r*46.0%
Simplified46.0%
add-sqr-sqrt46.0%
pow1/246.0%
pow1/253.8%
pow-prod-down35.8%
pow235.8%
Applied egg-rr35.8%
unpow1/235.8%
unpow235.8%
rem-sqrt-square54.5%
*-commutative54.5%
*-commutative54.5%
Simplified54.5%
Final simplification45.2%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= t 1.7e+82) (sqrt (* (* 2.0 (* n U)) (- t (* 2.0 (* l_m (/ l_m Om)))))) (pow (* (* n t) (* 2.0 U)) 0.5)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 1.7e+82) {
tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l_m * (l_m / Om))))));
} else {
tmp = pow(((n * t) * (2.0 * U)), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (t <= 1.7d+82) then
tmp = sqrt(((2.0d0 * (n * u)) * (t - (2.0d0 * (l_m * (l_m / om))))))
else
tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (t <= 1.7e+82) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l_m * (l_m / Om))))));
} else {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if t <= 1.7e+82: tmp = math.sqrt(((2.0 * (n * U)) * (t - (2.0 * (l_m * (l_m / Om)))))) else: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (t <= 1.7e+82) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))); else tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (t <= 1.7e+82) tmp = sqrt(((2.0 * (n * U)) * (t - (2.0 * (l_m * (l_m / Om)))))); else tmp = ((n * t) * (2.0 * U)) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, 1.7e+82], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.7 \cdot 10^{+82}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\end{array}
\end{array}
if t < 1.69999999999999997e82Initial program 47.7%
Simplified49.6%
Taylor expanded in n around 0 40.5%
pow246.0%
associate-*r/47.9%
*-commutative47.9%
Applied egg-rr42.4%
if 1.69999999999999997e82 < t Initial program 48.6%
Simplified50.7%
Taylor expanded in l around 0 48.8%
associate-*r*48.8%
Simplified48.8%
pow1/257.4%
Applied egg-rr57.4%
Final simplification45.1%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n -5.8e+233) (pow (* 2.0 (* t (* n U))) 0.5) (pow (* (* n t) (* 2.0 U)) 0.5)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= -5.8e+233) {
tmp = pow((2.0 * (t * (n * U))), 0.5);
} else {
tmp = pow(((n * t) * (2.0 * U)), 0.5);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (n <= (-5.8d+233)) then
tmp = (2.0d0 * (t * (n * u))) ** 0.5d0
else
tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= -5.8e+233) {
tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
} else {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= -5.8e+233: tmp = math.pow((2.0 * (t * (n * U))), 0.5) else: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= -5.8e+233) tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5; else tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (n <= -5.8e+233) tmp = (2.0 * (t * (n * U))) ^ 0.5; else tmp = ((n * t) * (2.0 * U)) ^ 0.5; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, -5.8e+233], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq -5.8 \cdot 10^{+233}:\\
\;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\end{array}
\end{array}
if n < -5.80000000000000024e233Initial program 60.6%
Simplified50.8%
Taylor expanded in l around 0 31.1%
pow1/231.1%
associate-*r*60.9%
Applied egg-rr60.9%
if -5.80000000000000024e233 < n Initial program 47.4%
Simplified48.5%
Taylor expanded in l around 0 34.4%
associate-*r*34.4%
Simplified34.4%
pow1/236.5%
Applied egg-rr36.5%
Final simplification37.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= U 2.9e-184) (sqrt (* 2.0 (* n (* U t)))) (sqrt (* t (* 2.0 (* n U))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 2.9e-184) {
tmp = sqrt((2.0 * (n * (U * t))));
} else {
tmp = sqrt((t * (2.0 * (n * U))));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (u <= 2.9d-184) then
tmp = sqrt((2.0d0 * (n * (u * t))))
else
tmp = sqrt((t * (2.0d0 * (n * u))))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (U <= 2.9e-184) {
tmp = Math.sqrt((2.0 * (n * (U * t))));
} else {
tmp = Math.sqrt((t * (2.0 * (n * U))));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if U <= 2.9e-184: tmp = math.sqrt((2.0 * (n * (U * t)))) else: tmp = math.sqrt((t * (2.0 * (n * U)))) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (U <= 2.9e-184) tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t)))); else tmp = sqrt(Float64(t * Float64(2.0 * Float64(n * U)))); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (U <= 2.9e-184) tmp = sqrt((2.0 * (n * (U * t)))); else tmp = sqrt((t * (2.0 * (n * U)))); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 2.9e-184], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;U \leq 2.9 \cdot 10^{-184}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\
\end{array}
\end{array}
if U < 2.90000000000000014e-184Initial program 45.7%
Simplified54.4%
Taylor expanded in l around 0 35.9%
if 2.90000000000000014e-184 < U Initial program 51.2%
Simplified53.0%
Taylor expanded in t around inf 34.5%
Final simplification35.3%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (pow (* 2.0 (* t (* n U))) 0.5))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return pow((2.0 * (t * (n * U))), 0.5);
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = (2.0d0 * (t * (n * u))) ** 0.5d0
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.pow((2.0 * (t * (n * U))), 0.5);
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.pow((2.0 * (t * (n * U))), 0.5)
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5 end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = (2.0 * (t * (n * U))) ^ 0.5; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}
\end{array}
Initial program 47.9%
Simplified48.6%
Taylor expanded in l around 0 30.8%
pow1/232.1%
associate-*r*35.1%
Applied egg-rr35.1%
Final simplification35.1%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* (* n t) (* 2.0 U))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt(((n * t) * (2.0 * U)));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt(((n * t) * (2.0d0 * u)))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt(((n * t) * (2.0 * U)));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt(((n * t) * (2.0 * U)))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(Float64(n * t) * Float64(2.0 * U))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt(((n * t) * (2.0 * U))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}
\end{array}
Initial program 47.9%
Simplified48.6%
Taylor expanded in l around 0 33.6%
associate-*r*33.6%
Simplified33.6%
Final simplification33.6%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((2.0 * (n * (U * t))));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (n * (u * t))))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt((2.0 * (n * (U * t))));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((2.0 * (n * (U * t))))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(2.0 * Float64(n * Float64(U * t)))) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((2.0 * (n * (U * t)))); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Initial program 47.9%
Simplified48.6%
Taylor expanded in l around 0 30.8%
herbie shell --seed 2024132
(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*))))))