Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!mcnc!gatech!hubcap!ncrcae!secola!jmartin From: jmartin@secola.Columbia.NCR.COM (John Martinez) Newsgroups: comp.compression Subject: Re: IP gnitaluclaC rof margorP (Was Re: Program for Calculating PI) Summary: what does this mean???? Message-ID: <332@secola.Columbia.NCR.COM> Date: 7 Apr 91 16:04:41 GMT References: <28916@dime.cs.umass.edu> <1991Apr6.103501.27193@netcom.COM> Reply-To: jmartin@secola.Columbia.NCR.COM (John V. Martinez) Organization: NCR NPD Columbia Lines: 33 > [some question about generating the digits of PI in reverse order] Ok, I'll bite: What the blazes does this question mean? _Surely_ the original poster is aware that PI is irrational* and that irrational numbers have NO LAST DIGIT; so, strictly speaking, it is impossible to generate the digits of PI in reverse order, since you would have no starting point! On the other hand, if the poster meant "how can I generate the first n digits of PI in reverse order?" then I don't understand what is so hard about the problem: several people have already posted programs which will generate the first n digits in forward order, so use one of these, pushing each digit onto at stack, then when you have calculated your n digits, pop them off the stack one at a time to get your reverse order (granted, if you have enough digits, the stack implementation may need to slough stuff off to disk, depending on your operating system, etc. This _might_ be a challenge for a beginner.) BTW, I _do_ think this whole PI / e thread of discussion is interesting, but would some clever person try and relate it to data compression? :) -(-- John * At least, I am _told_ PI is irrational, and I personally believe it, although I have never seen a proof - not that I would understand this proof if it came up and bit me :*) -- John V.Martinez NCR Network Products Division jmartin@secola.Columbia.NCR.COM (803)739-7671 vplus:633-8854