home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / bit / listserv / statl / 2313 < prev    next >
Encoding:
Text File  |  1993-01-06  |  3.0 KB  |  84 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!usc!howland.reston.ans.net!bogus.sura.net!darwin.sura.net!paladin.american.edu!auvm!V9.HANSCOM.AF.MIL!SIGNORINOC
  3. Message-ID: <STAT-L%93010609444945@VM1.MCGILL.CA>
  4. Newsgroups: bit.listserv.stat-l
  5. Date:         Wed, 6 Jan 1993 09:20:00 EST
  6. Sender:       STATISTICAL CONSULTING <STAT-L@MCGILL1.BITNET>
  7. From:         "SI00::SIGNORINOC" <SIGNORINOC%SI00.decnet@V9.HANSCOM.AF.MIL>
  8. Subject:      Re: calculators and computers: precision
  9. Lines: 73
  10.  
  11.                           E L E C T R O N I C   M A I L
  12.                      (DDN Host Address:  V3.HANSCOM.AF.MIL)
  13.  
  14.                                         Date:      06-Jan-1993 09:19
  15.                                         From:      Lt Curtis S. Signorino
  16.                                         Username:  SIGNORINOC
  17.                                         Dept:      ESC/XRPM
  18.                                         Tel No:    617-377-7483 (DSN 478)
  19.  
  20. TO:  _WINS%                               ( _DDN[STAT-L@VM1.MCGILL.CA] )
  21.  
  22.  
  23. Subject: Re: calculators and computers: precision
  24.  
  25.  
  26.  
  27.  
  28.  -----------------------------A T T A C H M E N T------------------------
  29.  
  30.                           E L E C T R O N I C   M A I L
  31.                      (DDN Host Address:  V3.HANSCOM.AF.MIL)
  32.  
  33.                                         Date:     06-Jan-1993 09:17
  34.                                         From:     Lt Curtis S. Signorino
  35.                                                   SIGNORINOC
  36.                                         Dept:     ESC/XRPM
  37.                                         Tel No:   617-377-7483 (DSN 478)
  38.  
  39. TO:  VMSMail User WINS%"<DANIEL%UHU       (
  40.  WINS%"<DANIEL%UHUNIX.BITNET@VM1.MCGILL.CA>"@SI09@MRGATE )
  41.  
  42.  
  43. Subject: Re: calculators and computers: precision
  44.  
  45.     Someone brought up the difficulty of computing large factorials.
  46.     Many times the need to compute large factorials or large gamma
  47.     function values is for an expression containing a ratio of
  48.     factorials or gamma function values.  While the individual
  49.     factorials or gamma function values will cause an overflow, the
  50.     resulting ratio is quite manageable.  The trick, then, is to
  51.     compute the ratio without having to compute the original numerator
  52.     or denominator.  Using the relationships
  53.  
  54.          X = exp( ln(X) )
  55.  
  56.     and
  57.  
  58.          ln(X1/X2) = ln(X1) - ln(X2),
  59.  
  60.     the factorial and gamma ratios can be computed as
  61.  
  62.          X1!
  63.          -- = exp( lnfact(X1) - lnfact(X2) )
  64.          X2!
  65.  
  66.     and
  67.  
  68.          Gamma(X1)
  69.          --------- = exp( lngamma(X1) - lngamma(X2) )
  70.          Gamma(X2)
  71.  
  72.     where lnfact() and lngamma() are numerical methods-based
  73.     functions (using something like Sterling's formula for lngamma[]).
  74.     These functions can be found in a number of numerical methods
  75.     books.  I believe _Numerical_Recipes_ has both.
  76.  
  77.          I've found the precision of the above methods to be
  78.     acceptable for my research.  For those who are familiar with the
  79.     above, have you had any problems with poor precision due to the
  80.     numerical methods?
  81.  
  82.     curt signorino
  83.     signorinoc@v3.hanscom.af.mil
  84.