From: Richard F. <fa...@be...> - 2014-04-23 19:14:38
|
On 4/23/2014 11:31 AM, Scott Hughes wrote: > > Thanks for answering. I am comparing the results to other similar > calculations. Unfortunately I need to be able to review both rounded > and full results. eg. (7^12345678+8^2345678) / (9^5678901 + 3^2334555) > You can get an approximate result by using bigfloats. If you write (7.0b0^12345678+8.0b0^2345678) / (9.0b0^5678901 + 3.0b0^2334555); The answer comes out 3.462179964245316b5014259 That is, 3.46 ... X 10^5014259 If you compute the numerator and denominator separately, you learn they have 10433308 and 5014259 decimal digits, respectively. So an exact answer will probably display with some 15 million characters. How do you plan to compare these characters with other "similar calculations"? You can easily calculate the last few digits, say: modulus:100 rat(7)^12345678 gives -11 so the last 2 digits are 89. Good luck with your numerology. RJF > *From:*Richard Fateman [mailto:fa...@be...] > *Sent:* April-23-14 2:11 PM > *To:* Scott Hughes; <max...@li...> > *Subject:* Re: [Maxima-discuss] Maxima (lisp on Mac) - heap exhausted > > what do you plan to do with a number raised to the power 60,000,000? > > If you are computing it in order to then reduce it modulo some other > number, > then there is a better way to do it. > > > > On 4/23/2014 6:34 AM, Scott Hughes wrote: > > Firstly, I'm not a programmer and only recently started to use > Maxima (command line). I don't know anything about lisp. I'm > running Maxima on a Mac but also on a PC through Windows. Both are > the command line version. > > I only need to use Maxima for a few basic operations, primarily > small numbers raised to large (at least 8) exponents. Aside from > that, I'm using the round and asksign commands. > > I'm encountering "heap exhausted" errors once my exponents get > beyond about 60 000 000 and have looked in manual and forums for > help. There is reference to changing heap size but I didn't > understand the command or even how to enter it. Can anyone help me > with very explicit instructions ? I'm not concerned with the > length of time the calculations take, just don't want them to > crash before they complete. > |