Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Elementary and Middle School Math Help > Math Homework Help
Reply
 
Thread Tools Display Modes
  #1  
Old 12-25-2006, 11:56 AM
Newbie
 
Join Date: Dec 2006
Posts: 1
Country:
Thanks: 0
Thanked 0 Times in 0 Posts
raju is on a distinguished road
Default factorial for big numbers

I need a way to find factorail for big numbers like 8479!

Thanks in advance

raju
Reply With Quote
Advertisement
 
  #2  
Old 12-25-2006, 12:01 PM
ThePerfectHacker's Avatar
Global Moderator

 
Join Date: Nov 2005
Location: New York City
Posts: 11,339
Country:
Thanks: 329
Thanked 2,943 Times in 2,472 Posts
ThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond repute
Default

Quote:
Originally Posted by raju View Post
I need a way to find factorail for big numbers like 8479!

Thanks in advance

raju
A simple way.
Just multiply them out.
__________________
We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America.
Reply With Quote
  #3  
Old 12-25-2006, 12:48 PM
CaptainBlack's Avatar
Grand Panjandrum


 
Join Date: Nov 2005
Location: Somewhere near the south coast
Posts: 10,104
Country:
Thanks: 472
Thanked 2,599 Times in 2,162 Posts
CaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond repute
Default

Quote:
Originally Posted by raju View Post
I need a way to find factorail for big numbers like 8479!

Thanks in advance

raju
See Stirlings formula (equations 13 and 14 here)

RonL
__________________
"It is proof of a base and low mind for one to wish to think with the masses or majority, merely because the majority is the majority"
--Giordano Bruno
Reply With Quote
  #4  
Old 12-25-2006, 01:19 PM
ThePerfectHacker's Avatar
Global Moderator

 
Join Date: Nov 2005
Location: New York City
Posts: 11,339
Country:
Thanks: 329
Thanked 2,943 Times in 2,472 Posts
ThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond repute
Default

Quote:
Originally Posted by CaptainBlank View Post
See Stirlings formula (equations 13 and 14 here)

RonL
That is only an approximation.
__________________
We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America.
Reply With Quote
  #5  
Old 12-25-2006, 03:02 PM
CaptainBlack's Avatar
Grand Panjandrum


 
Join Date: Nov 2005
Location: Somewhere near the south coast
Posts: 10,104
Country:
Thanks: 472
Thanked 2,599 Times in 2,162 Posts
CaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond repute
Default

Quote:
Originally Posted by ThePerfectHacker View Post
That is only an approximation.
How many digits does 8479! have?

(Rhetorical question)

RonL
__________________
"It is proof of a base and low mind for one to wish to think with the masses or majority, merely because the majority is the majority"
--Giordano Bruno
Reply With Quote
  #6  
Old 12-25-2006, 04:52 PM
galactus's Avatar
Eater of Worlds
 
Join Date: Jul 2006
Location: Chaneysville, PA
Posts: 2,443
Country:
Thanks: 88
Thanked 844 Times in 761 Posts
galactus is a splendid one to beholdgalactus is a splendid one to beholdgalactus is a splendid one to beholdgalactus is a splendid one to beholdgalactus is a splendid one to beholdgalactus is a splendid one to beholdgalactus is a splendid one to beholdgalactus is a splendid one to behold
Default

Quote:
Originally Posted by CaptainBlack View Post
How many digits does 8479! have?

(Rhetorical question)

RonL
Over 29,000.

25972686487041052159869258722936182200373790277711 48344797668281885988268302193747006721558615751528[...29429 digits...]00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000
__________________
http://www.mathhelpforum.com/math-help/avatars/colby2152.gif?dateline=1208469836

Old mathematicians never die; they just lose some of their functions.
Reply With Quote
  #7  
Old 12-25-2006, 05:45 PM
ThePerfectHacker's Avatar
Global Moderator

 
Join Date: Nov 2005
Location: New York City
Posts: 11,339
Country:
Thanks: 329
Thanked 2,943 Times in 2,472 Posts
ThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond reputeThePerfectHacker has a reputation beyond repute
Default

Quote:
Originally Posted by CaptainBlack View Post
How many digits does 8479! have?

(Rhetorical question)

RonL
I can find how many zeros is has .
__________________
We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America.
Reply With Quote
  #8  
Old 01-29-2007, 06:08 AM
Senior Member
 
Join Date: Nov 2006
Location: oxford
Posts: 112
Country:
Thanks: 47
Thanked 15 Times in 15 Posts
chogo is on a distinguished road
Default

i had this problems some weeks back. Stirlings function is probably the best for large factorials. But otherwise use this bit of code i wrote in java which is computationally efficient.


public double gammaln(float xx){
double x,y,tmp,ser;
double[] cof={76.18009172947146,-86.50532032941677,
24.01409824083091,-1.231739572450155,
0.1208650973866179e-2,-0.5395239384953e-5};
int j;
y=x=xx;
tmp=x+5.5;
tmp -= (x+0.5)*Math.log(tmp);
ser=1.000000000190015;
for (j=0;j <= 5;j++) {ser += cof[j]/++y;}
return -tmp+ Math.log(2.5066282746310005*ser/x);}


public double factorial(float n){
double value = gammaln(n + 1);
double answer = Math.exp(value);
return answer;}

This is based around a method of gamma approximation by C.lanczos. (Paper is called - (A precision approximation of the gamma function).

This method can also be used to find NON integer factorials
Reply With Quote
  #9  
Old 03-12-2007, 05:47 PM
Junior Member
 
Join Date: Mar 2007
Posts: 7
Country:
Thanks: 0
Thanked 0 Times in 0 Posts
spanner is on a distinguished road
Default

I think ur asking this for a question like "find the lowest common multiple" (LCM)

there is no need to use massive formulas unless the number is greater then 1trillion.

just use Prime factorisation.

eg. 4 = 2 power of 2
6 = 3 x 2
1001 = 7 x 11 x 13
etc...

take the number and find all possible prime numbers which go ito it. (see examples above)
then...

eg. find the lowest common multiple of 4, 2, 6
4 = 2 squared 2 = 2 and 6 = 2x3
therfore the number must contain 2 squared and 3.
= 2 squared x 3
= 12

find all prime factors of the numbers. and take the common ones out
eg. 2 squared and 2
only use 2 squared because 2 is within 2 squared

then multiply them together.


(i can go on but it would just be useless)
Reply With Quote
  #10  
Old 03-12-2007, 11:05 PM
CaptainBlack's Avatar
Grand Panjandrum


 
Join Date: Nov 2005
Location: Somewhere near the south coast
Posts: 10,104
Country:
Thanks: 472
Thanked 2,599 Times in 2,162 Posts
CaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond repute
Default

Quote:
Originally Posted by spanner View Post
I think ur asking this for a question like "find the lowest common multiple" (LCM)
How does this relate to finding the factorial of a large number?

RonL
__________________
"It is proof of a base and low mind for one to wish to think with the masses or majority, merely because the majority is the majority"
--Giordano Bruno
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 09:53 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2008 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.