No one asked what I was doing with 120,526,770 records

Kenneth Brody kenbrody at bestweb.net
Sat Feb 12 19:20:52 PST 2005


Quoting Fairlight <fairlite at fairlite.com>:

> This public service announcement was brought to you by Michael J. Mc
> Avoy Sr.:
> > Jezze,
> >
> > I sure thought at least one of ya would want to
> > know what I was doing with all these dang records.
> >
> > Hint....
> >
> > 53/5*52/4*51/3*50/2*49*42
>
> 53/5*52/4*51/3*50/2*49*42 = 113704500
>
> Erm...the result bc gives doesn't ring a bell.  I'll go with my default
> answer of, "Taking up disk space?"
[...]

It's a "quirk" of bc that you're getting the wrong result.  Because you
are running with the default "scale=0", all intermediate calculations
are rounded to integers:

53/5*52/4*51/3*50/2*49*42
113704500
scale=10
53/5*52/4*51/3*50/2*49*42
120526770.0000000000


--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list