
(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}
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0)))
(t_2 (/ (* l_m l_m) Om))
(t_3
(sqrt
(*
(- (- t (* t_2 2.0)) (* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
t_1))))
(if (<= t_3 2e-158)
(*
(sqrt U)
(sqrt
(*
(fma (/ l_m Om) (fma (* (- U* U) n) (/ l_m Om) (* -2.0 l_m)) t)
(* n 2.0))))
(if (<= t_3 5e+147)
(sqrt
(*
(fma (* (* (/ l_m Om) n) (- U* U)) (/ l_m Om) (fma -2.0 t_2 t))
t_1))
(*
(* (sqrt 2.0) l_m)
(sqrt (* (* U n) (- (* (/ n Om) (/ U* Om)) (/ 2.0 Om)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double t_2 = (l_m * l_m) / Om;
double t_3 = sqrt((((t - (t_2 * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * t_1));
double tmp;
if (t_3 <= 2e-158) {
tmp = sqrt(U) * sqrt((fma((l_m / Om), fma(((U_42_ - U) * n), (l_m / Om), (-2.0 * l_m)), t) * (n * 2.0)));
} else if (t_3 <= 5e+147) {
tmp = sqrt((fma((((l_m / Om) * n) * (U_42_ - U)), (l_m / Om), fma(-2.0, t_2, t)) * t_1));
} else {
tmp = (sqrt(2.0) * l_m) * sqrt(((U * n) * (((n / Om) * (U_42_ / Om)) - (2.0 / Om))));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) t_2 = Float64(Float64(l_m * l_m) / Om) t_3 = sqrt(Float64(Float64(Float64(t - Float64(t_2 * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * t_1)) tmp = 0.0 if (t_3 <= 2e-158) tmp = Float64(sqrt(U) * sqrt(Float64(fma(Float64(l_m / Om), fma(Float64(Float64(U_42_ - U) * n), Float64(l_m / Om), Float64(-2.0 * l_m)), t) * Float64(n * 2.0)))); elseif (t_3 <= 5e+147) tmp = sqrt(Float64(fma(Float64(Float64(Float64(l_m / Om) * n) * Float64(U_42_ - U)), Float64(l_m / Om), fma(-2.0, t_2, t)) * t_1)); else tmp = Float64(Float64(sqrt(2.0) * l_m) * sqrt(Float64(Float64(U * n) * Float64(Float64(Float64(n / Om) * Float64(U_42_ / Om)) - Float64(2.0 / Om))))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(N[(t - N[(t$95$2 * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-158], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(N[(U$42$ - U), $MachinePrecision] * n), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+147], N[Sqrt[N[(N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * n), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + N[(-2.0 * t$95$2 + t), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * l$95$m), $MachinePrecision] * N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
t_2 := \frac{l\_m \cdot l\_m}{Om}\\
t_3 := \sqrt{\left(\left(t - t\_2 \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot t\_1}\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-158}:\\
\;\;\;\;\sqrt{U} \cdot \sqrt{\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(\left(U* - U\right) \cdot n, \frac{l\_m}{Om}, -2 \cdot l\_m\right), t\right) \cdot \left(n \cdot 2\right)}\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\left(\frac{l\_m}{Om} \cdot n\right) \cdot \left(U* - U\right), \frac{l\_m}{Om}, \mathsf{fma}\left(-2, t\_2, t\right)\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{2} \cdot l\_m\right) \cdot \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} - \frac{2}{Om}\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 2.00000000000000013e-158Initial program 9.9%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f649.9
lift--.f64N/A
sub-negN/A
Applied rewrites9.9%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f649.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f649.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f649.9
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f649.9
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f649.9
Applied rewrites9.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites36.3%
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-*.f64N/A
Applied rewrites42.3%
if 2.00000000000000013e-158 < (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*))))) < 5.0000000000000002e147Initial program 98.4%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6499.1
lift--.f64N/A
sub-negN/A
Applied rewrites99.1%
if 5.0000000000000002e147 < (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 15.8%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6419.3
lift--.f64N/A
sub-negN/A
Applied rewrites19.3%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6419.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6419.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6419.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6419.3
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6428.2
Applied rewrites28.2%
Taylor expanded in l around inf
lower-*.f64N/A
Applied rewrites28.0%
Taylor expanded in U around 0
Applied rewrites29.1%
Final simplification57.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0)))
(t_2
(sqrt
(*
(-
(- t (* (/ (* l_m l_m) Om) 2.0))
(* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
t_1))))
(if (<= t_2 2e-158)
(*
(sqrt U)
(sqrt
(*
(fma (/ l_m Om) (fma (* (- U* U) n) (/ l_m Om) (* -2.0 l_m)) t)
(* n 2.0))))
(if (<= t_2 5e+147)
(sqrt
(*
(fma (/ l_m Om) (fma (* (/ l_m (- Om)) n) (- U U*) (* -2.0 l_m)) t)
t_1))
(*
(* (sqrt 2.0) l_m)
(sqrt (* (* U n) (- (* (/ n Om) (/ U* Om)) (/ 2.0 Om)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double t_2 = sqrt((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * t_1));
double tmp;
if (t_2 <= 2e-158) {
tmp = sqrt(U) * sqrt((fma((l_m / Om), fma(((U_42_ - U) * n), (l_m / Om), (-2.0 * l_m)), t) * (n * 2.0)));
} else if (t_2 <= 5e+147) {
tmp = sqrt((fma((l_m / Om), fma(((l_m / -Om) * n), (U - U_42_), (-2.0 * l_m)), t) * t_1));
} else {
tmp = (sqrt(2.0) * l_m) * sqrt(((U * n) * (((n / Om) * (U_42_ / Om)) - (2.0 / Om))));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) t_2 = sqrt(Float64(Float64(Float64(t - Float64(Float64(Float64(l_m * l_m) / Om) * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * t_1)) tmp = 0.0 if (t_2 <= 2e-158) tmp = Float64(sqrt(U) * sqrt(Float64(fma(Float64(l_m / Om), fma(Float64(Float64(U_42_ - U) * n), Float64(l_m / Om), Float64(-2.0 * l_m)), t) * Float64(n * 2.0)))); elseif (t_2 <= 5e+147) tmp = sqrt(Float64(fma(Float64(l_m / Om), fma(Float64(Float64(l_m / Float64(-Om)) * n), Float64(U - U_42_), Float64(-2.0 * l_m)), t) * t_1)); else tmp = Float64(Float64(sqrt(2.0) * l_m) * sqrt(Float64(Float64(U * n) * Float64(Float64(Float64(n / Om) * Float64(U_42_ / Om)) - Float64(2.0 / Om))))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 2e-158], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(N[(U$42$ - U), $MachinePrecision] * n), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+147], N[Sqrt[N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(N[(l$95$m / (-Om)), $MachinePrecision] * n), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * l$95$m), $MachinePrecision] * N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
t_2 := \sqrt{\left(\left(t - \frac{l\_m \cdot l\_m}{Om} \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot t\_1}\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-158}:\\
\;\;\;\;\sqrt{U} \cdot \sqrt{\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(\left(U* - U\right) \cdot n, \frac{l\_m}{Om}, -2 \cdot l\_m\right), t\right) \cdot \left(n \cdot 2\right)}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(\frac{l\_m}{-Om} \cdot n, U - U*, -2 \cdot l\_m\right), t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{2} \cdot l\_m\right) \cdot \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} - \frac{2}{Om}\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 2.00000000000000013e-158Initial program 9.9%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f649.9
lift--.f64N/A
sub-negN/A
Applied rewrites9.9%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f649.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f649.9
lift-*.f64N/A
*-commutativeN/A
lower-*.f649.9
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f649.9
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f649.9
Applied rewrites9.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites36.3%
lift-sqrt.f64N/A
pow1/2N/A
lift-*.f64N/A
unpow-prod-downN/A
lower-*.f64N/A
Applied rewrites42.3%
if 2.00000000000000013e-158 < (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*))))) < 5.0000000000000002e147Initial program 98.4%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6499.1
lift--.f64N/A
sub-negN/A
Applied rewrites99.1%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6499.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.1
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6499.1
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6499.1
Applied rewrites99.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.1
Applied rewrites99.1%
if 5.0000000000000002e147 < (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 15.8%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6419.3
lift--.f64N/A
sub-negN/A
Applied rewrites19.3%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6419.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6419.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6419.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6419.3
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6428.2
Applied rewrites28.2%
Taylor expanded in l around inf
lower-*.f64N/A
Applied rewrites28.0%
Taylor expanded in U around 0
Applied rewrites29.1%
Final simplification57.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0)))
(t_2
(sqrt
(*
(-
(- t (* (/ (* l_m l_m) Om) 2.0))
(* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
t_1))))
(if (<= t_2 2e-158)
(* (sqrt (* U 2.0)) (sqrt (* (fma (* (/ l_m Om) l_m) -2.0 t) n)))
(if (<= t_2 5e+147)
(sqrt
(*
(fma (/ l_m Om) (fma (* (/ l_m (- Om)) n) (- U U*) (* -2.0 l_m)) t)
t_1))
(*
(* (sqrt 2.0) l_m)
(sqrt (* (* U n) (- (* (/ n Om) (/ U* Om)) (/ 2.0 Om)))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double t_2 = sqrt((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * t_1));
double tmp;
if (t_2 <= 2e-158) {
tmp = sqrt((U * 2.0)) * sqrt((fma(((l_m / Om) * l_m), -2.0, t) * n));
} else if (t_2 <= 5e+147) {
tmp = sqrt((fma((l_m / Om), fma(((l_m / -Om) * n), (U - U_42_), (-2.0 * l_m)), t) * t_1));
} else {
tmp = (sqrt(2.0) * l_m) * sqrt(((U * n) * (((n / Om) * (U_42_ / Om)) - (2.0 / Om))));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) t_2 = sqrt(Float64(Float64(Float64(t - Float64(Float64(Float64(l_m * l_m) / Om) * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * t_1)) tmp = 0.0 if (t_2 <= 2e-158) tmp = Float64(sqrt(Float64(U * 2.0)) * sqrt(Float64(fma(Float64(Float64(l_m / Om) * l_m), -2.0, t) * n))); elseif (t_2 <= 5e+147) tmp = sqrt(Float64(fma(Float64(l_m / Om), fma(Float64(Float64(l_m / Float64(-Om)) * n), Float64(U - U_42_), Float64(-2.0 * l_m)), t) * t_1)); else tmp = Float64(Float64(sqrt(2.0) * l_m) * sqrt(Float64(Float64(U * n) * Float64(Float64(Float64(n / Om) * Float64(U_42_ / Om)) - Float64(2.0 / Om))))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 2e-158], N[(N[Sqrt[N[(U * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * l$95$m), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+147], N[Sqrt[N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(N[(l$95$m / (-Om)), $MachinePrecision] * n), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * l$95$m), $MachinePrecision] * N[Sqrt[N[(N[(U * n), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
t_2 := \sqrt{\left(\left(t - \frac{l\_m \cdot l\_m}{Om} \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot t\_1}\\
\mathbf{if}\;t\_2 \leq 2 \cdot 10^{-158}:\\
\;\;\;\;\sqrt{U \cdot 2} \cdot \sqrt{\mathsf{fma}\left(\frac{l\_m}{Om} \cdot l\_m, -2, t\right) \cdot n}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(\frac{l\_m}{-Om} \cdot n, U - U*, -2 \cdot l\_m\right), t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{2} \cdot l\_m\right) \cdot \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} - \frac{2}{Om}\right)}\\
\end{array}
\end{array}
if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 2.00000000000000013e-158Initial program 9.9%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6436.3
Applied rewrites36.3%
Applied rewrites42.1%
if 2.00000000000000013e-158 < (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*))))) < 5.0000000000000002e147Initial program 98.4%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6499.1
lift--.f64N/A
sub-negN/A
Applied rewrites99.1%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6499.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.1
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.1
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6499.1
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6499.1
Applied rewrites99.1%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.1
Applied rewrites99.1%
if 5.0000000000000002e147 < (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 15.8%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6419.3
lift--.f64N/A
sub-negN/A
Applied rewrites19.3%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6419.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6419.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6419.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6419.3
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6428.2
Applied rewrites28.2%
Taylor expanded in l around inf
lower-*.f64N/A
Applied rewrites28.0%
Taylor expanded in U around 0
Applied rewrites29.1%
Final simplification57.5%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0)))
(t_2
(*
(-
(- t (* (/ (* l_m l_m) Om) 2.0))
(* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
t_1)))
(if (<= t_2 4e-316)
(* (sqrt (* U 2.0)) (sqrt (* (fma (* (/ l_m Om) l_m) -2.0 t) n)))
(if (<= t_2 INFINITY)
(sqrt
(*
(fma (/ l_m Om) (fma (* (/ l_m (- Om)) n) (- U U*) (* -2.0 l_m)) t)
t_1))
(sqrt
(*
(/
(* (* (fma -2.0 l_m (/ (* (* (- U* U) n) l_m) Om)) n) (* l_m U))
Om)
2.0))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double t_2 = ((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * t_1;
double tmp;
if (t_2 <= 4e-316) {
tmp = sqrt((U * 2.0)) * sqrt((fma(((l_m / Om) * l_m), -2.0, t) * n));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((fma((l_m / Om), fma(((l_m / -Om) * n), (U - U_42_), (-2.0 * l_m)), t) * t_1));
} else {
tmp = sqrt(((((fma(-2.0, l_m, ((((U_42_ - U) * n) * l_m) / Om)) * n) * (l_m * U)) / Om) * 2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) t_2 = Float64(Float64(Float64(t - Float64(Float64(Float64(l_m * l_m) / Om) * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * t_1) tmp = 0.0 if (t_2 <= 4e-316) tmp = Float64(sqrt(Float64(U * 2.0)) * sqrt(Float64(fma(Float64(Float64(l_m / Om) * l_m), -2.0, t) * n))); elseif (t_2 <= Inf) tmp = sqrt(Float64(fma(Float64(l_m / Om), fma(Float64(Float64(l_m / Float64(-Om)) * n), Float64(U - U_42_), Float64(-2.0 * l_m)), t) * t_1)); else tmp = sqrt(Float64(Float64(Float64(Float64(fma(-2.0, l_m, Float64(Float64(Float64(Float64(U_42_ - U) * n) * l_m) / Om)) * n) * Float64(l_m * U)) / Om) * 2.0)); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, 4e-316], N[(N[Sqrt[N[(U * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * l$95$m), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(N[(l$95$m / (-Om)), $MachinePrecision] * n), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(-2.0 * l$95$m + N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * n), $MachinePrecision] * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] * N[(l$95$m * U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
t_2 := \left(\left(t - \frac{l\_m \cdot l\_m}{Om} \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot t\_1\\
\mathbf{if}\;t\_2 \leq 4 \cdot 10^{-316}:\\
\;\;\;\;\sqrt{U \cdot 2} \cdot \sqrt{\mathsf{fma}\left(\frac{l\_m}{Om} \cdot l\_m, -2, t\right) \cdot n}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(\frac{l\_m}{-Om} \cdot n, U - U*, -2 \cdot l\_m\right), t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(\mathsf{fma}\left(-2, l\_m, \frac{\left(\left(U* - U\right) \cdot n\right) \cdot l\_m}{Om}\right) \cdot n\right) \cdot \left(l\_m \cdot U\right)}{Om} \cdot 2}\\
\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*)))) < 3.999999984e-316Initial program 9.1%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6438.5
Applied rewrites38.5%
Applied rewrites44.0%
if 3.999999984e-316 < (*.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 64.6%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6466.0
lift--.f64N/A
sub-negN/A
Applied rewrites66.0%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6466.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6466.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f6466.0
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6466.0
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6472.0
Applied rewrites72.0%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6472.0
Applied rewrites72.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%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f641.0
lift--.f64N/A
sub-negN/A
Applied rewrites1.0%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f641.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.0
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f641.0
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f641.8
Applied rewrites1.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites43.2%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites53.9%
Final simplification64.9%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0)))
(t_2
(*
(-
(- t (* (/ (* l_m l_m) Om) 2.0))
(* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
t_1))
(t_3 (* (- U* U) n)))
(if (<= t_2 5e+150)
(sqrt
(*
(*
(fma (/ l_m Om) (fma (* (/ l_m (- Om)) n) (- U U*) (* -2.0 l_m)) t)
(* n 2.0))
U))
(if (<= t_2 INFINITY)
(sqrt (* (fma (/ l_m Om) (fma t_3 (/ l_m Om) (* -2.0 l_m)) t) t_1))
(sqrt
(*
(/ (* (* (fma -2.0 l_m (/ (* t_3 l_m) Om)) n) (* l_m U)) Om)
2.0))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double t_2 = ((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * t_1;
double t_3 = (U_42_ - U) * n;
double tmp;
if (t_2 <= 5e+150) {
tmp = sqrt(((fma((l_m / Om), fma(((l_m / -Om) * n), (U - U_42_), (-2.0 * l_m)), t) * (n * 2.0)) * U));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((fma((l_m / Om), fma(t_3, (l_m / Om), (-2.0 * l_m)), t) * t_1));
} else {
tmp = sqrt(((((fma(-2.0, l_m, ((t_3 * l_m) / Om)) * n) * (l_m * U)) / Om) * 2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) t_2 = Float64(Float64(Float64(t - Float64(Float64(Float64(l_m * l_m) / Om) * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * t_1) t_3 = Float64(Float64(U_42_ - U) * n) tmp = 0.0 if (t_2 <= 5e+150) tmp = sqrt(Float64(Float64(fma(Float64(l_m / Om), fma(Float64(Float64(l_m / Float64(-Om)) * n), Float64(U - U_42_), Float64(-2.0 * l_m)), t) * Float64(n * 2.0)) * U)); elseif (t_2 <= Inf) tmp = sqrt(Float64(fma(Float64(l_m / Om), fma(t_3, Float64(l_m / Om), Float64(-2.0 * l_m)), t) * t_1)); else tmp = sqrt(Float64(Float64(Float64(Float64(fma(-2.0, l_m, Float64(Float64(t_3 * l_m) / Om)) * n) * Float64(l_m * U)) / Om) * 2.0)); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(U$42$ - U), $MachinePrecision] * n), $MachinePrecision]}, If[LessEqual[t$95$2, 5e+150], N[Sqrt[N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(N[(l$95$m / (-Om)), $MachinePrecision] * n), $MachinePrecision] * N[(U - U$42$), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(t$95$3 * N[(l$95$m / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(-2.0 * l$95$m + N[(N[(t$95$3 * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] * N[(l$95$m * U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
t_2 := \left(\left(t - \frac{l\_m \cdot l\_m}{Om} \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot t\_1\\
t_3 := \left(U* - U\right) \cdot n\\
\mathbf{if}\;t\_2 \leq 5 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(\frac{l\_m}{-Om} \cdot n, U - U*, -2 \cdot l\_m\right), t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(t\_3, \frac{l\_m}{Om}, -2 \cdot l\_m\right), t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(\mathsf{fma}\left(-2, l\_m, \frac{t\_3 \cdot l\_m}{Om}\right) \cdot n\right) \cdot \left(l\_m \cdot U\right)}{Om} \cdot 2}\\
\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*)))) < 5.00000000000000009e150Initial program 66.8%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6469.2
lift--.f64N/A
sub-negN/A
Applied rewrites69.2%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6469.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.2
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6469.2
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6469.2
Applied rewrites69.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites73.9%
if 5.00000000000000009e150 < (*.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 41.9%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6443.7
lift--.f64N/A
sub-negN/A
Applied rewrites43.7%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6443.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.7
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6443.7
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6453.7
Applied rewrites53.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites44.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-*.f6453.7
Applied rewrites50.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%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f641.0
lift--.f64N/A
sub-negN/A
Applied rewrites1.0%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f641.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.0
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f641.0
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f641.8
Applied rewrites1.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites43.2%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites53.9%
Final simplification61.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0)))
(t_2
(*
(-
(- t (* (/ (* l_m l_m) Om) 2.0))
(* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
t_1))
(t_3 (* (- U* U) n)))
(if (<= t_2 5e+150)
(sqrt
(*
(* (fma l_m (/ (fma U* (/ (* l_m n) Om) (* -2.0 l_m)) Om) t) (* n 2.0))
U))
(if (<= t_2 INFINITY)
(sqrt (* (fma (/ l_m Om) (fma t_3 (/ l_m Om) (* -2.0 l_m)) t) t_1))
(sqrt
(*
(/ (* (* (fma -2.0 l_m (/ (* t_3 l_m) Om)) n) (* l_m U)) Om)
2.0))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double t_2 = ((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * t_1;
double t_3 = (U_42_ - U) * n;
double tmp;
if (t_2 <= 5e+150) {
tmp = sqrt(((fma(l_m, (fma(U_42_, ((l_m * n) / Om), (-2.0 * l_m)) / Om), t) * (n * 2.0)) * U));
} else if (t_2 <= ((double) INFINITY)) {
tmp = sqrt((fma((l_m / Om), fma(t_3, (l_m / Om), (-2.0 * l_m)), t) * t_1));
} else {
tmp = sqrt(((((fma(-2.0, l_m, ((t_3 * l_m) / Om)) * n) * (l_m * U)) / Om) * 2.0));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) t_2 = Float64(Float64(Float64(t - Float64(Float64(Float64(l_m * l_m) / Om) * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * t_1) t_3 = Float64(Float64(U_42_ - U) * n) tmp = 0.0 if (t_2 <= 5e+150) tmp = sqrt(Float64(Float64(fma(l_m, Float64(fma(U_42_, Float64(Float64(l_m * n) / Om), Float64(-2.0 * l_m)) / Om), t) * Float64(n * 2.0)) * U)); elseif (t_2 <= Inf) tmp = sqrt(Float64(fma(Float64(l_m / Om), fma(t_3, Float64(l_m / Om), Float64(-2.0 * l_m)), t) * t_1)); else tmp = sqrt(Float64(Float64(Float64(Float64(fma(-2.0, l_m, Float64(Float64(t_3 * l_m) / Om)) * n) * Float64(l_m * U)) / Om) * 2.0)); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(U$42$ - U), $MachinePrecision] * n), $MachinePrecision]}, If[LessEqual[t$95$2, 5e+150], N[Sqrt[N[(N[(N[(l$95$m * N[(N[(U$42$ * N[(N[(l$95$m * n), $MachinePrecision] / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(t$95$3 * N[(l$95$m / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(-2.0 * l$95$m + N[(N[(t$95$3 * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] * N[(l$95$m * U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
t_2 := \left(\left(t - \frac{l\_m \cdot l\_m}{Om} \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot t\_1\\
t_3 := \left(U* - U\right) \cdot n\\
\mathbf{if}\;t\_2 \leq 5 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(l\_m, \frac{\mathsf{fma}\left(U*, \frac{l\_m \cdot n}{Om}, -2 \cdot l\_m\right)}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(t\_3, \frac{l\_m}{Om}, -2 \cdot l\_m\right), t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{\left(\mathsf{fma}\left(-2, l\_m, \frac{t\_3 \cdot l\_m}{Om}\right) \cdot n\right) \cdot \left(l\_m \cdot U\right)}{Om} \cdot 2}\\
\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*)))) < 5.00000000000000009e150Initial program 66.8%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6469.2
lift--.f64N/A
sub-negN/A
Applied rewrites69.2%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6469.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.2
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6469.2
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6469.2
Applied rewrites69.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites73.9%
Taylor expanded in U around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6473.8
Applied rewrites73.8%
if 5.00000000000000009e150 < (*.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 41.9%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6443.7
lift--.f64N/A
sub-negN/A
Applied rewrites43.7%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6443.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.7
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6443.7
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6453.7
Applied rewrites53.7%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites44.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-*.f6453.7
Applied rewrites50.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%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f641.0
lift--.f64N/A
sub-negN/A
Applied rewrites1.0%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f641.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.0
lift-*.f64N/A
*-commutativeN/A
lower-*.f641.0
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f641.0
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f641.8
Applied rewrites1.8%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites43.2%
Taylor expanded in t around 0
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites53.9%
Final simplification61.0%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0)))
(t_2
(*
(-
(- t (* (/ (* l_m l_m) Om) 2.0))
(* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
t_1))
(t_3
(sqrt
(*
(*
(fma l_m (/ (fma U* (/ (* l_m n) Om) (* -2.0 l_m)) Om) t)
(* n 2.0))
U))))
(if (<= t_2 5e+150)
t_3
(if (<= t_2 4e+295)
(sqrt
(*
(fma (/ l_m Om) (fma (* (- U* U) n) (/ l_m Om) (* -2.0 l_m)) t)
t_1))
t_3))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double t_2 = ((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * t_1;
double t_3 = sqrt(((fma(l_m, (fma(U_42_, ((l_m * n) / Om), (-2.0 * l_m)) / Om), t) * (n * 2.0)) * U));
double tmp;
if (t_2 <= 5e+150) {
tmp = t_3;
} else if (t_2 <= 4e+295) {
tmp = sqrt((fma((l_m / Om), fma(((U_42_ - U) * n), (l_m / Om), (-2.0 * l_m)), t) * t_1));
} else {
tmp = t_3;
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) t_2 = Float64(Float64(Float64(t - Float64(Float64(Float64(l_m * l_m) / Om) * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * t_1) t_3 = sqrt(Float64(Float64(fma(l_m, Float64(fma(U_42_, Float64(Float64(l_m * n) / Om), Float64(-2.0 * l_m)) / Om), t) * Float64(n * 2.0)) * U)) tmp = 0.0 if (t_2 <= 5e+150) tmp = t_3; elseif (t_2 <= 4e+295) tmp = sqrt(Float64(fma(Float64(l_m / Om), fma(Float64(Float64(U_42_ - U) * n), Float64(l_m / Om), Float64(-2.0 * l_m)), t) * t_1)); else tmp = t_3; end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(N[(l$95$m * N[(N[(U$42$ * N[(N[(l$95$m * n), $MachinePrecision] / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 5e+150], t$95$3, If[LessEqual[t$95$2, 4e+295], N[Sqrt[N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(N[(U$42$ - U), $MachinePrecision] * n), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
t_2 := \left(\left(t - \frac{l\_m \cdot l\_m}{Om} \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot t\_1\\
t_3 := \sqrt{\left(\mathsf{fma}\left(l\_m, \frac{\mathsf{fma}\left(U*, \frac{l\_m \cdot n}{Om}, -2 \cdot l\_m\right)}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}\\
\mathbf{if}\;t\_2 \leq 5 \cdot 10^{+150}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+295}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(\left(U* - U\right) \cdot n, \frac{l\_m}{Om}, -2 \cdot l\_m\right), t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\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*)))) < 5.00000000000000009e150 or 3.9999999999999999e295 < (*.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 40.5%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6442.7
lift--.f64N/A
sub-negN/A
Applied rewrites42.7%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6442.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.7
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6442.7
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6447.4
Applied rewrites47.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites57.1%
Taylor expanded in U around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6456.9
Applied rewrites56.9%
if 5.00000000000000009e150 < (*.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*)))) < 3.9999999999999999e295Initial program 99.8%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6499.7
lift--.f64N/A
sub-negN/A
Applied rewrites99.7%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6499.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.7
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6499.7
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6499.6
Applied rewrites99.6%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites57.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-*.f6499.6
Applied rewrites92.0%
Final simplification60.3%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0)))
(t_2 (/ (* l_m l_m) Om))
(t_3
(sqrt
(*
(- (- t (* t_2 2.0)) (* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
t_1))))
(if (<= t_3 2e-132)
(sqrt (* (* (* (fma (* (/ l_m Om) l_m) -2.0 t) n) U) 2.0))
(if (<= t_3 5e+147)
(sqrt (* (fma -2.0 t_2 t) t_1))
(sqrt (* (* (fma (/ l_m Om) (* -2.0 l_m) t) (* n 2.0)) U))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double t_2 = (l_m * l_m) / Om;
double t_3 = sqrt((((t - (t_2 * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * t_1));
double tmp;
if (t_3 <= 2e-132) {
tmp = sqrt((((fma(((l_m / Om) * l_m), -2.0, t) * n) * U) * 2.0));
} else if (t_3 <= 5e+147) {
tmp = sqrt((fma(-2.0, t_2, t) * t_1));
} else {
tmp = sqrt(((fma((l_m / Om), (-2.0 * l_m), t) * (n * 2.0)) * U));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) t_2 = Float64(Float64(l_m * l_m) / Om) t_3 = sqrt(Float64(Float64(Float64(t - Float64(t_2 * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * t_1)) tmp = 0.0 if (t_3 <= 2e-132) tmp = sqrt(Float64(Float64(Float64(fma(Float64(Float64(l_m / Om) * l_m), -2.0, t) * n) * U) * 2.0)); elseif (t_3 <= 5e+147) tmp = sqrt(Float64(fma(-2.0, t_2, t) * t_1)); else tmp = sqrt(Float64(Float64(fma(Float64(l_m / Om), Float64(-2.0 * l_m), t) * Float64(n * 2.0)) * U)); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(N[(t - N[(t$95$2 * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-132], N[Sqrt[N[(N[(N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * l$95$m), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 5e+147], N[Sqrt[N[(N[(-2.0 * t$95$2 + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(-2.0 * l$95$m), $MachinePrecision] + t), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
t_2 := \frac{l\_m \cdot l\_m}{Om}\\
t_3 := \sqrt{\left(\left(t - t\_2 \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot t\_1}\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-132}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(\frac{l\_m}{Om} \cdot l\_m, -2, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, t\_2, t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{l\_m}{Om}, -2 \cdot l\_m, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}\\
\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*))))) < 2e-132Initial program 14.6%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6439.5
Applied rewrites39.5%
Applied rewrites39.7%
if 2e-132 < (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*))))) < 5.0000000000000002e147Initial program 98.4%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6482.0
Applied rewrites82.0%
if 5.0000000000000002e147 < (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 15.8%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6419.3
lift--.f64N/A
sub-negN/A
Applied rewrites19.3%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6419.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6419.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6419.3
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6419.3
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6428.2
Applied rewrites28.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites42.1%
Taylor expanded in Om around inf
lower-*.f6431.5
Applied rewrites31.5%
Final simplification51.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1
(sqrt
(*
(-
(- t (* (/ (* l_m l_m) Om) 2.0))
(* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
(* U (* n 2.0))))))
(if (<= t_1 2e-132)
(sqrt (* (* (* t U) n) 2.0))
(if (<= t_1 1e+134)
(sqrt (* (* (* U n) t) 2.0))
(* (sqrt (* (* U* U) 2.0)) (* (/ l_m Om) n))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = sqrt((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0))));
double tmp;
if (t_1 <= 2e-132) {
tmp = sqrt((((t * U) * n) * 2.0));
} else if (t_1 <= 1e+134) {
tmp = sqrt((((U * n) * t) * 2.0));
} else {
tmp = sqrt(((U_42_ * U) * 2.0)) * ((l_m / Om) * n);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = sqrt((((t - (((l_m * l_m) / om) * 2.0d0)) - ((u - u_42) * (((l_m / om) ** 2.0d0) * n))) * (u * (n * 2.0d0))))
if (t_1 <= 2d-132) then
tmp = sqrt((((t * u) * n) * 2.0d0))
else if (t_1 <= 1d+134) then
tmp = sqrt((((u * n) * t) * 2.0d0))
else
tmp = sqrt(((u_42 * u) * 2.0d0)) * ((l_m / om) * n)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = Math.sqrt((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (Math.pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0))));
double tmp;
if (t_1 <= 2e-132) {
tmp = Math.sqrt((((t * U) * n) * 2.0));
} else if (t_1 <= 1e+134) {
tmp = Math.sqrt((((U * n) * t) * 2.0));
} else {
tmp = Math.sqrt(((U_42_ * U) * 2.0)) * ((l_m / Om) * n);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = math.sqrt((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (math.pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0)))) tmp = 0 if t_1 <= 2e-132: tmp = math.sqrt((((t * U) * n) * 2.0)) elif t_1 <= 1e+134: tmp = math.sqrt((((U * n) * t) * 2.0)) else: tmp = math.sqrt(((U_42_ * U) * 2.0)) * ((l_m / Om) * n) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = sqrt(Float64(Float64(Float64(t - Float64(Float64(Float64(l_m * l_m) / Om) * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * Float64(U * Float64(n * 2.0)))) tmp = 0.0 if (t_1 <= 2e-132) tmp = sqrt(Float64(Float64(Float64(t * U) * n) * 2.0)); elseif (t_1 <= 1e+134) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); else tmp = Float64(sqrt(Float64(Float64(U_42_ * U) * 2.0)) * Float64(Float64(l_m / Om) * n)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = sqrt((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (((l_m / Om) ^ 2.0) * n))) * (U * (n * 2.0)))); tmp = 0.0; if (t_1 <= 2e-132) tmp = sqrt((((t * U) * n) * 2.0)); elseif (t_1 <= 1e+134) tmp = sqrt((((U * n) * t) * 2.0)); else tmp = sqrt(((U_42_ * U) * 2.0)) * ((l_m / Om) * n); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 2e-132], N[Sqrt[N[(N[(N[(t * U), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 1e+134], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(U$42$ * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(t - \frac{l\_m \cdot l\_m}{Om} \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right)}\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{-132}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot U\right) \cdot n\right) \cdot 2}\\
\mathbf{elif}\;t\_1 \leq 10^{+134}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U* \cdot U\right) \cdot 2} \cdot \left(\frac{l\_m}{Om} \cdot n\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*))))) < 2e-132Initial program 14.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6433.1
Applied rewrites33.1%
Applied rewrites33.2%
if 2e-132 < (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*))))) < 9.99999999999999921e133Initial program 98.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6466.6
Applied rewrites66.6%
Applied rewrites74.5%
if 9.99999999999999921e133 < (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 18.5%
Taylor expanded in U* around -inf
associate-*r*N/A
lower-*.f64N/A
Applied rewrites17.4%
Applied rewrites17.1%
Applied rewrites17.4%
Final simplification40.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (* U (* n 2.0)))
(t_2 (/ (* l_m l_m) Om))
(t_3
(* (- (- t (* t_2 2.0)) (* (- U U*) (* (pow (/ l_m Om) 2.0) n))) t_1))
(t_4 (sqrt (* (* (* (fma (* (/ l_m Om) l_m) -2.0 t) n) U) 2.0))))
(if (<= t_3 2e-264)
t_4
(if (<= t_3 4e+295) (sqrt (* (fma -2.0 t_2 t) t_1)) t_4))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = U * (n * 2.0);
double t_2 = (l_m * l_m) / Om;
double t_3 = ((t - (t_2 * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * t_1;
double t_4 = sqrt((((fma(((l_m / Om) * l_m), -2.0, t) * n) * U) * 2.0));
double tmp;
if (t_3 <= 2e-264) {
tmp = t_4;
} else if (t_3 <= 4e+295) {
tmp = sqrt((fma(-2.0, t_2, t) * t_1));
} else {
tmp = t_4;
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(U * Float64(n * 2.0)) t_2 = Float64(Float64(l_m * l_m) / Om) t_3 = Float64(Float64(Float64(t - Float64(t_2 * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * t_1) t_4 = sqrt(Float64(Float64(Float64(fma(Float64(Float64(l_m / Om) * l_m), -2.0, t) * n) * U) * 2.0)) tmp = 0.0 if (t_3 <= 2e-264) tmp = t_4; elseif (t_3 <= 4e+295) tmp = sqrt(Float64(fma(-2.0, t_2, t) * t_1)); else tmp = t_4; end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t - N[(t$95$2 * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(N[(N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * l$95$m), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-264], t$95$4, If[LessEqual[t$95$3, 4e+295], N[Sqrt[N[(N[(-2.0 * t$95$2 + t), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := U \cdot \left(n \cdot 2\right)\\
t_2 := \frac{l\_m \cdot l\_m}{Om}\\
t_3 := \left(\left(t - t\_2 \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot t\_1\\
t_4 := \sqrt{\left(\left(\mathsf{fma}\left(\frac{l\_m}{Om} \cdot l\_m, -2, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{if}\;t\_3 \leq 2 \cdot 10^{-264}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+295}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, t\_2, t\right) \cdot t\_1}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\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*)))) < 2e-264 or 3.9999999999999999e295 < (*.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 15.5%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6425.1
Applied rewrites25.1%
Applied rewrites33.4%
if 2e-264 < (*.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*)))) < 3.9999999999999999e295Initial program 98.4%
Taylor expanded in Om around inf
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f6482.0
Applied rewrites82.0%
Final simplification51.4%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1
(*
(-
(- t (* (/ (* l_m l_m) Om) 2.0))
(* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
(* U (* n 2.0)))))
(if (<= t_1 2e-264)
(sqrt (* (* (* t U) n) 2.0))
(if (<= t_1 5e+267)
(sqrt (* (* (* U n) t) 2.0))
(/ (* (sqrt (* (* U* U) 2.0)) (* l_m n)) Om)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = ((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0));
double tmp;
if (t_1 <= 2e-264) {
tmp = sqrt((((t * U) * n) * 2.0));
} else if (t_1 <= 5e+267) {
tmp = sqrt((((U * n) * t) * 2.0));
} else {
tmp = (sqrt(((U_42_ * U) * 2.0)) * (l_m * n)) / Om;
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: t_1
real(8) :: tmp
t_1 = ((t - (((l_m * l_m) / om) * 2.0d0)) - ((u - u_42) * (((l_m / om) ** 2.0d0) * n))) * (u * (n * 2.0d0))
if (t_1 <= 2d-264) then
tmp = sqrt((((t * u) * n) * 2.0d0))
else if (t_1 <= 5d+267) then
tmp = sqrt((((u * n) * t) * 2.0d0))
else
tmp = (sqrt(((u_42 * u) * 2.0d0)) * (l_m * n)) / om
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = ((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (Math.pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0));
double tmp;
if (t_1 <= 2e-264) {
tmp = Math.sqrt((((t * U) * n) * 2.0));
} else if (t_1 <= 5e+267) {
tmp = Math.sqrt((((U * n) * t) * 2.0));
} else {
tmp = (Math.sqrt(((U_42_ * U) * 2.0)) * (l_m * n)) / Om;
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): t_1 = ((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (math.pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0)) tmp = 0 if t_1 <= 2e-264: tmp = math.sqrt((((t * U) * n) * 2.0)) elif t_1 <= 5e+267: tmp = math.sqrt((((U * n) * t) * 2.0)) else: tmp = (math.sqrt(((U_42_ * U) * 2.0)) * (l_m * n)) / Om return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = Float64(Float64(Float64(t - Float64(Float64(Float64(l_m * l_m) / Om) * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * Float64(U * Float64(n * 2.0))) tmp = 0.0 if (t_1 <= 2e-264) tmp = sqrt(Float64(Float64(Float64(t * U) * n) * 2.0)); elseif (t_1 <= 5e+267) tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); else tmp = Float64(Float64(sqrt(Float64(Float64(U_42_ * U) * 2.0)) * Float64(l_m * n)) / Om); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) t_1 = ((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (((l_m / Om) ^ 2.0) * n))) * (U * (n * 2.0)); tmp = 0.0; if (t_1 <= 2e-264) tmp = sqrt((((t * U) * n) * 2.0)); elseif (t_1 <= 5e+267) tmp = sqrt((((U * n) * t) * 2.0)); else tmp = (sqrt(((U_42_ * U) * 2.0)) * (l_m * n)) / Om; end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e-264], N[Sqrt[N[(N[(N[(t * U), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 5e+267], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[N[(N[(U$42$ * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \left(\left(t - \frac{l\_m \cdot l\_m}{Om} \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right)\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{-264}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot U\right) \cdot n\right) \cdot 2}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+267}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{\left(U* \cdot U\right) \cdot 2} \cdot \left(l\_m \cdot n\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*)))) < 2e-264Initial program 13.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6430.8
Applied rewrites30.8%
Applied rewrites30.8%
if 2e-264 < (*.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*)))) < 4.9999999999999999e267Initial program 98.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6466.6
Applied rewrites66.6%
Applied rewrites74.5%
if 4.9999999999999999e267 < (*.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 18.9%
Taylor expanded in U* around -inf
associate-*r*N/A
lower-*.f64N/A
Applied rewrites17.8%
Applied rewrites17.5%
Applied rewrites18.3%
Final simplification40.3%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<=
(*
(-
(- t (* (/ (* l_m l_m) Om) 2.0))
(* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
(* U (* n 2.0)))
2e-264)
(sqrt (* (* (* t U) n) 2.0))
(sqrt (* (* (* U n) t) 2.0))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0))) <= 2e-264) {
tmp = sqrt((((t * U) * n) * 2.0));
} else {
tmp = sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((((t - (((l_m * l_m) / om) * 2.0d0)) - ((u - u_42) * (((l_m / om) ** 2.0d0) * n))) * (u * (n * 2.0d0))) <= 2d-264) then
tmp = sqrt((((t * u) * n) * 2.0d0))
else
tmp = sqrt((((u * n) * t) * 2.0d0))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (Math.pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0))) <= 2e-264) {
tmp = Math.sqrt((((t * U) * n) * 2.0));
} else {
tmp = Math.sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if (((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (math.pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0))) <= 2e-264: tmp = math.sqrt((((t * U) * n) * 2.0)) else: tmp = math.sqrt((((U * n) * t) * 2.0)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (Float64(Float64(Float64(t - Float64(Float64(Float64(l_m * l_m) / Om) * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * Float64(U * Float64(n * 2.0))) <= 2e-264) tmp = sqrt(Float64(Float64(Float64(t * U) * n) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if ((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (((l_m / Om) ^ 2.0) * n))) * (U * (n * 2.0))) <= 2e-264) tmp = sqrt((((t * U) * n) * 2.0)); else tmp = sqrt((((U * n) * t) * 2.0)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[N[(N[(N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-264], N[Sqrt[N[(N[(N[(t * U), $MachinePrecision] * n), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(t - \frac{l\_m \cdot l\_m}{Om} \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right) \leq 2 \cdot 10^{-264}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot U\right) \cdot n\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\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*)))) < 2e-264Initial program 13.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6430.8
Applied rewrites30.8%
Applied rewrites30.8%
if 2e-264 < (*.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 52.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6432.9
Applied rewrites32.9%
Applied rewrites35.9%
Final simplification35.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<=
(*
(-
(- t (* (/ (* l_m l_m) Om) 2.0))
(* (- U U*) (* (pow (/ l_m Om) 2.0) n)))
(* U (* n 2.0)))
2e-264)
(sqrt (* (* (* t n) U) 2.0))
(sqrt (* (* (* U n) t) 2.0))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0))) <= 2e-264) {
tmp = sqrt((((t * n) * U) * 2.0));
} else {
tmp = sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if ((((t - (((l_m * l_m) / om) * 2.0d0)) - ((u - u_42) * (((l_m / om) ** 2.0d0) * n))) * (u * (n * 2.0d0))) <= 2d-264) then
tmp = sqrt((((t * n) * u) * 2.0d0))
else
tmp = sqrt((((u * n) * t) * 2.0d0))
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if ((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (Math.pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0))) <= 2e-264) {
tmp = Math.sqrt((((t * n) * U) * 2.0));
} else {
tmp = Math.sqrt((((U * n) * t) * 2.0));
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if (((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (math.pow((l_m / Om), 2.0) * n))) * (U * (n * 2.0))) <= 2e-264: tmp = math.sqrt((((t * n) * U) * 2.0)) else: tmp = math.sqrt((((U * n) * t) * 2.0)) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (Float64(Float64(Float64(t - Float64(Float64(Float64(l_m * l_m) / Om) * 2.0)) - Float64(Float64(U - U_42_) * Float64((Float64(l_m / Om) ^ 2.0) * n))) * Float64(U * Float64(n * 2.0))) <= 2e-264) tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0)); else tmp = sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if ((((t - (((l_m * l_m) / Om) * 2.0)) - ((U - U_42_) * (((l_m / Om) ^ 2.0) * n))) * (U * (n * 2.0))) <= 2e-264) tmp = sqrt((((t * n) * U) * 2.0)); else tmp = sqrt((((U * n) * t) * 2.0)); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[N[(N[(N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e-264], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(t - \frac{l\_m \cdot l\_m}{Om} \cdot 2\right) - \left(U - U*\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot n\right)\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right) \leq 2 \cdot 10^{-264}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}\\
\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*)))) < 2e-264Initial program 13.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6430.8
Applied rewrites30.8%
if 2e-264 < (*.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 52.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6432.9
Applied rewrites32.9%
Applied rewrites35.9%
Final simplification35.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(let* ((t_1 (fma (* (/ l_m Om) l_m) -2.0 t)))
(if (<= n -1.1e+164)
(* (sqrt (* (* U n) t_1)) (sqrt 2.0))
(if (<= n -9.8e+107)
(* (sqrt (* U* U)) (* (* (sqrt 2.0) n) (/ l_m Om)))
(if (<= n -4e-310)
(sqrt (* (* (fma (/ l_m Om) (* -2.0 l_m) t) (* n 2.0)) U))
(* (sqrt (* n 2.0)) (sqrt (* t_1 U))))))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double t_1 = fma(((l_m / Om) * l_m), -2.0, t);
double tmp;
if (n <= -1.1e+164) {
tmp = sqrt(((U * n) * t_1)) * sqrt(2.0);
} else if (n <= -9.8e+107) {
tmp = sqrt((U_42_ * U)) * ((sqrt(2.0) * n) * (l_m / Om));
} else if (n <= -4e-310) {
tmp = sqrt(((fma((l_m / Om), (-2.0 * l_m), t) * (n * 2.0)) * U));
} else {
tmp = sqrt((n * 2.0)) * sqrt((t_1 * U));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) t_1 = fma(Float64(Float64(l_m / Om) * l_m), -2.0, t) tmp = 0.0 if (n <= -1.1e+164) tmp = Float64(sqrt(Float64(Float64(U * n) * t_1)) * sqrt(2.0)); elseif (n <= -9.8e+107) tmp = Float64(sqrt(Float64(U_42_ * U)) * Float64(Float64(sqrt(2.0) * n) * Float64(l_m / Om))); elseif (n <= -4e-310) tmp = sqrt(Float64(Float64(fma(Float64(l_m / Om), Float64(-2.0 * l_m), t) * Float64(n * 2.0)) * U)); else tmp = Float64(sqrt(Float64(n * 2.0)) * sqrt(Float64(t_1 * U))); end return tmp end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(N[(l$95$m / Om), $MachinePrecision] * l$95$m), $MachinePrecision] * -2.0 + t), $MachinePrecision]}, If[LessEqual[n, -1.1e+164], N[(N[Sqrt[N[(N[(U * n), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[n, -9.8e+107], N[(N[Sqrt[N[(U$42$ * U), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] * n), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[n, -4e-310], N[Sqrt[N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(-2.0 * l$95$m), $MachinePrecision] + t), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(t$95$1 * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{l\_m}{Om} \cdot l\_m, -2, t\right)\\
\mathbf{if}\;n \leq -1.1 \cdot 10^{+164}:\\
\;\;\;\;\sqrt{\left(U \cdot n\right) \cdot t\_1} \cdot \sqrt{2}\\
\mathbf{elif}\;n \leq -9.8 \cdot 10^{+107}:\\
\;\;\;\;\sqrt{U* \cdot U} \cdot \left(\left(\sqrt{2} \cdot n\right) \cdot \frac{l\_m}{Om}\right)\\
\mathbf{elif}\;n \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{l\_m}{Om}, -2 \cdot l\_m, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{t\_1 \cdot U}\\
\end{array}
\end{array}
if n < -1.10000000000000003e164Initial program 47.3%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6436.1
Applied rewrites36.1%
Applied rewrites43.2%
if -1.10000000000000003e164 < n < -9.8000000000000003e107Initial program 21.3%
Taylor expanded in U* around -inf
associate-*r*N/A
lower-*.f64N/A
Applied rewrites54.3%
if -9.8000000000000003e107 < n < -3.999999999999988e-310Initial program 42.0%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6443.6
lift--.f64N/A
sub-negN/A
Applied rewrites43.6%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6443.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6443.6
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6443.6
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6449.4
Applied rewrites49.4%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites60.2%
Taylor expanded in Om around inf
lower-*.f6451.2
Applied rewrites51.2%
if -3.999999999999988e-310 < n Initial program 50.9%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6445.1
Applied rewrites45.1%
Applied rewrites61.9%
Final simplification56.1%
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
:precision binary64
(if (<= n 6.8e-308)
(sqrt
(*
(* (fma l_m (/ (fma U* (/ (* l_m n) Om) (* -2.0 l_m)) Om) t) (* n 2.0))
U))
(* (sqrt (* n 2.0)) (sqrt (* (fma (* (/ l_m Om) l_m) -2.0 t) U)))))l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= 6.8e-308) {
tmp = sqrt(((fma(l_m, (fma(U_42_, ((l_m * n) / Om), (-2.0 * l_m)) / Om), t) * (n * 2.0)) * U));
} else {
tmp = sqrt((n * 2.0)) * sqrt((fma(((l_m / Om) * l_m), -2.0, t) * U));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= 6.8e-308) tmp = sqrt(Float64(Float64(fma(l_m, Float64(fma(U_42_, Float64(Float64(l_m * n) / Om), Float64(-2.0 * l_m)) / Om), t) * Float64(n * 2.0)) * U)); else tmp = Float64(sqrt(Float64(n * 2.0)) * sqrt(Float64(fma(Float64(Float64(l_m / Om) * l_m), -2.0, t) * U))); end return tmp end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, 6.8e-308], N[Sqrt[N[(N[(N[(l$95$m * N[(N[(U$42$ * N[(N[(l$95$m * n), $MachinePrecision] / Om), $MachinePrecision] + N[(-2.0 * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * l$95$m), $MachinePrecision] * -2.0 + t), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq 6.8 \cdot 10^{-308}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(l\_m, \frac{\mathsf{fma}\left(U*, \frac{l\_m \cdot n}{Om}, -2 \cdot l\_m\right)}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{\mathsf{fma}\left(\frac{l\_m}{Om} \cdot l\_m, -2, t\right) \cdot U}\\
\end{array}
\end{array}
if n < 6.79999999999999998e-308Initial program 41.3%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6442.4
lift--.f64N/A
sub-negN/A
Applied rewrites42.4%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6442.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.4
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6442.4
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6447.2
Applied rewrites47.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites55.6%
Taylor expanded in U around 0
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6454.8
Applied rewrites54.8%
if 6.79999999999999998e-308 < n Initial program 50.9%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6445.1
Applied rewrites45.1%
Applied rewrites61.9%
Final simplification58.5%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n -4e-310) (sqrt (* (* (fma (/ l_m Om) (* -2.0 l_m) t) (* n 2.0)) U)) (* (sqrt (* n 2.0)) (sqrt (* (fma (* (/ l_m Om) l_m) -2.0 t) U)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= -4e-310) {
tmp = sqrt(((fma((l_m / Om), (-2.0 * l_m), t) * (n * 2.0)) * U));
} else {
tmp = sqrt((n * 2.0)) * sqrt((fma(((l_m / Om) * l_m), -2.0, t) * U));
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= -4e-310) tmp = sqrt(Float64(Float64(fma(Float64(l_m / Om), Float64(-2.0 * l_m), t) * Float64(n * 2.0)) * U)); else tmp = Float64(sqrt(Float64(n * 2.0)) * sqrt(Float64(fma(Float64(Float64(l_m / Om) * l_m), -2.0, t) * U))); end return tmp end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, -4e-310], N[Sqrt[N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * N[(-2.0 * l$95$m), $MachinePrecision] + t), $MachinePrecision] * N[(n * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * l$95$m), $MachinePrecision] * -2.0 + t), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq -4 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{l\_m}{Om}, -2 \cdot l\_m, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{\mathsf{fma}\left(\frac{l\_m}{Om} \cdot l\_m, -2, t\right) \cdot U}\\
\end{array}
\end{array}
if n < -3.999999999999988e-310Initial program 41.3%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift-*.f64N/A
lift-pow.f64N/A
unpow2N/A
associate-*r*N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6442.4
lift--.f64N/A
sub-negN/A
Applied rewrites42.4%
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6442.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.4
lift-fma.f64N/A
*-commutativeN/A
lower-fma.f6442.4
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6447.2
Applied rewrites47.2%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites55.6%
Taylor expanded in Om around inf
lower-*.f6443.6
Applied rewrites43.6%
if -3.999999999999988e-310 < n Initial program 50.9%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6445.1
Applied rewrites45.1%
Applied rewrites61.9%
Final simplification53.1%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n 6e+223) (sqrt (* (* (* (fma (* (/ l_m Om) l_m) -2.0 t) n) U) 2.0)) (* (sqrt (* (* t U) 2.0)) (sqrt n))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= 6e+223) {
tmp = sqrt((((fma(((l_m / Om) * l_m), -2.0, t) * n) * U) * 2.0));
} else {
tmp = sqrt(((t * U) * 2.0)) * sqrt(n);
}
return tmp;
}
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= 6e+223) tmp = sqrt(Float64(Float64(Float64(fma(Float64(Float64(l_m / Om) * l_m), -2.0, t) * n) * U) * 2.0)); else tmp = Float64(sqrt(Float64(Float64(t * U) * 2.0)) * sqrt(n)); end return tmp end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, 6e+223], N[Sqrt[N[(N[(N[(N[(N[(N[(l$95$m / Om), $MachinePrecision] * l$95$m), $MachinePrecision] * -2.0 + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(t * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq 6 \cdot 10^{+223}:\\
\;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(\frac{l\_m}{Om} \cdot l\_m, -2, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(t \cdot U\right) \cdot 2} \cdot \sqrt{n}\\
\end{array}
\end{array}
if n < 6.00000000000000002e223Initial program 46.1%
Taylor expanded in n around 0
lower-*.f64N/A
lower-sqrt.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-sqrt.f6443.3
Applied rewrites43.3%
Applied rewrites48.9%
if 6.00000000000000002e223 < n Initial program 49.5%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites47.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6454.1
Applied rewrites54.1%
Final simplification49.3%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (if (<= n 1.1e-268) (sqrt (* (* (* t n) 2.0) U)) (* (sqrt (* (* t U) 2.0)) (sqrt n))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= 1.1e-268) {
tmp = sqrt((((t * n) * 2.0) * U));
} else {
tmp = sqrt(((t * U) * 2.0)) * sqrt(n);
}
return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
real(8) :: tmp
if (n <= 1.1d-268) then
tmp = sqrt((((t * n) * 2.0d0) * u))
else
tmp = sqrt(((t * u) * 2.0d0)) * sqrt(n)
end if
code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
double tmp;
if (n <= 1.1e-268) {
tmp = Math.sqrt((((t * n) * 2.0) * U));
} else {
tmp = Math.sqrt(((t * U) * 2.0)) * Math.sqrt(n);
}
return tmp;
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): tmp = 0 if n <= 1.1e-268: tmp = math.sqrt((((t * n) * 2.0) * U)) else: tmp = math.sqrt(((t * U) * 2.0)) * math.sqrt(n) return tmp
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) tmp = 0.0 if (n <= 1.1e-268) tmp = sqrt(Float64(Float64(Float64(t * n) * 2.0) * U)); else tmp = Float64(sqrt(Float64(Float64(t * U) * 2.0)) * sqrt(n)); end return tmp end
l_m = abs(l); function tmp_2 = code(n, U, t, l_m, Om, U_42_) tmp = 0.0; if (n <= 1.1e-268) tmp = sqrt((((t * n) * 2.0) * U)); else tmp = sqrt(((t * U) * 2.0)) * sqrt(n); end tmp_2 = tmp; end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, 1.1e-268], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * 2.0), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(t * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\begin{array}{l}
\mathbf{if}\;n \leq 1.1 \cdot 10^{-268}:\\
\;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot 2\right) \cdot U}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(t \cdot U\right) \cdot 2} \cdot \sqrt{n}\\
\end{array}
\end{array}
if n < 1.10000000000000002e-268Initial program 40.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6434.8
Applied rewrites34.8%
Applied rewrites34.8%
if 1.10000000000000002e-268 < n Initial program 52.4%
lift-sqrt.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
sqrt-prodN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-sqrt.f64N/A
Applied rewrites52.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6443.2
Applied rewrites43.2%
Final simplification38.8%
l_m = (fabs.f64 l) (FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* (* (* U n) t) 2.0)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return sqrt((((U * n) * t) * 2.0));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
real(8), intent (in) :: n
real(8), intent (in) :: u
real(8), intent (in) :: t
real(8), intent (in) :: l_m
real(8), intent (in) :: om
real(8), intent (in) :: u_42
code = sqrt((((u * n) * t) * 2.0d0))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
return Math.sqrt((((U * n) * t) * 2.0));
}
l_m = math.fabs(l) def code(n, U, t, l_m, Om, U_42_): return math.sqrt((((U * n) * t) * 2.0))
l_m = abs(l) function code(n, U, t, l_m, Om, U_42_) return sqrt(Float64(Float64(Float64(U * n) * t) * 2.0)) end
l_m = abs(l); function tmp = code(n, U, t, l_m, Om, U_42_) tmp = sqrt((((U * n) * t) * 2.0)); end
l_m = N[Abs[l], $MachinePrecision] code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(U * n), $MachinePrecision] * t), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
\sqrt{\left(\left(U \cdot n\right) \cdot t\right) \cdot 2}
\end{array}
Initial program 46.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-*.f6432.6
Applied rewrites32.6%
Applied rewrites32.1%
Final simplification32.1%
herbie shell --seed 2024278
(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*))))))