Newsgroups: fj.lang.misc
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!wnoc-sfc-news!wnoc-kyo-news!aist-nara!odins-suita!chiba-ns!news.chiba-u.ac.jp!eclnews!nttiros!cosmo!lepus!tyo-noc-news!news3-tokyonet!tokyonet.ad.jp!news.sainet.or.jp!spinnews!spin-hsd0-tky!news-relay.jpn!hpujjpo!hpscit.sc.hp.com!sdd.hp.com!news.sgi.com!su-news-hub1.bbnplanet.com!news.bbnplanet.com!cam-news-hub1.bbnplanet.com!uunet!in1.uu.net!192.244.176.52!news.iij.ad.jp!news.yamabiko.or.jp!gatortia!sakunami!ayashi!kaneko
From: kaneko@ccedu.sendai-ct.ac.jp (Yutaka Kaneko)
Subject: Re: about calculation of factorial
X-Nntp-Posting-Host: saikachi
Message-ID: <E1yw7y.GK3@ayashi.cc.sendai-ct.ac.jp>
Lines: 37
Sender: news@ayashi.cc.sendai-ct.ac.jp (SNCT NetNews Manager)
Organization: Sendai National College of Technology
X-Newsreader: mnews [version 1.18PL3] 1994-08/01(Mon)
References: <696D5063.96Dec4164511@suzuka.cfi.waseda.ac.jp>
Date: Fri, 6 Dec 1996 01:02:22 GMT
Xref: galaxy.trc.rwcp.or.jp fj.lang.misc:1683
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.lang.misc&nb=1683&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

  $B6b;R!w@gBfEEGH$G$9!#(B

In article <696D5063.96Dec4164511@suzuka.cfi.waseda.ac.jp>
696d5063@cfi.waseda.ac.jp writes:
>> $B%]%"%=%sJ,I[$N%0%i%U$r:n@.$9$k$?$a$K!"3,>h$N7W;;%W%m%0%i%`$r:n@.$7$F$*$j$^$9!#(B
>> 
>> $B$A$J$_$K!"%]%"%=%sJ,I[$N<0$O(B
>> f(x)=(m^x)*exp(-m)/x!
>> $B!!(Bm$B!'J?6Q(B
>> $B!!(Bx$B!'3NN(JQ?t(B
>> 
>> $B$7$+$7!"(BTurbo pascal$B$N%W%m%0%i%`$G$O!"JQ?tDj5A$K$*$$$F!"(Blongint$B$G$d$C$F$b9b!9(B12$B$N3,>h$^$G$7$+7W;;$G$-$^$;$s!#%*!<%P!<%U%m!<$7$F$7$^$$$^$9!#(B
>> $B;d$H$7$^$7$F$O!"(B180$B$N3,>h$^$G7W;;$7$?$$$N$G$9$,!#(B

  $B3,>h$r7W;;$7$?$$$J$i<B?t$G!"(B

    logf = log(1) + log(2) + log(3) + ... + log(n)

$B$r7W;;$7$F$d$l$P$$$$$G$7$g$&!#$b$A$m$s!"Ez$($O(Bexp(logf)$B$G$9(B
$B$,Ez$($O%*!<%P!<%U%m!<$9$k$G$7$g$&$+$i!"$`$7$m!"(B

    f(x)=(m^x)*exp(-m)/x!

$B$r(B

    log(f(x)) = x*log(m) - m - logf

$B$HJQ7A$7$F$7$^$$!":G8e$NEz$($N(Bexp$B$r<h$l$P%*!<%P!<%U%m!<$r(B
$B$*$3$5$:$K$9$_$^$9!#(B

  $B<B:]$K$O!"(Bn$B$,==J,Bg$-$$>l9g!"3,>h(B($B$^$?$O%,%s%^4X?t(B)$B$r5a$a(B
$B$k6a;w<0$r;H$C$?$[$&$,7W;;$,B.$/$F:Q$_$^$9!#(B

main(i,j){j=time(0);do for(i /*      $B6b;R(B $BM5(B(KANEKO Yutaka)             */
=0;i<79;i++)printf(j%512>>4? /* Sendai National College of Technology   */
" ":"*"),j=j*331+113;while(  /*    kaneko@cc.sendai-ct.ac.jp            */
printf("\n\033[H\033[1L"));} /* $B6d;HEL(Bx10 $B6b;HEL(Bx0 $B6d%-%g%m(Bx0 $B6b%-%g%m(Bx1*/
