
(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 19 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 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
(t_2 (* (* 2.0 n) U))
(t_3 (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1))))
(if (<= t_3 0.0)
(sqrt
(*
(*
n
(+ t (/ (+ (* (* l l) -2.0) (* n (* l (/ (* l (- U* U)) Om)))) Om)))
(* 2.0 U)))
(if (<= t_3 INFINITY)
(sqrt (* t_2 (+ (- t (* 2.0 (* l (/ l Om)))) t_1)))
(sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* (* n l) (* U l)) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
double t_2 = (2.0 * n) * U;
double t_3 = t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1);
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt(((n * (t + ((((l * l) * -2.0) + (n * (l * ((l * (U_42_ - U)) / Om)))) / Om))) * (2.0 * U)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
} else {
tmp = sqrt(fma(2.0, (U * (n * t)), (-4.0 * (((n * l) * (U * l)) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1)) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(n * Float64(t + Float64(Float64(Float64(Float64(l * l) * -2.0) + Float64(n * Float64(l * Float64(Float64(l * Float64(U_42_ - U)) / Om)))) / Om))) * Float64(2.0 * U))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_1))); else tmp = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(Float64(n * l) * Float64(U * l)) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(n * N[(t + N[(N[(N[(N[(l * l), $MachinePrecision] * -2.0), $MachinePrecision] + N[(n * N[(l * N[(N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(N[(n * l), $MachinePrecision] * N[(U * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t\_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{\left(n \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 + n \cdot \left(\ell \cdot \frac{\ell \cdot \left(U* - U\right)}{Om}\right)}{Om}\right)\right) \cdot \left(2 \cdot U\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t\_1\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(U \cdot \ell\right)}{Om}\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*)))) < 0.0Initial program 17.2%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6424.9
Applied egg-rr24.9%
Applied egg-rr41.4%
associate-/l*N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6446.4
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6446.4
Applied egg-rr46.4%
if 0.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*)))) < +inf.0Initial program 78.0%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6479.7
Applied egg-rr79.7%
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%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6412.5
Simplified12.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.3
Applied egg-rr34.3%
Final simplification67.7%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (- t (* 2.0 (/ (* l l) Om))))
(t_3 (* t_1 (+ t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_3 0.0)
(sqrt
(*
(*
n
(+ t (/ (+ (* (* l l) -2.0) (* n (* l (/ (* l (- U* U)) Om)))) Om)))
(* 2.0 U)))
(if (<= t_3 INFINITY)
(sqrt (* t_1 (+ t_2 (* (/ l Om) (* (* n (/ l Om)) (- U* U))))))
(sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* (* n l) (* U l)) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = t - (2.0 * ((l * l) / Om));
double t_3 = t_1 * (t_2 + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt(((n * (t + ((((l * l) * -2.0) + (n * (l * ((l * (U_42_ - U)) / Om)))) / Om))) * (2.0 * U)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * (t_2 + ((l / Om) * ((n * (l / Om)) * (U_42_ - U))))));
} else {
tmp = sqrt(fma(2.0, (U * (n * t)), (-4.0 * (((n * l) * (U * l)) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) t_3 = Float64(t_1 * Float64(t_2 + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(n * Float64(t + Float64(Float64(Float64(Float64(l * l) * -2.0) + Float64(n * Float64(l * Float64(Float64(l * Float64(U_42_ - U)) / Om)))) / Om))) * Float64(2.0 * U))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_1 * Float64(t_2 + Float64(Float64(l / Om) * Float64(Float64(n * Float64(l / Om)) * Float64(U_42_ - U)))))); else tmp = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(Float64(n * l) * Float64(U * l)) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(t$95$2 + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(n * N[(t + N[(N[(N[(N[(l * l), $MachinePrecision] * -2.0), $MachinePrecision] + N[(n * N[(l * N[(N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$1 * N[(t$95$2 + N[(N[(l / Om), $MachinePrecision] * N[(N[(n * N[(l / Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(N[(n * l), $MachinePrecision] * N[(U * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := t - 2 \cdot \frac{\ell \cdot \ell}{Om}\\
t_3 := t\_1 \cdot \left(t\_2 + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{\left(n \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 + n \cdot \left(\ell \cdot \frac{\ell \cdot \left(U* - U\right)}{Om}\right)}{Om}\right)\right) \cdot \left(2 \cdot U\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(t\_2 + \frac{\ell}{Om} \cdot \left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \left(U* - U\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(U \cdot \ell\right)}{Om}\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*)))) < 0.0Initial program 17.2%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6424.9
Applied egg-rr24.9%
Applied egg-rr41.4%
associate-/l*N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6446.4
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6446.4
Applied egg-rr46.4%
if 0.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*)))) < +inf.0Initial program 78.0%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6478.0
Applied egg-rr78.0%
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%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6412.5
Simplified12.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.3
Applied egg-rr34.3%
Final simplification66.5%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (* (* 2.0 n) U))
(t_2 (- t (* 2.0 (/ (* l l) Om))))
(t_3 (* t_1 (+ t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_3 0.0)
(sqrt
(*
(*
n
(+ t (/ (+ (* (* l l) -2.0) (* n (* l (/ (* l (- U* U)) Om)))) Om)))
(* 2.0 U)))
(if (<= t_3 INFINITY)
(sqrt (* t_1 (+ t_2 (* (/ l Om) (* n (* (/ l Om) U*))))))
(sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* (* n l) (* U l)) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (2.0 * n) * U;
double t_2 = t - (2.0 * ((l * l) / Om));
double t_3 = t_1 * (t_2 + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_3 <= 0.0) {
tmp = sqrt(((n * (t + ((((l * l) * -2.0) + (n * (l * ((l * (U_42_ - U)) / Om)))) / Om))) * (2.0 * U)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = sqrt((t_1 * (t_2 + ((l / Om) * (n * ((l / Om) * U_42_))))));
} else {
tmp = sqrt(fma(2.0, (U * (n * t)), (-4.0 * (((n * l) * (U * l)) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(2.0 * n) * U) t_2 = Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) t_3 = Float64(t_1 * Float64(t_2 + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_3 <= 0.0) tmp = sqrt(Float64(Float64(n * Float64(t + Float64(Float64(Float64(Float64(l * l) * -2.0) + Float64(n * Float64(l * Float64(Float64(l * Float64(U_42_ - U)) / Om)))) / Om))) * Float64(2.0 * U))); elseif (t_3 <= Inf) tmp = sqrt(Float64(t_1 * Float64(t_2 + Float64(Float64(l / Om) * Float64(n * Float64(Float64(l / Om) * U_42_)))))); else tmp = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(Float64(n * l) * Float64(U * l)) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(t$95$2 + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(n * N[(t + N[(N[(N[(N[(l * l), $MachinePrecision] * -2.0), $MachinePrecision] + N[(n * N[(l * N[(N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$1 * N[(t$95$2 + N[(N[(l / Om), $MachinePrecision] * N[(n * N[(N[(l / Om), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(N[(n * l), $MachinePrecision] * N[(U * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := t - 2 \cdot \frac{\ell \cdot \ell}{Om}\\
t_3 := t\_1 \cdot \left(t\_2 + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{\left(n \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 + n \cdot \left(\ell \cdot \frac{\ell \cdot \left(U* - U\right)}{Om}\right)}{Om}\right)\right) \cdot \left(2 \cdot U\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(t\_2 + \frac{\ell}{Om} \cdot \left(n \cdot \left(\frac{\ell}{Om} \cdot U*\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(U \cdot \ell\right)}{Om}\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*)))) < 0.0Initial program 17.2%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6424.9
Applied egg-rr24.9%
Applied egg-rr41.4%
associate-/l*N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6446.4
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6446.4
Applied egg-rr46.4%
if 0.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*)))) < +inf.0Initial program 78.0%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6478.0
Applied egg-rr78.0%
lift--.f64N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6476.9
Applied egg-rr76.9%
Taylor expanded in U around 0
mul-1-negN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
lower-neg.f6477.3
Simplified77.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%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6412.5
Simplified12.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.3
Applied egg-rr34.3%
Final simplification66.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2 (* (* 2.0 n) U))
(t_3 (- t (* 2.0 t_1)))
(t_4 (* t_2 (+ t_3 (* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_4 2e-94)
(sqrt
(*
n
(*
(* 2.0 U)
(- t (fma 2.0 t_1 (* (/ l Om) (* (/ l Om) (* n (- U U*)))))))))
(if (<= t_4 INFINITY)
(sqrt (* t_2 (+ t_3 (* (/ l Om) (* U* (/ (* n l) Om))))))
(sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* (* n l) (* U l)) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = (2.0 * n) * U;
double t_3 = t - (2.0 * t_1);
double t_4 = t_2 * (t_3 + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_4 <= 2e-94) {
tmp = sqrt((n * ((2.0 * U) * (t - fma(2.0, t_1, ((l / Om) * ((l / Om) * (n * (U - U_42_)))))))));
} else if (t_4 <= ((double) INFINITY)) {
tmp = sqrt((t_2 * (t_3 + ((l / Om) * (U_42_ * ((n * l) / Om))))));
} else {
tmp = sqrt(fma(2.0, (U * (n * t)), (-4.0 * (((n * l) * (U * l)) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(2.0 * n) * U) t_3 = Float64(t - Float64(2.0 * t_1)) t_4 = Float64(t_2 * Float64(t_3 + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_4 <= 2e-94) tmp = sqrt(Float64(n * Float64(Float64(2.0 * U) * Float64(t - fma(2.0, t_1, Float64(Float64(l / Om) * Float64(Float64(l / Om) * Float64(n * Float64(U - U_42_))))))))); elseif (t_4 <= Inf) tmp = sqrt(Float64(t_2 * Float64(t_3 + Float64(Float64(l / Om) * Float64(U_42_ * Float64(Float64(n * l) / Om)))))); else tmp = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(Float64(n * l) * Float64(U * l)) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * N[(t$95$3 + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 2e-94], N[Sqrt[N[(n * N[(N[(2.0 * U), $MachinePrecision] * N[(t - N[(2.0 * t$95$1 + N[(N[(l / Om), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$2 * N[(t$95$3 + N[(N[(l / Om), $MachinePrecision] * N[(U$42$ * N[(N[(n * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(N[(n * l), $MachinePrecision] * N[(U * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := t - 2 \cdot t\_1\\
t_4 := t\_2 \cdot \left(t\_3 + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_4 \leq 2 \cdot 10^{-94}:\\
\;\;\;\;\sqrt{n \cdot \left(\left(2 \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, t\_1, \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(t\_3 + \frac{\ell}{Om} \cdot \left(U* \cdot \frac{n \cdot \ell}{Om}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(U \cdot \ell\right)}{Om}\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*)))) < 1.9999999999999999e-94Initial program 53.6%
Applied egg-rr56.3%
times-fracN/A
lift-/.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6466.2
Applied egg-rr66.2%
if 1.9999999999999999e-94 < (*.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 73.6%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6473.5
Applied egg-rr73.5%
Taylor expanded in U around 0
mul-1-negN/A
lower-neg.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6472.6
Simplified72.6%
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%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6412.5
Simplified12.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.3
Applied egg-rr34.3%
Final simplification65.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 0.0)
(sqrt (* (* 2.0 U) (* n t)))
(if (<= t_1 5e+299)
(sqrt (* (fma l (* (/ l Om) -2.0) t) (* 2.0 (* n U))))
(sqrt (/ (* 2.0 (* U (* (* (* l l) U*) (* n n)))) (* Om Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt(((2.0 * U) * (n * t)));
} else if (t_1 <= 5e+299) {
tmp = sqrt((fma(l, ((l / Om) * -2.0), t) * (2.0 * (n * U))));
} else {
tmp = sqrt(((2.0 * (U * (((l * l) * U_42_) * (n * n)))) / (Om * Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * t))); elseif (t_1 <= 5e+299) tmp = sqrt(Float64(fma(l, Float64(Float64(l / Om) * -2.0), t) * Float64(2.0 * Float64(n * U)))); else tmp = sqrt(Float64(Float64(2.0 * Float64(U * Float64(Float64(Float64(l * l) * U_42_) * Float64(n * n)))) / Float64(Om * Om))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 5e+299], N[Sqrt[N[(N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(U * N[(N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision] * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{2 \cdot \left(U \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot U*\right) \cdot \left(n \cdot n\right)\right)\right)}{Om \cdot Om}}\\
\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*)))) < 0.0Initial program 17.2%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.0
Simplified35.0%
if 0.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*)))) < 5.0000000000000003e299Initial program 99.6%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6499.6
Applied egg-rr99.6%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6479.3
Simplified79.3%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
Applied egg-rr37.3%
Applied egg-rr86.8%
if 5.0000000000000003e299 < (*.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 33.0%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6433.2
Applied egg-rr33.2%
Applied egg-rr33.3%
Taylor expanded in U* around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6434.0
Simplified34.0%
Final simplification55.0%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 0.0)
(sqrt (* (* 2.0 U) (* n t)))
(if (<= t_1 5e+299)
(sqrt (* (fma l (* (/ l Om) -2.0) t) (* 2.0 (* n U))))
(sqrt (* 2.0 (* (* U U*) (/ (* (* l l) (* n n)) (* Om Om)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt(((2.0 * U) * (n * t)));
} else if (t_1 <= 5e+299) {
tmp = sqrt((fma(l, ((l / Om) * -2.0), t) * (2.0 * (n * U))));
} else {
tmp = sqrt((2.0 * ((U * U_42_) * (((l * l) * (n * n)) / (Om * Om)))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * t))); elseif (t_1 <= 5e+299) tmp = sqrt(Float64(fma(l, Float64(Float64(l / Om) * -2.0), t) * Float64(2.0 * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(Float64(U * U_42_) * Float64(Float64(Float64(l * l) * Float64(n * n)) / Float64(Om * Om))))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 5e+299], N[Sqrt[N[(N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(U * U$42$), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * N[(n * n), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(U \cdot U*\right) \cdot \frac{\left(\ell \cdot \ell\right) \cdot \left(n \cdot n\right)}{Om \cdot Om}\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*)))) < 0.0Initial program 17.2%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.0
Simplified35.0%
if 0.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*)))) < 5.0000000000000003e299Initial program 99.6%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6499.6
Applied egg-rr99.6%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6479.3
Simplified79.3%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
Applied egg-rr37.3%
Applied egg-rr86.8%
if 5.0000000000000003e299 < (*.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 33.0%
Taylor expanded in U* around inf
lower-*.f64N/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6433.6
Simplified33.6%
Final simplification54.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 0.0)
(sqrt (* (* 2.0 U) (* n t)))
(if (<= t_1 INFINITY)
(sqrt (* (fma l (* (/ l Om) -2.0) t) (* 2.0 (* n U))))
(sqrt (* 2.0 (/ (* (* n l) (* l (* U -2.0))) Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt(((2.0 * U) * (n * t)));
} else if (t_1 <= ((double) INFINITY)) {
tmp = sqrt((fma(l, ((l / Om) * -2.0), t) * (2.0 * (n * U))));
} else {
tmp = sqrt((2.0 * (((n * l) * (l * (U * -2.0))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * t))); elseif (t_1 <= Inf) tmp = sqrt(Float64(fma(l, Float64(Float64(l / Om) * -2.0), t) * Float64(2.0 * Float64(n * U)))); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(n * l) * Float64(l * Float64(U * -2.0))) / Om))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[Sqrt[N[(N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(n * l), $MachinePrecision] * N[(l * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \left(U \cdot -2\right)\right)}{Om}}\\
\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*)))) < 0.0Initial program 17.2%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.0
Simplified35.0%
if 0.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*)))) < +inf.0Initial program 78.0%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6479.7
Applied egg-rr79.7%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6459.0
Simplified59.0%
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-fma.f64N/A
lift-fma.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
Applied egg-rr28.1%
Applied egg-rr62.8%
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%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f640.8
Applied egg-rr0.8%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f647.5
Simplified7.5%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6410.1
Simplified10.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6431.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f6431.9
Applied egg-rr31.9%
Final simplification53.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1 (/ (* l l) Om))
(t_2
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_2 0.0)
(sqrt (* (* 2.0 U) (* n t)))
(if (<= t_2 5e+299)
(sqrt (* 2.0 (* (* n U) (fma t_1 -2.0 t))))
(sqrt (* 2.0 (/ (* l (* (* n l) (* U -2.0))) Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = (l * l) / Om;
double t_2 = ((2.0 * n) * U) * ((t - (2.0 * t_1)) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_2 <= 0.0) {
tmp = sqrt(((2.0 * U) * (n * t)));
} else if (t_2 <= 5e+299) {
tmp = sqrt((2.0 * ((n * U) * fma(t_1, -2.0, t))));
} else {
tmp = sqrt((2.0 * ((l * ((n * l) * (U * -2.0))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(l * l) / Om) t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * t_1)) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_2 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * t))); elseif (t_2 <= 5e+299) tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * fma(t_1, -2.0, t)))); else tmp = sqrt(Float64(2.0 * Float64(Float64(l * Float64(Float64(n * l) * Float64(U * -2.0))) / Om))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 5e+299], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t$95$1 * -2.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(l * N[(N[(n * l), $MachinePrecision] * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\ell \cdot \ell}{Om}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t\_1\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(t\_1, -2, t\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\ell \cdot \left(\left(n \cdot \ell\right) \cdot \left(U \cdot -2\right)\right)}{Om}}\\
\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*)))) < 0.0Initial program 17.2%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.0
Simplified35.0%
if 0.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*)))) < 5.0000000000000003e299Initial program 99.6%
Taylor expanded in n around 0
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6486.8
Simplified86.8%
if 5.0000000000000003e299 < (*.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 33.0%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6435.8
Applied egg-rr35.8%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6424.0
Simplified24.0%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6421.9
Simplified21.9%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6430.9
Applied egg-rr30.9%
Final simplification53.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 0.0)
(sqrt (* (* 2.0 U) (* n t)))
(if (<= t_1 5e+299)
(sqrt (* t (* n (* 2.0 U))))
(sqrt (* 2.0 (* U (/ (* -2.0 (* n (* l l))) Om))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt(((2.0 * U) * (n * t)));
} else if (t_1 <= 5e+299) {
tmp = sqrt((t * (n * (2.0 * U))));
} else {
tmp = sqrt((2.0 * (U * ((-2.0 * (n * (l * l))) / 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) :: t_1
real(8) :: tmp
t_1 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))
if (t_1 <= 0.0d0) then
tmp = sqrt(((2.0d0 * u) * (n * t)))
else if (t_1 <= 5d+299) then
tmp = sqrt((t * (n * (2.0d0 * u))))
else
tmp = sqrt((2.0d0 * (u * (((-2.0d0) * (n * (l * l))) / 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 t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt(((2.0 * U) * (n * t)));
} else if (t_1 <= 5e+299) {
tmp = Math.sqrt((t * (n * (2.0 * U))));
} else {
tmp = Math.sqrt((2.0 * (U * ((-2.0 * (n * (l * l))) / Om))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt(((2.0 * U) * (n * t))) elif t_1 <= 5e+299: tmp = math.sqrt((t * (n * (2.0 * U)))) else: tmp = math.sqrt((2.0 * (U * ((-2.0 * (n * (l * l))) / Om)))) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * t))); elseif (t_1 <= 5e+299) tmp = sqrt(Float64(t * Float64(n * Float64(2.0 * U)))); else tmp = sqrt(Float64(2.0 * Float64(U * Float64(Float64(-2.0 * Float64(n * Float64(l * l))) / Om)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt(((2.0 * U) * (n * t))); elseif (t_1 <= 5e+299) tmp = sqrt((t * (n * (2.0 * U)))); else tmp = sqrt((2.0 * (U * ((-2.0 * (n * (l * l))) / Om)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 5e+299], N[Sqrt[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(N[(-2.0 * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \frac{-2 \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\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*)))) < 0.0Initial program 17.2%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.0
Simplified35.0%
if 0.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*)))) < 5.0000000000000003e299Initial program 99.6%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6467.8
Simplified67.8%
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lower-*.f6475.1
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6475.1
Applied egg-rr75.1%
if 5.0000000000000003e299 < (*.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 33.0%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6435.8
Applied egg-rr35.8%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6424.0
Simplified24.0%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6421.9
Simplified21.9%
Final simplification44.9%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(*
(* (* 2.0 n) U)
(+
(- t (* 2.0 (/ (* l l) Om)))
(* (* n (pow (/ l Om) 2.0)) (- U* U))))))
(if (<= t_1 0.0)
(sqrt (* (* 2.0 U) (* n t)))
(if (<= t_1 5e+299)
(sqrt (* t (* n (* 2.0 U))))
(sqrt (/ (* -4.0 (* U (* n (* l l)))) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = sqrt(((2.0 * U) * (n * t)));
} else if (t_1 <= 5e+299) {
tmp = sqrt((t * (n * (2.0 * U))));
} else {
tmp = sqrt(((-4.0 * (U * (n * (l * l)))) / 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) :: t_1
real(8) :: tmp
t_1 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))
if (t_1 <= 0.0d0) then
tmp = sqrt(((2.0d0 * u) * (n * t)))
else if (t_1 <= 5d+299) then
tmp = sqrt((t * (n * (2.0d0 * u))))
else
tmp = sqrt((((-4.0d0) * (u * (n * (l * l)))) / 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 t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)));
double tmp;
if (t_1 <= 0.0) {
tmp = Math.sqrt(((2.0 * U) * (n * t)));
} else if (t_1 <= 5e+299) {
tmp = Math.sqrt((t * (n * (2.0 * U))));
} else {
tmp = Math.sqrt(((-4.0 * (U * (n * (l * l)))) / Om));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U))) tmp = 0 if t_1 <= 0.0: tmp = math.sqrt(((2.0 * U) * (n * t))) elif t_1 <= 5e+299: tmp = math.sqrt((t * (n * (2.0 * U)))) else: tmp = math.sqrt(((-4.0 * (U * (n * (l * l)))) / Om)) return tmp
function code(n, U, t, l, Om, U_42_) t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) tmp = 0.0 if (t_1 <= 0.0) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * t))); elseif (t_1 <= 5e+299) tmp = sqrt(Float64(t * Float64(n * Float64(2.0 * U)))); else tmp = sqrt(Float64(Float64(-4.0 * Float64(U * Float64(n * Float64(l * l)))) / Om)); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U))); tmp = 0.0; if (t_1 <= 0.0) tmp = sqrt(((2.0 * U) * (n * t))); elseif (t_1 <= 5e+299) tmp = sqrt((t * (n * (2.0 * U)))); else tmp = sqrt(((-4.0 * (U * (n * (l * l)))) / Om)); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 5e+299], N[Sqrt[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-4.0 * N[(U * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-4 \cdot \left(U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)\right)}{Om}}\\
\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*)))) < 0.0Initial program 17.2%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.0
Simplified35.0%
if 0.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*)))) < 5.0000000000000003e299Initial program 99.6%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6467.8
Simplified67.8%
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lower-*.f6475.1
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6475.1
Applied egg-rr75.1%
if 5.0000000000000003e299 < (*.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 33.0%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6435.8
Applied egg-rr35.8%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6424.0
Simplified24.0%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6421.9
Simplified21.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift-sqrt.f6421.9
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
Applied egg-rr21.9%
Final simplification44.9%
(FPCore (n U t l Om U*)
:precision binary64
(if (<=
(*
(* (* 2.0 n) U)
(+ (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U* U))))
0.0)
(sqrt (* (* 2.0 U) (* n t)))
(sqrt (* t (* n (* 2.0 U))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))) <= 0.0) {
tmp = sqrt(((2.0 * U) * (n * t)));
} else {
tmp = sqrt((t * (n * (2.0 * 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 ((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))) <= 0.0d0) then
tmp = sqrt(((2.0d0 * u) * (n * t)))
else
tmp = sqrt((t * (n * (2.0d0 * 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 ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))) <= 0.0) {
tmp = Math.sqrt(((2.0 * U) * (n * t)));
} else {
tmp = Math.sqrt((t * (n * (2.0 * U))));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if (((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U)))) <= 0.0: tmp = math.sqrt(((2.0 * U) * (n * t))) else: tmp = math.sqrt((t * (n * (2.0 * U)))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U)))) <= 0.0) tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * t))); else tmp = sqrt(Float64(t * Float64(n * Float64(2.0 * U)))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U)))) <= 0.0) tmp = sqrt(((2.0 * U) * (n * t))); else tmp = sqrt((t * (n * (2.0 * U)))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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) \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \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*)))) < 0.0Initial program 17.2%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6435.0
Simplified35.0%
if 0.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 64.0%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6438.2
Simplified38.2%
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lower-*.f6441.6
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6441.7
Applied egg-rr41.7%
Final simplification40.6%
(FPCore (n U t l Om U*)
:precision binary64
(if (<= l 4.9e+64)
(sqrt
(*
(* n (+ t (/ (+ (* (* l l) -2.0) (* n (* l (/ (* l (- U* U)) Om)))) Om)))
(* 2.0 U)))
(sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* l (* U (* n l))) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 4.9e+64) {
tmp = sqrt(((n * (t + ((((l * l) * -2.0) + (n * (l * ((l * (U_42_ - U)) / Om)))) / Om))) * (2.0 * U)));
} else {
tmp = sqrt(fma(2.0, (U * (n * t)), (-4.0 * ((l * (U * (n * l))) / Om))));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 4.9e+64) tmp = sqrt(Float64(Float64(n * Float64(t + Float64(Float64(Float64(Float64(l * l) * -2.0) + Float64(n * Float64(l * Float64(Float64(l * Float64(U_42_ - U)) / Om)))) / Om))) * Float64(2.0 * U))); else tmp = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(l * Float64(U * Float64(n * l))) / Om)))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.9e+64], N[Sqrt[N[(N[(n * N[(t + N[(N[(N[(N[(l * l), $MachinePrecision] * -2.0), $MachinePrecision] + N[(n * N[(l * N[(N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(l * N[(U * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.9 \cdot 10^{+64}:\\
\;\;\;\;\sqrt{\left(n \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 + n \cdot \left(\ell \cdot \frac{\ell \cdot \left(U* - U\right)}{Om}\right)}{Om}\right)\right) \cdot \left(2 \cdot U\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\
\end{array}
\end{array}
if l < 4.9000000000000003e64Initial program 63.1%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6464.6
Applied egg-rr64.6%
Applied egg-rr54.7%
associate-/l*N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f6462.2
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6462.1
Applied egg-rr62.1%
if 4.9000000000000003e64 < l Initial program 31.3%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6436.1
Simplified36.1%
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.4
Applied egg-rr49.4%
Final simplification59.6%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(* 2.0 U)
(* n (- t (/ (* (* l l) (fma n (/ (- U U*) Om) 2.0)) Om)))))))
(if (<= n -6e-73)
t_1
(if (<= n 4e-107)
(sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* l (* U (* n l))) Om))))
t_1))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt(((2.0 * U) * (n * (t - (((l * l) * fma(n, ((U - U_42_) / Om), 2.0)) / Om)))));
double tmp;
if (n <= -6e-73) {
tmp = t_1;
} else if (n <= 4e-107) {
tmp = sqrt(fma(2.0, (U * (n * t)), (-4.0 * ((l * (U * (n * l))) / Om))));
} else {
tmp = t_1;
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t - Float64(Float64(Float64(l * l) * fma(n, Float64(Float64(U - U_42_) / Om), 2.0)) / Om))))) tmp = 0.0 if (n <= -6e-73) tmp = t_1; elseif (n <= 4e-107) tmp = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(l * Float64(U * Float64(n * l))) / Om)))); else tmp = t_1; end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t - N[(N[(N[(l * l), $MachinePrecision] * N[(n * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -6e-73], t$95$1, If[LessEqual[n, 4e-107], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(l * N[(U * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t - \frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right)}{Om}\right)\right)}\\
\mathbf{if}\;n \leq -6 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;n \leq 4 \cdot 10^{-107}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if n < -6e-73 or 4e-107 < n Initial program 60.4%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6461.7
Applied egg-rr61.7%
Applied egg-rr48.1%
Taylor expanded in l around 0
distribute-lft-inN/A
*-commutativeN/A
associate-/l*N/A
mul-1-negN/A
distribute-neg-frac2N/A
lower-/.f64N/A
Simplified57.5%
if -6e-73 < n < 4e-107Initial program 51.6%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.1
Simplified55.1%
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6464.4
Applied egg-rr64.4%
Final simplification60.2%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(sqrt (* (* 2.0 U) (* n (+ t (/ (* U* (* n (* l l))) (* Om Om))))))))
(if (<= n -1.9e+104)
t_1
(if (<= n 5.8e+46)
(sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* l (* U (* n l))) Om))))
t_1))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt(((2.0 * U) * (n * (t + ((U_42_ * (n * (l * l))) / (Om * Om))))));
double tmp;
if (n <= -1.9e+104) {
tmp = t_1;
} else if (n <= 5.8e+46) {
tmp = sqrt(fma(2.0, (U * (n * t)), (-4.0 * ((l * (U * (n * l))) / Om))));
} else {
tmp = t_1;
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(Float64(U_42_ * Float64(n * Float64(l * l))) / Float64(Om * Om)))))) tmp = 0.0 if (n <= -1.9e+104) tmp = t_1; elseif (n <= 5.8e+46) tmp = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(l * Float64(U * Float64(n * l))) / Om)))); else tmp = t_1; end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(N[(U$42$ * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -1.9e+104], t$95$1, If[LessEqual[n, 5.8e+46], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(l * N[(U * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \frac{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om \cdot Om}\right)\right)}\\
\mathbf{if}\;n \leq -1.9 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;n \leq 5.8 \cdot 10^{+46}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if n < -1.89999999999999984e104 or 5.8000000000000004e46 < n Initial program 63.7%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6465.9
Applied egg-rr65.9%
Applied egg-rr48.8%
Taylor expanded in U* around inf
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6460.4
Simplified60.4%
if -1.89999999999999984e104 < n < 5.8000000000000004e46Initial program 53.2%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6449.9
Simplified49.9%
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.0
Applied egg-rr58.0%
Final simplification58.8%
(FPCore (n U t l Om U*)
:precision binary64
(let* ((t_1
(sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* l (* U (* n l))) Om))))))
(if (<= Om -4.8e-221)
t_1
(if (<= Om 3.05e-189)
(sqrt (/ (* 2.0 (* U (* (* (* l l) U*) (* n n)))) (* Om Om)))
t_1))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double t_1 = sqrt(fma(2.0, (U * (n * t)), (-4.0 * ((l * (U * (n * l))) / Om))));
double tmp;
if (Om <= -4.8e-221) {
tmp = t_1;
} else if (Om <= 3.05e-189) {
tmp = sqrt(((2.0 * (U * (((l * l) * U_42_) * (n * n)))) / (Om * Om)));
} else {
tmp = t_1;
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) t_1 = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(l * Float64(U * Float64(n * l))) / Om)))) tmp = 0.0 if (Om <= -4.8e-221) tmp = t_1; elseif (Om <= 3.05e-189) tmp = sqrt(Float64(Float64(2.0 * Float64(U * Float64(Float64(Float64(l * l) * U_42_) * Float64(n * n)))) / Float64(Om * Om))); else tmp = t_1; end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(l * N[(U * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -4.8e-221], t$95$1, If[LessEqual[Om, 3.05e-189], N[Sqrt[N[(N[(2.0 * N[(U * N[(N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision] * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\
\mathbf{if}\;Om \leq -4.8 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;Om \leq 3.05 \cdot 10^{-189}:\\
\;\;\;\;\sqrt{\frac{2 \cdot \left(U \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot U*\right) \cdot \left(n \cdot n\right)\right)\right)}{Om \cdot Om}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if Om < -4.80000000000000047e-221 or 3.05e-189 < Om Initial program 56.1%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6450.8
Simplified50.8%
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6456.4
Applied egg-rr56.4%
if -4.80000000000000047e-221 < Om < 3.05e-189Initial program 62.3%
lift-/.f64N/A
lift-pow.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6462.4
Applied egg-rr62.4%
Applied egg-rr56.4%
Taylor expanded in U* around inf
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6450.5
Simplified50.5%
Final simplification55.6%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 7.7e+124) (sqrt (* U (fma 2.0 (* n t) (/ (* -4.0 (* n (* l l))) Om)))) (sqrt (* 2.0 (/ (* l (* (* n l) (* U -2.0))) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 7.7e+124) {
tmp = sqrt((U * fma(2.0, (n * t), ((-4.0 * (n * (l * l))) / Om))));
} else {
tmp = sqrt((2.0 * ((l * ((n * l) * (U * -2.0))) / Om)));
}
return tmp;
}
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 7.7e+124) tmp = sqrt(Float64(U * fma(2.0, Float64(n * t), Float64(Float64(-4.0 * Float64(n * Float64(l * l))) / Om)))); else tmp = sqrt(Float64(2.0 * Float64(Float64(l * Float64(Float64(n * l) * Float64(U * -2.0))) / Om))); end return tmp end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 7.7e+124], N[Sqrt[N[(U * N[(2.0 * N[(n * t), $MachinePrecision] + N[(N[(-4.0 * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(l * N[(N[(n * l), $MachinePrecision] * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7.7 \cdot 10^{+124}:\\
\;\;\;\;\sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \frac{-4 \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\ell \cdot \left(\left(n \cdot \ell\right) \cdot \left(U \cdot -2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 7.6999999999999999e124Initial program 62.7%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6451.9
Simplified51.9%
Taylor expanded in U around 0
lower-sqrt.f64N/A
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6452.0
Simplified52.0%
if 7.6999999999999999e124 < l Initial program 19.2%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6425.4
Applied egg-rr25.4%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6420.3
Simplified20.3%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6414.7
Simplified14.7%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6435.1
Applied egg-rr35.1%
Final simplification49.8%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.5e+70) (sqrt (* t (* n (* 2.0 U)))) (sqrt (* 2.0 (/ (* l (* (* n l) (* U -2.0))) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e+70) {
tmp = sqrt((t * (n * (2.0 * U))));
} else {
tmp = sqrt((2.0 * ((l * ((n * l) * (U * -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 <= 1.5d+70) then
tmp = sqrt((t * (n * (2.0d0 * u))))
else
tmp = sqrt((2.0d0 * ((l * ((n * l) * (u * (-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 <= 1.5e+70) {
tmp = Math.sqrt((t * (n * (2.0 * U))));
} else {
tmp = Math.sqrt((2.0 * ((l * ((n * l) * (U * -2.0))) / Om)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e+70: tmp = math.sqrt((t * (n * (2.0 * U)))) else: tmp = math.sqrt((2.0 * ((l * ((n * l) * (U * -2.0))) / Om))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e+70) tmp = sqrt(Float64(t * Float64(n * Float64(2.0 * U)))); else tmp = sqrt(Float64(2.0 * Float64(Float64(l * Float64(Float64(n * l) * Float64(U * -2.0))) / Om))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.5e+70) tmp = sqrt((t * (n * (2.0 * U)))); else tmp = sqrt((2.0 * ((l * ((n * l) * (U * -2.0))) / Om))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e+70], N[Sqrt[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(l * N[(N[(n * l), $MachinePrecision] * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{+70}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\ell \cdot \left(\left(n \cdot \ell\right) \cdot \left(U \cdot -2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.49999999999999988e70Initial program 63.3%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6443.2
Simplified43.2%
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lower-*.f6443.5
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6443.5
Applied egg-rr43.5%
if 1.49999999999999988e70 < l Initial program 29.9%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6434.2
Applied egg-rr34.2%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6435.6
Simplified35.6%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6426.9
Simplified26.9%
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6439.1
Applied egg-rr39.1%
Final simplification42.7%
(FPCore (n U t l Om U*) :precision binary64 (if (<= l 1.5e+70) (sqrt (* t (* n (* 2.0 U)))) (sqrt (* 2.0 (/ (* (* n l) (* l (* U -2.0))) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
double tmp;
if (l <= 1.5e+70) {
tmp = sqrt((t * (n * (2.0 * U))));
} else {
tmp = sqrt((2.0 * (((n * l) * (l * (U * -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 <= 1.5d+70) then
tmp = sqrt((t * (n * (2.0d0 * u))))
else
tmp = sqrt((2.0d0 * (((n * l) * (l * (u * (-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 <= 1.5e+70) {
tmp = Math.sqrt((t * (n * (2.0 * U))));
} else {
tmp = Math.sqrt((2.0 * (((n * l) * (l * (U * -2.0))) / Om)));
}
return tmp;
}
def code(n, U, t, l, Om, U_42_): tmp = 0 if l <= 1.5e+70: tmp = math.sqrt((t * (n * (2.0 * U)))) else: tmp = math.sqrt((2.0 * (((n * l) * (l * (U * -2.0))) / Om))) return tmp
function code(n, U, t, l, Om, U_42_) tmp = 0.0 if (l <= 1.5e+70) tmp = sqrt(Float64(t * Float64(n * Float64(2.0 * U)))); else tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(n * l) * Float64(l * Float64(U * -2.0))) / Om))); end return tmp end
function tmp_2 = code(n, U, t, l, Om, U_42_) tmp = 0.0; if (l <= 1.5e+70) tmp = sqrt((t * (n * (2.0 * U)))); else tmp = sqrt((2.0 * (((n * l) * (l * (U * -2.0))) / Om))); end tmp_2 = tmp; end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e+70], N[Sqrt[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(n * l), $MachinePrecision] * N[(l * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{+70}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \left(U \cdot -2\right)\right)}{Om}}\\
\end{array}
\end{array}
if l < 1.49999999999999988e70Initial program 63.3%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6443.2
Simplified43.2%
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lower-*.f6443.5
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6443.5
Applied egg-rr43.5%
if 1.49999999999999988e70 < l Initial program 29.9%
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6434.2
Applied egg-rr34.2%
Taylor expanded in n around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
sub-negN/A
lower-+.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6435.6
Simplified35.6%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6426.9
Simplified26.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6439.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied egg-rr39.1%
Final simplification42.7%
(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(Float64(2.0 * 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[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}
\end{array}
Initial program 56.9%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6437.7
Simplified37.7%
herbie shell --seed 2024219
(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*))))))