home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!asuvax!ncar!noao!amethyst!organpipe.uug.arizona.edu!news
- From: dave@cs.arizona.edu (Dave Schaumann)
- Newsgroups: comp.lang.c
- Subject: Re: POWER OF LARGE NUMBERS
- Message-ID: <1992Aug17.060243.11404@organpipe.uug.arizona.edu>
- Date: 17 Aug 92 06:02:43 GMT
- 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>
- Sender: news@organpipe.uug.arizona.edu
- Reply-To: dave@cs.arizona.edu (Dave Schaumann)
- Organization: University of Arizona
- Lines: 32
- In-Reply-To: quanstro@mari.StOlaf.edu (goon)
-
- In article <QUANSTRO.92Aug16132245@mari.StOlaf.edu>, quanstro@mari (goon) writes:
- >In article <1992Aug16.052157.1991@organpipe.uug.arizona.edu> dave@cs.arizona.edu (Dave Schaumann) writes:
- >
- > >> Does any one know how to raise power of possibly 100 digits
- > >>to possibly 100 digits. Any algorithm or code will be appriciated.
- > >
- > >Is there any hope of solving this?
- >
- > Only if you're willing to give up most of the significant digits.
- [...]
- >
- >You just contradicted yourself. It is possible. It just takes more
- >memory and more programming (you can't expect the hardware to handle
- >this sort of case). Check out the man page for mp (a set of arbitrary
- >precision arith. functions) if you are on a UNIX system. There is also
- >a GNU version of these functins.
-
- Take a look at the specification again. We're talking about calculations
- that will yield results with 10 ** 10 ** 100 digits. Try to do that with
- a so-called `arbitrary precision' software package, and you'll find out
- that it wants memory for that precision. We're talking about numbers so
- hugely vast we can't even talk about how many *digits* they have without
- using exponents! A megabyte has (about) 10**6 bytes in it, so we're talking
- about 10**94 megabytes just to hold the result. Suppose you can load 1
- megabyte in a 10**-12 seconds (new warp-drive technology), it would take you
- 10**78 seconds to load your value. That's more than 10**71 years.
-
- So I restate my point: yes, you can write software to deal with numbers
- that large, but NOT without dropping 99.9% of your accuracy.
-
- --
- Dave Schaumann dave@cs.arizona.edu
-