
(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 16 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}
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2 (* n t_1))
(t_3
(sqrt
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U)))))))
(if (<= t_3 0.0)
(*
(sqrt (* 2.0 n))
(sqrt (* U (- t (fma (- U U*) t_2 (/ (* 2.0 (pow l 2.0)) Om))))))
(if (<= t_3 INFINITY)
(sqrt
(*
(* 2.0 (* n U))
(- t (fma (* 2.0 l) (/ l Om) (* n (* t_1 (- U*)))))))
(sqrt
(*
(* U -2.0)
(*
(pow l 2.0)
(* n (+ (/ 2.0 Om) (* n (/ (- U U*) (pow Om 2.0))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = pow((l / Om), 2.0);
double t_2 = n * t_1;
double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma((U - U_42_), t_2, ((2.0 * pow(l, 2.0)) / Om)))));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - fma((2.0 * l), (l / Om), (n * (t_1 * -U_42_))))));
} else {
tmp = sqrt(((U * -2.0) * (pow(l, 2.0) * (n * ((2.0 / Om) + (n * ((U - U_42_) / pow(Om, 2.0))))))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Om) ^ 2.0 t_2 = Float64(n * t_1) t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U))))) tmp = 0.0 if (t_3 <= 0.0) tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(Float64(U - U_42_), t_2, Float64(Float64(2.0 * (l ^ 2.0)) / Om)))))); elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - fma(Float64(2.0 * l), Float64(l / Om), Float64(n * Float64(t_1 * Float64(-U_42_))))))); else tmp = sqrt(Float64(Float64(U * -2.0) * Float64((l ^ 2.0) * Float64(n * Float64(Float64(2.0 / Om) + Float64(n * Float64(Float64(U - U_42_) / (Om ^ 2.0)))))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(n * t$95$1), $MachinePrecision]}, Block[{t$95$3 = 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[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(N[(U - U$42$), $MachinePrecision] * t$95$2 + N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + N[(n * N[(t$95$1 * (-U$42$)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * -2.0), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n * N[(N[(2.0 / Om), $MachinePrecision] + N[(n * N[(N[(U - U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := n \cdot t\_1\\
t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_2 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(U - U*, t\_2, \frac{2 \cdot {\ell}^{2}}{Om}\right)\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \mathsf{fma}\left(2 \cdot \ell, \frac{\ell}{Om}, n \cdot \left(t\_1 \cdot \left(-U*\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{2}{Om} + n \cdot \frac{U - U*}{{Om}^{2}}\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 11.3%
Simplified32.2%
sqrt-prod40.5%
fma-undefine40.5%
associate-*r*40.5%
+-commutative40.5%
*-commutative40.5%
fma-define40.5%
associate-*r/40.5%
pow240.5%
Applied egg-rr40.5%
*-commutative40.5%
associate-*r/40.5%
Simplified40.5%
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 69.6%
Simplified76.9%
associate-*r*76.9%
fma-define76.9%
associate-*r*77.4%
Applied egg-rr77.4%
Taylor expanded in U around 0 59.2%
associate-/l*62.7%
unpow262.7%
unpow262.7%
times-frac77.4%
unpow277.4%
neg-mul-177.4%
distribute-lft-neg-out77.4%
*-commutative77.4%
Simplified77.4%
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%
Simplified9.0%
Taylor expanded in l around inf 28.9%
associate-*r*28.9%
associate-*r/28.9%
metadata-eval28.9%
associate-/l*29.0%
Simplified29.0%
Final simplification63.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U* U))))))
(if (<= t_2 1e-281)
(pow (* 2.0 (* n (* U t))) 0.5)
(if (<= t_2 INFINITY)
(sqrt
(*
(* 2.0 (* n U))
(- t (fma (* 2.0 l) (/ l Om) (* n (* t_1 (- U*)))))))
(sqrt
(*
-2.0
(*
U
(*
(pow l 2.0)
(* n (+ (* 2.0 (/ 1.0 Om)) (/ (* n (- U U*)) (pow Om 2.0))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = pow((l / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)));
double tmp;
if (t_2 <= 1e-281) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t - fma((2.0 * l), (l / Om), (n * (t_1 * -U_42_))))));
} else {
tmp = sqrt((-2.0 * (U * (pow(l, 2.0) * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / pow(Om, 2.0))))))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = 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(Float64(n * t_1) * Float64(U_42_ - U)))) tmp = 0.0 if (t_2 <= 1e-281) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - fma(Float64(2.0 * l), Float64(l / Om), Float64(n * Float64(t_1 * Float64(-U_42_))))))); else tmp = sqrt(Float64(-2.0 * Float64(U * Float64((l ^ 2.0) * Float64(n * Float64(Float64(2.0 * Float64(1.0 / Om)) + Float64(Float64(n * Float64(U - U_42_)) / (Om ^ 2.0)))))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $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[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 1e-281], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(N[(2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + N[(n * N[(t$95$1 * (-U$42$)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(U * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n * N[(N[(2.0 * N[(1.0 / Om), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\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) + \left(n \cdot t\_1\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_2 \leq 10^{-281}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \mathsf{fma}\left(2 \cdot \ell, \frac{\ell}{Om}, n \cdot \left(t\_1 \cdot \left(-U*\right)\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if (*.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*)))) < 1e-281Initial program 13.9%
Simplified34.4%
Taylor expanded in t around inf 32.4%
pow1/234.6%
associate-*l*34.6%
Applied egg-rr34.6%
if 1e-281 < (*.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 69.4%
Simplified76.8%
associate-*r*76.8%
fma-define76.8%
associate-*r*77.3%
Applied egg-rr77.3%
Taylor expanded in U around 0 59.4%
associate-/l*63.0%
unpow263.0%
unpow263.0%
times-frac77.4%
unpow277.4%
neg-mul-177.4%
distribute-lft-neg-out77.4%
*-commutative77.4%
Simplified77.4%
if +inf.0 < (*.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 34.4%
Final simplification62.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U* U))))))
(if (<= t_2 1e-281)
(pow (* 2.0 (* n (* U t))) 0.5)
(if (<= t_2 INFINITY)
(sqrt
(* (* 2.0 (* n U)) (+ t (- (* n (* t_1 U*)) (* (/ l Om) (* 2.0 l))))))
(sqrt
(*
-2.0
(*
U
(*
(pow l 2.0)
(* n (+ (* 2.0 (/ 1.0 Om)) (/ (* n (- U U*)) (pow Om 2.0))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = pow((l / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)));
double tmp;
if (t_2 <= 1e-281) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l))))));
} else {
tmp = sqrt((-2.0 * (U * (pow(l, 2.0) * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / pow(Om, 2.0))))))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.pow((l / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)));
double tmp;
if (t_2 <= 1e-281) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l))))));
} else {
tmp = Math.sqrt((-2.0 * (U * (Math.pow(l, 2.0) * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / Math.pow(Om, 2.0))))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = math.pow((l / Om), 2.0) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U))) tmp = 0 if t_2 <= 1e-281: tmp = math.pow((2.0 * (n * (U * t))), 0.5) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l)))))) else: tmp = math.sqrt((-2.0 * (U * (math.pow(l, 2.0) * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / math.pow(Om, 2.0)))))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = 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(Float64(n * t_1) * Float64(U_42_ - U)))) tmp = 0.0 if (t_2 <= 1e-281) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(n * Float64(t_1 * U_42_)) - Float64(Float64(l / Om) * Float64(2.0 * l)))))); else tmp = sqrt(Float64(-2.0 * Float64(U * Float64((l ^ 2.0) * Float64(n * Float64(Float64(2.0 * Float64(1.0 / Om)) + Float64(Float64(n * Float64(U - U_42_)) / (Om ^ 2.0)))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (l / Om) ^ 2.0; t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U))); tmp = 0.0; if (t_2 <= 1e-281) tmp = (2.0 * (n * (U * t))) ^ 0.5; elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l)))))); else tmp = sqrt((-2.0 * (U * ((l ^ 2.0) * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / (Om ^ 2.0)))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $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[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 1e-281], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(n * N[(t$95$1 * U$42$), $MachinePrecision]), $MachinePrecision] - N[(N[(l / Om), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(U * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n * N[(N[(2.0 * N[(1.0 / Om), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\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) + \left(n \cdot t\_1\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_2 \leq 10^{-281}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(n \cdot \left(t\_1 \cdot U*\right) - \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)\right)}\\
\end{array}
\end{array}
if (*.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*)))) < 1e-281Initial program 13.9%
Simplified34.4%
Taylor expanded in t around inf 32.4%
pow1/234.6%
associate-*l*34.6%
Applied egg-rr34.6%
if 1e-281 < (*.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 69.4%
Simplified76.8%
associate-*r*76.8%
fma-define76.8%
associate-*r*77.3%
Applied egg-rr77.3%
Taylor expanded in U around 0 59.4%
associate-/l*63.0%
unpow263.0%
unpow263.0%
times-frac77.4%
unpow277.4%
neg-mul-177.4%
distribute-lft-neg-out77.4%
*-commutative77.4%
Simplified77.4%
fma-undefine77.3%
Applied egg-rr77.3%
if +inf.0 < (*.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 34.4%
Final simplification62.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U* U))))))
(if (<= t_2 1e-281)
(pow (* 2.0 (* n (* U t))) 0.5)
(if (<= t_2 INFINITY)
(sqrt
(* (* 2.0 (* n U)) (+ t (- (* n (* t_1 U*)) (* (/ l Om) (* 2.0 l))))))
(sqrt
(*
(* U -2.0)
(*
(pow l 2.0)
(* n (+ (/ 2.0 Om) (* n (/ (- U U*) (pow Om 2.0))))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = pow((l / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)));
double tmp;
if (t_2 <= 1e-281) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l))))));
} else {
tmp = sqrt(((U * -2.0) * (pow(l, 2.0) * (n * ((2.0 / Om) + (n * ((U - U_42_) / pow(Om, 2.0))))))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.pow((l / Om), 2.0);
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)));
double tmp;
if (t_2 <= 1e-281) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l))))));
} else {
tmp = Math.sqrt(((U * -2.0) * (Math.pow(l, 2.0) * (n * ((2.0 / Om) + (n * ((U - U_42_) / Math.pow(Om, 2.0))))))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = math.pow((l / Om), 2.0) t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U))) tmp = 0 if t_2 <= 1e-281: tmp = math.pow((2.0 * (n * (U * t))), 0.5) elif t_2 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l)))))) else: tmp = math.sqrt(((U * -2.0) * (math.pow(l, 2.0) * (n * ((2.0 / Om) + (n * ((U - U_42_) / math.pow(Om, 2.0)))))))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = 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(Float64(n * t_1) * Float64(U_42_ - U)))) tmp = 0.0 if (t_2 <= 1e-281) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; elseif (t_2 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(n * Float64(t_1 * U_42_)) - Float64(Float64(l / Om) * Float64(2.0 * l)))))); else tmp = sqrt(Float64(Float64(U * -2.0) * Float64((l ^ 2.0) * Float64(n * Float64(Float64(2.0 / Om) + Float64(n * Float64(Float64(U - U_42_) / (Om ^ 2.0)))))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (l / Om) ^ 2.0; t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U))); tmp = 0.0; if (t_2 <= 1e-281) tmp = (2.0 * (n * (U * t))) ^ 0.5; elseif (t_2 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l)))))); else tmp = sqrt(((U * -2.0) * ((l ^ 2.0) * (n * ((2.0 / Om) + (n * ((U - U_42_) / (Om ^ 2.0)))))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $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[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 1e-281], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(n * N[(t$95$1 * U$42$), $MachinePrecision]), $MachinePrecision] - N[(N[(l / Om), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * -2.0), $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n * N[(N[(2.0 / Om), $MachinePrecision] + N[(n * N[(N[(U - U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\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) + \left(n \cdot t\_1\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_2 \leq 10^{-281}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(n \cdot \left(t\_1 \cdot U*\right) - \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{2}{Om} + n \cdot \frac{U - U*}{{Om}^{2}}\right)\right)\right)}\\
\end{array}
\end{array}
if (*.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*)))) < 1e-281Initial program 13.9%
Simplified34.4%
Taylor expanded in t around inf 32.4%
pow1/234.6%
associate-*l*34.6%
Applied egg-rr34.6%
if 1e-281 < (*.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 69.4%
Simplified76.8%
associate-*r*76.8%
fma-define76.8%
associate-*r*77.3%
Applied egg-rr77.3%
Taylor expanded in U around 0 59.4%
associate-/l*63.0%
unpow263.0%
unpow263.0%
times-frac77.4%
unpow277.4%
neg-mul-177.4%
distribute-lft-neg-out77.4%
*-commutative77.4%
Simplified77.4%
fma-undefine77.3%
Applied egg-rr77.3%
if +inf.0 < (*.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 34.4%
associate-*r*34.4%
associate-*r/34.4%
metadata-eval34.4%
associate-/l*34.4%
Simplified34.4%
Final simplification62.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (pow (/ l Om) 2.0))
(t_2 (* n t_1))
(t_3
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U))))))
(if (<= t_3 1e-281)
(pow (* 2.0 (* n (* U t))) 0.5)
(if (<= t_3 INFINITY)
(sqrt
(* (* 2.0 (* n U)) (+ t (- (* n (* t_1 U*)) (* (/ l Om) (* 2.0 l))))))
(sqrt (* (* 2.0 n) (* t_2 (* U U*))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = pow((l / Om), 2.0);
double t_2 = n * t_1;
double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)));
double tmp;
if (t_3 <= 1e-281) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l))))));
} else {
tmp = sqrt(((2.0 * n) * (t_2 * (U * U_42_))));
}
return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = Math.pow((l / Om), 2.0);
double t_2 = n * t_1;
double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)));
double tmp;
if (t_3 <= 1e-281) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (t_2 * (U * U_42_))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = math.pow((l / Om), 2.0) t_2 = n * t_1 t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U))) tmp = 0 if t_3 <= 1e-281: tmp = math.pow((2.0 * (n * (U * t))), 0.5) elif t_3 <= math.inf: tmp = math.sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l)))))) else: tmp = math.sqrt(((2.0 * n) * (t_2 * (U * U_42_)))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(l / Om) ^ 2.0 t_2 = Float64(n * t_1) t_3 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U)))) tmp = 0.0 if (t_3 <= 1e-281) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; elseif (t_3 <= Inf) tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(n * Float64(t_1 * U_42_)) - Float64(Float64(l / Om) * Float64(2.0 * l)))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(t_2 * Float64(U * U_42_)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = (l / Om) ^ 2.0; t_2 = n * t_1; t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U))); tmp = 0.0; if (t_3 <= 1e-281) tmp = (2.0 * (n * (U * t))) ^ 0.5; elseif (t_3 <= Inf) tmp = sqrt(((2.0 * (n * U)) * (t + ((n * (t_1 * U_42_)) - ((l / Om) * (2.0 * l)))))); else tmp = sqrt(((2.0 * n) * (t_2 * (U * U_42_)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(n * t$95$1), $MachinePrecision]}, Block[{t$95$3 = 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$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 1e-281], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(n * N[(t$95$1 * U$42$), $MachinePrecision]), $MachinePrecision] - N[(N[(l / Om), $MachinePrecision] * N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(t$95$2 * N[(U * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := n \cdot t\_1\\
t_3 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_2 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_3 \leq 10^{-281}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(n \cdot \left(t\_1 \cdot U*\right) - \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(t\_2 \cdot \left(U \cdot U*\right)\right)}\\
\end{array}
\end{array}
if (*.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*)))) < 1e-281Initial program 13.9%
Simplified34.4%
Taylor expanded in t around inf 32.4%
pow1/234.6%
associate-*l*34.6%
Applied egg-rr34.6%
if 1e-281 < (*.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 69.4%
Simplified76.8%
associate-*r*76.8%
fma-define76.8%
associate-*r*77.3%
Applied egg-rr77.3%
Taylor expanded in U around 0 59.4%
associate-/l*63.0%
unpow263.0%
unpow263.0%
times-frac77.4%
unpow277.4%
neg-mul-177.4%
distribute-lft-neg-out77.4%
*-commutative77.4%
Simplified77.4%
fma-undefine77.3%
Applied egg-rr77.3%
if +inf.0 < (*.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 U* around inf 26.4%
Taylor expanded in U around 0 26.4%
associate-/l*26.4%
*-commutative26.4%
associate-*r/26.4%
associate-*r*26.2%
associate-/l*26.1%
unpow226.1%
unpow226.1%
times-frac29.3%
unpow229.3%
Simplified29.3%
Final simplification61.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 6.8e-105)
(sqrt (fabs (* 2.0 (* t (* n U)))))
(if (<= l 2.6e+165)
(sqrt (* (* 2.0 n) (* U (- t (/ (* 2.0 (pow l 2.0)) Om)))))
(sqrt (* (* 2.0 n) (* U (* (* n (pow (/ l Om) 2.0)) U*)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.8e-105) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else if (l <= 2.6e+165) {
tmp = sqrt(((2.0 * n) * (U * (t - ((2.0 * pow(l, 2.0)) / Om)))));
} else {
tmp = sqrt(((2.0 * n) * (U * ((n * pow((l / Om), 2.0)) * U_42_))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 6.8d-105) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else if (l <= 2.6d+165) then
tmp = sqrt(((2.0d0 * n) * (u * (t - ((2.0d0 * (l ** 2.0d0)) / om)))))
else
tmp = sqrt(((2.0d0 * n) * (u * ((n * ((l / om) ** 2.0d0)) * u_42))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 6.8e-105) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else if (l <= 2.6e+165) {
tmp = Math.sqrt(((2.0 * n) * (U * (t - ((2.0 * Math.pow(l, 2.0)) / Om)))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * ((n * Math.pow((l / Om), 2.0)) * U_42_))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 6.8e-105: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) elif l <= 2.6e+165: tmp = math.sqrt(((2.0 * n) * (U * (t - ((2.0 * math.pow(l, 2.0)) / Om))))) else: tmp = math.sqrt(((2.0 * n) * (U * ((n * math.pow((l / Om), 2.0)) * U_42_)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 6.8e-105) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); elseif (l <= 2.6e+165) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(2.0 * (l ^ 2.0)) / Om))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * U_42_)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 6.8e-105) tmp = sqrt(abs((2.0 * (t * (n * U))))); elseif (l <= 2.6e+165) tmp = sqrt(((2.0 * n) * (U * (t - ((2.0 * (l ^ 2.0)) / Om))))); else tmp = sqrt(((2.0 * n) * (U * ((n * ((l / Om) ^ 2.0)) * U_42_)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 6.8e-105], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.6e+165], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6.8 \cdot 10^{-105}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+165}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{2 \cdot {\ell}^{2}}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot U*\right)\right)}\\
\end{array}
\end{array}
if l < 6.79999999999999984e-105Initial program 50.9%
Simplified55.2%
Taylor expanded in t around inf 39.2%
add-sqr-sqrt39.2%
pow1/239.2%
pow1/241.0%
pow-prod-down31.7%
pow231.7%
associate-*r*31.7%
Applied egg-rr31.7%
unpow1/231.7%
unpow231.7%
rem-sqrt-square41.8%
associate-*r*41.8%
associate-*r*44.1%
Simplified44.1%
if 6.79999999999999984e-105 < l < 2.6000000000000001e165Initial program 55.7%
Simplified64.7%
Taylor expanded in Om around inf 61.3%
associate-*r/61.3%
Simplified61.3%
if 2.6000000000000001e165 < l Initial program 23.8%
Simplified38.3%
Taylor expanded in U* around inf 38.9%
associate-/l*38.9%
*-commutative38.9%
Applied egg-rr38.9%
associate-/l*38.9%
unpow238.9%
unpow238.9%
times-frac40.1%
unpow240.1%
Simplified40.1%
Final simplification46.8%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 1.05e-78)
(sqrt (fabs (* 2.0 (* t (* n U)))))
(if (<= l 2.05e+164)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(sqrt (* (* 2.0 n) (* U (* (* n (pow (/ l Om) 2.0)) U*)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.05e-78) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else if (l <= 2.05e+164) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else {
tmp = sqrt(((2.0 * n) * (U * ((n * pow((l / Om), 2.0)) * U_42_))));
}
return tmp;
}
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.05d-78) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else if (l <= 2.05d+164) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
else
tmp = sqrt(((2.0d0 * n) * (u * ((n * ((l / om) ** 2.0d0)) * u_42))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.05e-78) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else if (l <= 2.05e+164) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else {
tmp = Math.sqrt(((2.0 * n) * (U * ((n * Math.pow((l / Om), 2.0)) * U_42_))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.05e-78: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) elif l <= 2.05e+164: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) else: tmp = math.sqrt(((2.0 * n) * (U * ((n * math.pow((l / Om), 2.0)) * U_42_)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.05e-78) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); elseif (l <= 2.05e+164) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); else tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * U_42_)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.05e-78) tmp = sqrt(abs((2.0 * (t * (n * U))))); elseif (l <= 2.05e+164) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); else tmp = sqrt(((2.0 * n) * (U * ((n * ((l / Om) ^ 2.0)) * U_42_)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.05e-78], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.05e+164], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.05 \cdot 10^{-78}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{elif}\;\ell \leq 2.05 \cdot 10^{+164}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot U*\right)\right)}\\
\end{array}
\end{array}
if l < 1.05e-78Initial program 52.3%
Simplified56.4%
Taylor expanded in t around inf 40.3%
add-sqr-sqrt40.3%
pow1/240.3%
pow1/242.1%
pow-prod-down32.6%
pow232.6%
associate-*r*32.6%
Applied egg-rr32.6%
unpow1/232.6%
unpow232.6%
rem-sqrt-square42.9%
associate-*r*42.9%
associate-*r*45.7%
Simplified45.7%
if 1.05e-78 < l < 2.05000000000000008e164Initial program 50.6%
Simplified60.6%
Taylor expanded in n around 0 54.8%
if 2.05000000000000008e164 < l Initial program 23.8%
Simplified38.3%
Taylor expanded in U* around inf 38.9%
associate-/l*38.9%
*-commutative38.9%
Applied egg-rr38.9%
associate-/l*38.9%
unpow238.9%
unpow238.9%
times-frac40.1%
unpow240.1%
Simplified40.1%
Final simplification46.4%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 3.8e-79)
(sqrt (fabs (* 2.0 (* t (* n U)))))
(if (<= l 2.6e+164)
(sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
(* (sqrt (* U U*)) (* l (/ (* n (sqrt 2.0)) (- Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 3.8e-79) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else if (l <= 2.6e+164) {
tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
} else {
tmp = sqrt((U * U_42_)) * (l * ((n * sqrt(2.0)) / -Om));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 3.8d-79) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else if (l <= 2.6d+164) then
tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
else
tmp = sqrt((u * u_42)) * (l * ((n * sqrt(2.0d0)) / -om))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 3.8e-79) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else if (l <= 2.6e+164) {
tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
} else {
tmp = Math.sqrt((U * U_42_)) * (l * ((n * Math.sqrt(2.0)) / -Om));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 3.8e-79: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) elif l <= 2.6e+164: tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om))))))) else: tmp = math.sqrt((U * U_42_)) * (l * ((n * math.sqrt(2.0)) / -Om)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 3.8e-79) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); elseif (l <= 2.6e+164) tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om))))))); else tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(l * Float64(Float64(n * sqrt(2.0)) / Float64(-Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 3.8e-79) tmp = sqrt(abs((2.0 * (t * (n * U))))); elseif (l <= 2.6e+164) tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om))))))); else tmp = sqrt((U * U_42_)) * (l * ((n * sqrt(2.0)) / -Om)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 3.8e-79], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 2.6e+164], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(l * N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / (-Om)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.8 \cdot 10^{-79}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+164}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot U*} \cdot \left(\ell \cdot \frac{n \cdot \sqrt{2}}{-Om}\right)\\
\end{array}
\end{array}
if l < 3.8000000000000001e-79Initial program 52.3%
Simplified56.4%
Taylor expanded in t around inf 40.3%
add-sqr-sqrt40.3%
pow1/240.3%
pow1/242.1%
pow-prod-down32.6%
pow232.6%
associate-*r*32.6%
Applied egg-rr32.6%
unpow1/232.6%
unpow232.6%
rem-sqrt-square42.9%
associate-*r*42.9%
associate-*r*45.7%
Simplified45.7%
if 3.8000000000000001e-79 < l < 2.5999999999999999e164Initial program 50.6%
Simplified60.6%
Taylor expanded in n around 0 54.8%
if 2.5999999999999999e164 < l Initial program 23.8%
Simplified38.3%
Taylor expanded in U* around inf 38.9%
Taylor expanded in n around -inf 32.8%
associate-*r*32.8%
mul-1-neg32.8%
associate-/l*37.7%
associate-/l*37.7%
Simplified37.7%
Taylor expanded in l around 0 32.8%
mul-1-neg32.8%
associate-*r*32.7%
associate-*r/32.8%
*-commutative32.8%
distribute-rgt-neg-in32.8%
associate-*l*37.7%
distribute-lft-neg-out37.7%
*-commutative37.7%
associate-*r/37.7%
Simplified37.7%
Final simplification46.1%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= U 1.25e-306)
(pow (* 2.0 (* n (* U t))) 0.5)
(if (<= U 6.3e-124)
(* (sqrt (* 2.0 U)) (sqrt (* n t)))
(sqrt (fabs (* 2.0 (* t (* n U))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1.25e-306) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else if (U <= 6.3e-124) {
tmp = sqrt((2.0 * U)) * sqrt((n * t));
} else {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
}
return tmp;
}
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 <= 1.25d-306) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else if (u <= 6.3d-124) then
tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
else
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (U <= 1.25e-306) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else if (U <= 6.3e-124) {
tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
} else {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if U <= 1.25e-306: tmp = math.pow((2.0 * (n * (U * t))), 0.5) elif U <= 6.3e-124: tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t)) else: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (U <= 1.25e-306) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; elseif (U <= 6.3e-124) tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t))); else tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (U <= 1.25e-306) tmp = (2.0 * (n * (U * t))) ^ 0.5; elseif (U <= 6.3e-124) tmp = sqrt((2.0 * U)) * sqrt((n * t)); else tmp = sqrt(abs((2.0 * (t * (n * U))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, 1.25e-306], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[U, 6.3e-124], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.25 \cdot 10^{-306}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{elif}\;U \leq 6.3 \cdot 10^{-124}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\end{array}
\end{array}
if U < 1.25e-306Initial program 40.8%
Simplified53.4%
Taylor expanded in t around inf 40.0%
pow1/241.6%
associate-*l*41.6%
Applied egg-rr41.6%
if 1.25e-306 < U < 6.30000000000000027e-124Initial program 44.6%
Simplified47.4%
Taylor expanded in t around inf 27.9%
pow1/230.0%
associate-*r*30.0%
unpow-prod-down41.0%
pow1/238.9%
Applied egg-rr38.9%
unpow1/238.9%
*-commutative38.9%
Simplified38.9%
if 6.30000000000000027e-124 < U Initial program 62.8%
Simplified61.3%
Taylor expanded in t around inf 38.1%
add-sqr-sqrt38.1%
pow1/238.1%
pow1/239.5%
pow-prod-down36.5%
pow236.5%
associate-*r*36.5%
Applied egg-rr36.5%
unpow1/236.5%
unpow236.5%
rem-sqrt-square40.4%
associate-*r*40.4%
associate-*r*49.1%
Simplified49.1%
Final simplification43.4%
(FPCore (n U t l Om U*) :precision binary64 (if (<= n 1.7e-278) (sqrt (fabs (* 2.0 (* t (* n U))))) (* (sqrt (* 2.0 n)) (sqrt (* U t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 1.7e-278) {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
} else {
tmp = sqrt((2.0 * n)) * sqrt((U * t));
}
return tmp;
}
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 (n <= 1.7d-278) then
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
else
tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (n <= 1.7e-278) {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
} else {
tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if n <= 1.7e-278: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) else: tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t)) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (n <= 1.7e-278) tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); else tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (n <= 1.7e-278) tmp = sqrt(abs((2.0 * (t * (n * U))))); else tmp = sqrt((2.0 * n)) * sqrt((U * t)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 1.7e-278], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;n \leq 1.7 \cdot 10^{-278}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\
\end{array}
\end{array}
if n < 1.7e-278Initial program 51.5%
Simplified57.5%
Taylor expanded in t around inf 39.8%
add-sqr-sqrt39.8%
pow1/239.8%
pow1/242.0%
pow-prod-down35.2%
pow235.2%
associate-*r*35.2%
Applied egg-rr35.2%
unpow1/235.2%
unpow235.2%
rem-sqrt-square42.7%
associate-*r*42.7%
associate-*r*43.7%
Simplified43.7%
if 1.7e-278 < n Initial program 43.9%
Simplified51.2%
Taylor expanded in t around inf 34.4%
sqrt-prod42.2%
Applied egg-rr42.2%
*-commutative42.2%
Simplified42.2%
Final simplification43.0%
(FPCore (n U t l Om U*) :precision binary64 (if (<= t -2.25e+105) (pow (* (* n t) (* 2.0 U)) 0.5) (sqrt (fabs (* 2.0 (* t (* n U)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -2.25e+105) {
tmp = pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = sqrt(fabs((2.0 * (t * (n * U)))));
}
return tmp;
}
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 (t <= (-2.25d+105)) then
tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
else
tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (t <= -2.25e+105) {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
} else {
tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if t <= -2.25e+105: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) else: tmp = math.sqrt(math.fabs((2.0 * (t * (n * U))))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (t <= -2.25e+105) tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; else tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U))))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (t <= -2.25e+105) tmp = ((n * t) * (2.0 * U)) ^ 0.5; else tmp = sqrt(abs((2.0 * (t * (n * U))))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -2.25e+105], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.25 \cdot 10^{+105}:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\
\end{array}
\end{array}
if t < -2.2500000000000001e105Initial program 53.2%
Simplified65.5%
Taylor expanded in t around inf 57.2%
pow1/261.7%
associate-*r*61.7%
Applied egg-rr61.7%
if -2.2500000000000001e105 < t Initial program 47.0%
Simplified52.4%
Taylor expanded in t around inf 31.5%
add-sqr-sqrt31.5%
pow1/231.5%
pow1/233.0%
pow-prod-down27.1%
pow227.1%
associate-*r*27.1%
Applied egg-rr27.1%
unpow1/227.1%
unpow227.1%
rem-sqrt-square33.9%
associate-*r*33.9%
associate-*r*37.5%
Simplified37.5%
Final simplification41.8%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 4.8e-214) (pow (* 2.0 (* n (* U t))) 0.5) (pow (* (* n t) (* 2.0 U)) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.8e-214) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = pow(((n * t) * (2.0 * U)), 0.5);
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (l <= 4.8d-214) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.8e-214) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 4.8e-214: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.pow(((n * t) * (2.0 * U)), 0.5) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.8e-214) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5; end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 4.8e-214) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = ((n * t) * (2.0 * U)) ^ 0.5; end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.8e-214], N[Power[N[(2.0 * N[(n * N[(U * t), $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}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.8 \cdot 10^{-214}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\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 l < 4.80000000000000041e-214Initial program 50.6%
Simplified55.6%
Taylor expanded in t around inf 38.7%
pow1/240.8%
associate-*l*40.8%
Applied egg-rr40.8%
if 4.80000000000000041e-214 < l Initial program 44.4%
Simplified53.3%
Taylor expanded in t around inf 32.9%
pow1/234.9%
associate-*r*34.9%
Applied egg-rr34.9%
Final simplification38.4%
(FPCore (n U t l Om U*) :precision binary64 (if (<= Om 4.6e+27) (pow (* 2.0 (* n (* U t))) 0.5) (sqrt (* 2.0 (* U (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= 4.6e+27) {
tmp = pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (om <= 4.6d+27) then
tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (Om <= 4.6e+27) {
tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if Om <= 4.6e+27: tmp = math.pow((2.0 * (n * (U * t))), 0.5) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Om <= 4.6e+27) tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5; else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (Om <= 4.6e+27) tmp = (2.0 * (n * (U * t))) ^ 0.5; else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, 4.6e+27], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;Om \leq 4.6 \cdot 10^{+27}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if Om < 4.6000000000000001e27Initial program 46.0%
Simplified52.7%
Taylor expanded in t around inf 32.5%
pow1/234.2%
associate-*l*34.2%
Applied egg-rr34.2%
if 4.6000000000000001e27 < Om Initial program 52.9%
Simplified59.2%
Taylor expanded in t around inf 52.3%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.5e-237) (sqrt (* (* 2.0 n) (* U t))) (sqrt (* 2.0 (* U (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-237) {
tmp = sqrt(((2.0 * n) * (U * t)));
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
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-237) then
tmp = sqrt(((2.0d0 * n) * (u * t)))
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e-237) {
tmp = Math.sqrt(((2.0 * n) * (U * t)));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e-237: tmp = math.sqrt(((2.0 * n) * (U * t))) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e-237) tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.5e-237) tmp = sqrt(((2.0 * n) * (U * t))); else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e-237], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{-237}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 1.50000000000000012e-237Initial program 50.5%
Simplified55.7%
Taylor expanded in t around inf 38.3%
if 1.50000000000000012e-237 < l Initial program 44.7%
Simplified53.3%
Taylor expanded in t around inf 33.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 8e-205) (sqrt (* 2.0 (* t (* n U)))) (sqrt (* 2.0 (* U (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8e-205) {
tmp = sqrt((2.0 * (t * (n * U))));
} else {
tmp = sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
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 <= 8d-205) then
tmp = sqrt((2.0d0 * (t * (n * u))))
else
tmp = sqrt((2.0d0 * (u * (n * t))))
end if
code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 8e-205) {
tmp = Math.sqrt((2.0 * (t * (n * U))));
} else {
tmp = Math.sqrt((2.0 * (U * (n * t))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 8e-205: tmp = math.sqrt((2.0 * (t * (n * U)))) else: tmp = math.sqrt((2.0 * (U * (n * t)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 8e-205) tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 8e-205) tmp = sqrt((2.0 * (t * (n * U)))); else tmp = sqrt((2.0 * (U * (n * t)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 8e-205], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 8 \cdot 10^{-205}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\
\end{array}
\end{array}
if l < 8e-205Initial program 51.0%
Simplified55.9%
Taylor expanded in t around inf 38.8%
associate-*r*40.0%
Simplified40.0%
if 8e-205 < l Initial program 43.6%
Simplified52.7%
Taylor expanded in t around inf 31.8%
Final simplification36.8%
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
return sqrt((2.0 * (U * (n * t))));
}
real(8) function code(n, u, t, l, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((2.0d0 * (u * (n * t))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
return Math.sqrt((2.0 * (U * (n * t))));
}
def code(n, U, t, l, Om, U_42_): return math.sqrt((2.0 * (U * (n * t))))
function code(n, U, t, l, Om, U_42_) return sqrt(Float64(2.0 * Float64(U * Float64(n * t)))) end
function tmp = code(n, U, t, l, Om, U_42_) tmp = sqrt((2.0 * (U * (n * t)))); end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Initial program 48.1%
Simplified54.7%
Taylor expanded in t around inf 36.0%
herbie shell --seed 2024137
(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*))))))