Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!travelers.mail.cornell.edu!news.kei.com!news.mathworks.com!newsfeed.internetmci.com!howland.reston.ans.net!usc!news.isi.edu!gremlin!charming!mcohen
From: mcohen@charming.nrtc.northrop.com (Martin Cohen)
Subject: Re: Bignum problem
Message-ID: <DG8vBy.DEM@gremlin.nrtc.northrop.com>
Sender: news@gremlin.nrtc.northrop.com (Usenet News Manager)
Organization: Northrop Grumman Automation Sciences Laboratory, Pico Rivera, CA
References: <459d03$1pm@caleddon.dircon.co.uk>
Date: Tue, 10 Oct 1995 17:59:57 GMT
Lines: 40

In article <459d03$1pm@caleddon.dircon.co.uk> Simon Brooke <simon@rheged.dircon.co.uk> writes:
>js62314@pegasus.cc.ucf.edu (Jason Soukeras) wrote:
>>Hey...I don't have access to lisp nor do I know how to program in it but 
>>as far as I know it is the only language that will allow me to get the 
>>mathematical answer i'm looking for.
>>Here is what I would like to know...
>>If I figure out what 1000! is
>>and divide it by a number that is 3 digits shorter... and then do the 
>>same thing w/ another number that is 3 digits shorter but one more than 
>>the first...will the portion of the answer to the left of the decimal 
>>place be the same?
>
>>I realize I am asking a lot but would GREATLY appreciate it if someone 
>>with 10 minutes or so on his/her hands would email me and let me know
>>or email me for clarification of the question I have if I haven't been clear.

Let m = 1000!, L = floor(log10(m)),
so 10^L <= m < 10^(L+1).

A number u is 3 digits shorter if int(log10(u)) = L-3
or 10^(L-3) <= u < 10^(L-2).

My interpretation of the question is this:

Is floor(m/u) = floor(m/(u+1)).

My answer: no!

Choose u so that it exactly divides m. For example,
choose u = m/1000. This is ok since m = 1000!.

Then m/u is an integer (in fact, 999!),
so that m/(u+1) < 999!.

If m is arbitrary and has no divisors up to 1000,
the question is a little harder.
-- 
Marty Cohen (mcohen@nrtc.northrop.com) - Not the guy in Philly
  This is my opinion and is probably not Northrop Grumman's!
          Use this material of your own free will
