home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming
- Path: sparky!uunet!ukma!netsys!pagesat!spssig.spss.com!news.oc.com!convex!dodson
- From: Dave Dodson <dodson@convex.COM>
- Subject: Re: Questions
- Originator: dodson@bach.convex.com
- Sender: usenet@news.eng.convex.com (news access account)
- Message-ID: <1993Jan28.001145.1802@news.eng.convex.com>
- Date: Thu, 28 Jan 1993 00:11:45 GMT
- Reply-To: dodson@convex.COM (Dave Dodson)
- References: <peterd.727578786@tscc2> <1993Jan24.055343.2392@organpipe.uug.arizona.edu> <1993Jan27.205431.16177@ncsu.edu>
- Nntp-Posting-Host: bach.convex.com
- Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 19
-
- In article <1993Jan27.205431.16177@ncsu.edu> tmjones@eos.ncsu.edu (@large(Are you Object-Oriented?)) writes:
- >
- >Question1: How can I calculate large factorials like (90!)?
-
- The following bc program does it:
-
- f=1
- for(i=2;i<=91;i++) { f*=i }
- f
- 135200152767840296255166568759495142147586866476906677791741734597153\
- 6707715599947656852839547504494277511683367680081920000000000000000000\
- 00
-
- (bc, a UNIX program, is an arbitrary-precision arithmetic engine.)
-
- ----------------------------------------------------------------------
-
- Dave Dodson dodson@convex.COM
- Convex Computer Corporation Richardson, Texas (214) 497-4234
-