Re: Long numbers programming



"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


.



Relevant Pages

  • Re: Long numbers programming
    ... Michael Mattias wrote: ... the powers of a number to see what patterns there are, ... It's not in COBOL, but if you go to my web site at ... (easily expandable to more digits). ...
    (comp.lang.cobol)
  • [OT] Top / bottom possitng (was: COBOL "non-myth" confirmed - Index and subscripts (MF on Wi
    ... about patterns and use them frequently, ... Compared to the pattern language that you've seen in A Pattern Language ... of time, to be coherent, useful, and to have living structure. ... With Cobol, ...
    (comp.lang.cobol)
  • Re: determinism, freewill, chaos, and circular causality
    ... Pi is expanded to zillions of digits by a fairly simple ... a million digits to a truly random string of a million digits and then ... There are intelligent patterns which are not distinguishable from ... Even if the brain is currently selecting "random behavior" (which I don't ...
    (comp.ai.philosophy)
  • Re: determinism, freewill, chaos, and circular causality
    ... Pi is expanded to zillions of digits by a fairly simple ... a million digits to a truly random string of a million digits and then ... There are intelligent patterns which are not distinguishable from ... Even if the brain is currently selecting "random behavior" (which I don't ...
    (comp.ai.philosophy)
  • Re: Counting patters
    ... you can do this without a UDF by copying this formula into AG1: ... Filter this column for "duplicate", ... number and combine the digits with powers of 2 to form a number. ... bring these patterns together and eliminate the repeated ones. ...
    (microsoft.public.excel.misc)