home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / programm / 3612 < prev    next >
Encoding:
Text File  |  1993-01-27  |  1.4 KB  |  37 lines

  1. Newsgroups: comp.programming
  2. Path: sparky!uunet!ukma!netsys!pagesat!spssig.spss.com!news.oc.com!convex!dodson
  3. From: Dave Dodson <dodson@convex.COM>
  4. Subject: Re: Questions
  5. Originator: dodson@bach.convex.com
  6. Sender: usenet@news.eng.convex.com (news access account)
  7. Message-ID: <1993Jan28.001145.1802@news.eng.convex.com>
  8. Date: Thu, 28 Jan 1993 00:11:45 GMT
  9. Reply-To: dodson@convex.COM (Dave Dodson)
  10. References: <peterd.727578786@tscc2> <1993Jan24.055343.2392@organpipe.uug.arizona.edu> <1993Jan27.205431.16177@ncsu.edu>
  11. Nntp-Posting-Host: bach.convex.com
  12. Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
  13. X-Disclaimer: This message was written by a user at CONVEX Computer
  14.               Corp. The opinions expressed are those of the user and
  15.               not necessarily those of CONVEX.
  16. Lines: 19
  17.  
  18. In article <1993Jan27.205431.16177@ncsu.edu> tmjones@eos.ncsu.edu (@large(Are you Object-Oriented?)) writes:
  19. >
  20. >Question1: How can I calculate large factorials like (90!)?
  21.  
  22. The following bc program does it:
  23.  
  24. f=1
  25. for(i=2;i<=91;i++) { f*=i }
  26. f
  27. 135200152767840296255166568759495142147586866476906677791741734597153\
  28. 6707715599947656852839547504494277511683367680081920000000000000000000\
  29. 00
  30.  
  31. (bc, a UNIX program, is an arbitrary-precision arithmetic engine.)
  32.  
  33. ----------------------------------------------------------------------
  34.  
  35. Dave Dodson                                     dodson@convex.COM
  36. Convex Computer Corporation      Richardson, Texas      (214) 497-4234
  37.