Re: computing 20! all the way
Re: computing 20! all the way
- Subject: Re: computing 20! all the way
- From: "John W. Baxter" <email@hidden>
- Date: Fri, 12 Nov 2004 09:43:02 -0800
On 11/11/2004 21:38, "Chris Espinosa" <email@hidden> wrote:
> On Nov 11, 2004, at 6:44 PM, Brian Johnson wrote:
>
>> Thanks to those who suggested (1)Maple, (2) python (compact!), (3) bc
>> (new to me), and (4) reduced manual calculation. As a "vanilla
>> applescript" exercise I took a crack at doing it the "old fashioned
>> way" (aka, the hard way) by mimicking long-form multiplication on two
>> arbitrary lists of base-10 digits. I'm happy to say that they all
>> agree (and if anyone wants an (almost completely genericized) integer
>> product routine for any size integer, email me. It's not very pretty,
>> but it works).
>
> My suggestion is that you should let your daughter do her own homework.
> Going through the process of discovering the above was probably the
> point of the exercise; there's no other reason to assign 20! versus,
> say, 6!.
>
It hasn't yet been pointed out that the correct value was computed for this
problem by the original AppleScript script. (Assuming that the results
presented in the thread for various alternate methods were correct.) At
least one of us compared results. ;-)
The only challenge would be to represent it as a string with the right
number of trailing zeros. Frankly, to automate that in AppleScript is
harder than working around the integer limitations.
20! is close to the end of the line, however...non-zero trailing digits will
be lost "soon".
--John
In the days of slide rules, "everybody" "knew" how many zeros. And "knew"
when something had gone wrong and the result made no sense. Sigh.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden