Large Numbers

This is a discussion on Large Numbers within the C++ Programming forums, part of the General Programming Boards category; I,ve been trying to write a program that calculates the factorial of a number. The program works quite well, but ...

  1. #1
    Wannabe Geek
    Join Date
    Aug 2004
    Posts
    19

    Large Numbers

    I,ve been trying to write a program that calculates the factorial of a number.
    The program works quite well, but for the fact that i'm unable to store the value of the factorial.
    80! has over a hundred digits, and i want to store and print to screen all the digits(no truncating or rounding). Int gives me only 4 bytes, long only 8bytes that doesnt help.
    How do i store and display such large values.
    What if there were more than 500 digits for eg:- 100^(80!).
    How would i store and display these large values without losing digits.

    Any help will be appreciated.
    -Cheers.

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to deal wth large numbers
    By bvgsrs in forum C++ Programming
    Replies: 2
    Last Post: 06-18-2007, 07:16 AM
  2. Handling Large Numbers
    By Xzyx987X in forum C Programming
    Replies: 2
    Last Post: 05-03-2004, 03:33 PM
  3. Using really big numbers!
    By Machewy in forum C++ Programming
    Replies: 11
    Last Post: 02-26-2004, 10:49 AM
  4. Help needed with VERY large numbers.
    By jwarner in forum C++ Programming
    Replies: 4
    Last Post: 01-18-2004, 12:01 PM
  5. A (complex) question on numbers
    By Unregistered in forum C++ Programming
    Replies: 8
    Last Post: 02-03-2002, 06:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21