[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LOGO-L> Xmas - The Gift of Life - Conway's +...




On Thu, 24 Dec 1998, Bob Gorman wrote:

> I compressed the files, into a ZIP of 28K. email me if your interested. If
> enough are, I can either post it or put it on my own webpage
> http://kncell.org.
> 
I would be interested in acquiring that archive :)

> computer language out there cuts out at 10-12 digits and goes to E-notation.
> But I wanted to know exactly how many hands were possible! 
> 
Hmmmm... In the UNIX world, we have a neat tool called "BC". It receives
input in infix notation and has a little math language similar to C. The GNU
version of it (www.gnu.org) can handle a scale as big as the available memory
(On my computer, I can easily handle a scale >40 000 000 (40 millions)) and
the factorial problem for the solitaire game can be represented as:

------
digimelt:~# bc
bc 1.04
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.


define f (x) {
 if (x <= 1) return (1);
 return (f(x-1) * x);
}

scale = 200000
f(52)
80658175170943878571660636856403766975289505440883277824000000000000

quit

------ 

This seems fair enough and 'bc' is standard on all UNIX systems > SVR3 as far
as I know (Including also BSD releases of the same era).

	Regards,

--
Tennessee Carmel-Veilleux (Coordonator of Digital Meltdown)
veilleux@ameth.org (www.ameth.org/~veilleux) ICQ ID : 8604827
Support Linux ! (www.linux.org;www.gnu.org) 1.99$ CD->(www.cheapbytes.com)
||*|| This message was written in Canada / Ce message a ete ecrit au Canada



---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home