Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!clyde.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!cs.utexas.edu!ut-emx!ibmchs!auschs!awdprime!doorstop.austin.ibm.com!tif From: tif@doorstop.austin.ibm.com (Paul Chamberlain) Newsgroups: comp.unix.programmer Subject: Re: factorial... Message-ID: <5165@awdprime.UUCP> Date: 7 Feb 91 14:55:07 GMT References: <2853@mtecv2.mty.itesm.mx> Sender: news@awdprime.UUCP Reply-To: tif@doorstop.austin.ibm.com (Paul Chamberlain) Distribution: comp Organization: IBM AWD, Austin Lines: 23 josevela@mtecv2.mty.itesm.mx (Jose Angel Vela Avila) writes: > We are having trouble trying to do the factorial of 10000 :-) I don't know if the smiley makes this a joke or not but I can't resist a challenge. A RISC System/6000 Model 930 running bc did this in: real 14m25.13s user 14m10.08s sys 0m3.46s and came up with 35660 digits, available if you really want them. Here is the bc program just in case you're curious. define f(n) { auto x x = 1 for (n; n>1; n--) { x = x * n } return(x) } f(10000) quit Paul Chamberlain | I do NOT speak for IBM. IBM VNET: PAULCC AT AUSTIN 512/838-9662 | ...!cs.utexas.edu!ibmchs!auschs!doorstop.austin.ibm.com!tif