home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12415 < prev    next >
Encoding:
Internet Message Format  |  1992-08-16  |  2.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!asuvax!ncar!noao!amethyst!organpipe.uug.arizona.edu!news
  2. From: dave@cs.arizona.edu (Dave Schaumann)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: POWER OF LARGE NUMBERS
  5. Message-ID: <1992Aug17.060243.11404@organpipe.uug.arizona.edu>
  6. Date: 17 Aug 92 06:02:43 GMT
  7. References: <1992Aug12.135106.12924@cs.uow.edu.au> <thompson.713734408@daphne.socsci.umn.edu> <1992Aug16.052157.1991@organpipe.uug.arizona.edu> <QUANSTRO.92Aug16132245@mari.StOlaf.edu>
  8. Sender: news@organpipe.uug.arizona.edu
  9. Reply-To: dave@cs.arizona.edu (Dave Schaumann)
  10. Organization: University of Arizona
  11. Lines: 32
  12. In-Reply-To: quanstro@mari.StOlaf.edu (goon)
  13.  
  14. In article <QUANSTRO.92Aug16132245@mari.StOlaf.edu>, quanstro@mari (goon) writes:
  15. >In article <1992Aug16.052157.1991@organpipe.uug.arizona.edu> dave@cs.arizona.edu (Dave Schaumann) writes:
  16. >
  17. >   >>    Does any one know how to raise power of possibly 100 digits 
  18. >   >>to possibly 100 digits. Any algorithm or code will be appriciated.
  19. >   >
  20. >   >Is there any hope of solving this?
  21. >
  22. >   Only if you're willing to give up most of the significant digits.
  23. [...]
  24. >
  25. >You just contradicted yourself. It is possible. It just takes more
  26. >memory and more programming (you can't expect the hardware to handle
  27. >this sort of case). Check out the man page for mp (a set of arbitrary
  28. >precision arith. functions) if you are on a UNIX system. There is also
  29. >a GNU version of these functins.
  30.  
  31. Take a look at the specification again.  We're talking about calculations
  32. that will yield results with 10 ** 10 ** 100 digits.  Try to do that with
  33. a so-called `arbitrary precision' software package, and you'll find out
  34. that it wants memory for that precision.  We're talking about numbers so
  35. hugely vast we can't even talk about how many *digits* they have without
  36. using exponents!  A megabyte has (about) 10**6 bytes in it, so we're talking
  37. about 10**94 megabytes just to hold the result.  Suppose you can load 1
  38. megabyte in a 10**-12 seconds (new warp-drive technology), it would take you
  39. 10**78 seconds to load your value.  That's more than 10**71 years.
  40.  
  41. So I restate my point: yes, you can write software to deal with numbers
  42. that large, but NOT without dropping 99.9% of your accuracy.
  43.  
  44. -- 
  45. Dave Schaumann            dave@cs.arizona.edu
  46.