Re: Factorial

From: Lorenzo Moneta <Lorenzo.Moneta_at_cern.ch>
Date: Wed, 14 Feb 2007 10:07:33 +0100


Hi,

  using computers with double precision you cannot calculate it for values larger than 170, because you reach the maximum double number represented in double precision (~ 1.E+305). You should either use packages with extended precision or eventually estimate log n! using the Stirling approximation, see for example

   http://mathworld.wolfram.com/StirlingsApproximation.html

Best Regards,

  Lorenzo
On Feb 14, 2007, at 6:22 AM, navneet kumar wrote:

> Hi Rooters,
> Please tell me is there anyway to calculate factorial of number
> greater than 170 in root?
> I have checked upto 170 and but for value higher than 170 ,i am
> gettin "inf".
>
> thanks in advance.
> Navneet
> *******************************************
> Navneet Kumar
> Junior Research Fellow
> Department Of Physics
> Panjab University
> Chandigarh-160014
> ****************************************
> E-mail: naviblustar_at_yahoo.co.in
> knavneet.pu_at_gmail.com
> Mobile: 0 9872218896
> : 09831761749
> ******************************************
>
Received on Wed Feb 14 2007 - 10:07:58 CET

This archive was generated by hypermail 2.2.0 : Wed Feb 14 2007 - 17:50:03 CET