HP15c continued fraction for Ln(Gamma)



#2

Hi all,

In the "Advanced functions handbook" for the HP-15C, pages 65ff, there is a continued-fraction approximation for the function Ln(Gamma(x)). The first five terms of the expansion are given as fractions, the last two as decimal fractions.

I've managed to track down the fractions that these decimals represent:

a5 = 22,999/22,737 ~= 1.011523068126842

a6 = 29,944,523/19,733,142 ~= 1.517473649153287

I'm also struck by an oddity in the program. 6 is stored in the indirect register, and before the loop, a6 is recalled. As a result, the innermost fraction is a6/(x+a6). I'm not terribly familiar with continued fractions, but it looks suspicious to me. However, changing the initial value of the indirect register to 5 (meaning that the innermost fraction becomes a5/(x+a6) and the continued fraction one level smaller) changes the last digit in the real example -- Ln(Gamma(4.2)) -- and the value produced by the version in the book is correctly rounded in the last digit, when letting the WP-34S serve as reference.

So, my question is: Is the example correct, and if so: why? A shout of "RTFM" is acceptable, if it is accompanied with a suggestion of how to find a version of the FM that explains how the CF can be evaluated, i.e. how one should begin.

Thanks,

--T


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime: Long integers (continued) Helge Gabert 2 202 11-07-2013, 11:24 AM
Last Post: Helge Gabert
  HP Prime program: rounding to a fraction Patrice 3 207 10-31-2013, 06:16 AM
Last Post: Joe Horn
  1984 HP15C rattles Footloose (Illinois) 4 252 10-15-2013, 09:43 PM
Last Post: BobVA
  HP Prime emulator: Gamma function Stephan Matthys 28 922 08-21-2013, 04:52 PM
Last Post: Namir
  What is the Gamma approximation you use? Namir 21 744 08-05-2013, 07:14 AM
Last Post: Namir
  SandMath routine of the week: Inverse Gamma Function Ángel Martin 39 1,264 03-24-2013, 08:19 AM
Last Post: peacecalc
  HP15c LE emulator with unlimited number of activations Nick_S 23 944 01-24-2013, 03:59 PM
Last Post: Victor Quiros
  battery test for the HP15c Limited Edition Guido (Canada) 3 216 01-03-2013, 08:17 AM
Last Post: Jeff O.
  uRCL* on HP15C Csaba Tizedes (Hungary) 2 172 12-29-2012, 06:09 PM
Last Post: Luiz C. Vieira (Brazil)
  New empirical fit for ln(x) Namir 0 93 12-11-2012, 12:49 PM
Last Post: Namir

Forum Jump: