MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: NFactorial[n_], fast for large (n).



Ted, you're kidding. Try 12000.!, check once more your examples and you
will see: it isn't you who is making the fast implementations, its
wolfram.

Jrgen


-----Original Message-----
From: Ersek_Ted%PAX1A@mr.nawcad.navy.mil To: mathgroup@smc.vnet.net
<Ersek_Ted%PAX1A@mr.nawcad.navy.mil> Subject: [mg12581] [mg12506] NFactorial[n_],
fast for large (n).


> If (num) is a large integer   N[ num! ]   computes the exact value of
> (num!),
> and then converts it to a less precise value.  This can take a
> relatively  long time (see below).
>
> In[1]:=
> N[12000!];//Timing
>
> Out[1]=
> {10.16 Second,Null}
>
> But  (n!) == Gamma[n+1]
> So I define a function  NFactorial[n_Integer]
>
> In[2]:=
.......




  • Prev by Date: Re: What to return on symbolic evaluation of own heads ?
  • Next by Date: getting an ellipse on a different axis
  • Prev by thread: NFactorial[n_], fast for large (n).
  • Next by thread: red-green stereograms