boehm@parc.xerox.com (Hans Boehm) (02/12/91)
tif@doorstop.austin.ibm.com (Paul Chamberlain) writes: >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 I can't resist using this as an opportunity to announce the availability of a semi-portable version of Vernon Lee's and my desk calculator utility. It uses demand-driven evaluation to guarantee accuracy to whatever number of digits is required. (Try ln((PI + exp(-500)) - PI.) It also uses better algorithms to compute easy things like integer factorials. 10000! takes 31 cpu seconds on an RS/6000 model 320 (with pieces unoptimized, since the optimizer ran out of memory.) Most of that is spent converting the result from binary to decimal. The calculator is available by anonymous ftp from arisia.xerox.com:~ftp/pub/C_calc.tar.Z It runs on Sun 3s, Sun4s, RS/6000s, MIPS machines, and some others. (DECstations may take some work. Send mail if you need a DECstation version.) A port to other 32 bit byte addressible UNIX boxes shouldn't be hard. (The underlying large integer package is the one from INRIA and DEC PRL. They request that you inform them when you pick up a copy, so they can keep track of who has copies of their package. Instructions included.) Hans-J. Boehm (boehm@xerox.com)