Re: Long numbers programming
- From: "Michael Mattias" <michael.mattias@xxxxxxx>
- Date: Tue, 16 May 2006 00:39:56 GMT
"Peter Lacey" <lacey@xxxxxxx> wrote in message
news:44690ACE.512FB30A@xxxxxxxxxx
I'm doing a hobby project: looking at the patterns in the nth digit of
the powers of a number to see what patterns there are, and I need to be
able to handle very long numbers to make it worthwhile - more than 31
digits, anyway. Can anyone point me to a good code sample for this?
(In COBOL, of course!)
It's not in COBOL, but if you go to my web site at
http://www.talsystems.com, click on "tech corner", and download file
FACTOR.ZIP, there is a BASIC-language tutorial I created which does the
factorials of all the integers up to 100... with total 156 digit accuracy
(easily expandable to more digits).
I've always said well-written BASIC looks like well-written COBOL, so maybe
between the code provided and the text tutorial where I explain what I am
doing you can convert what I did into COBOL....
It's an idea... especially for someone with a hobbyist's interest!
(Bonus: I think you will find the way I did this lends itself to pattern
analysis.. because I did it all with character strings stored in tables!)
(And yes, it IS well-written BASIC!) (Although you are of course free to
make your own judgement about that).
--
Michael Mattias
Tal Systems, Inc.
Racine WI
mmattias@xxxxxxxxxxxxxx
.
- Follow-Ups:
- Re: Long numbers programming
- From: Peter Lacey
- Re: Long numbers programming
- References:
- Long numbers programming
- From: Peter Lacey
- Long numbers programming
- Prev by Date: Re: abortive exiting
- Next by Date: Re: abortive exiting
- Previous by thread: Re: Long numbers programming
- Next by thread: Re: Long numbers programming
- Index(es):
Relevant Pages
|