Post Reply 
Faster inverse gamma and factorial for the WP 34S
02-16-2015, 07:07 AM
Post: #31
RE: Faster inverse gamma and factorial for the WP 34S
(02-08-2015 07:02 AM)Paul Dale Wrote:  If the digamma route is interesting and custom images are acceptable, I've implemented this function both in xrom (trunk/xrom/digamma.wp34s) and native C (trunk/unused/digamma.c).

I would support this suggestion of a high-precision digamma function. Looking at the current code that comes with the emulator (both in the lib and the source in digamma.wp34s) the implementation seems to be a "based on Jean-Marc Baillard's HP-41 digamma code". Here the chosen method (use an asymptotic series expansion up to x8 for all x>8) is fine because it returns approx. 10 valid digits, i.e. the 41's working precision. On a 34s we should expect more. ;-)

Example:
Ψ(1) = –γ = –0,57721 56649 01532 9. The current code returns –0,57721 56648 94767 0.
Ψ(2) =1–γ = –0,42278 43350 98467 1. The current code returns –0,42278 43351 05233 0

So an accurate digamma function still is missing. On the other hand the one or other 34s function is, hmmm... "optional". Consider the inverse of Lambert's W: a simple ex RCLx L does the trick just as well.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Faster inverse gamma and factorial for the WP 34S - Dieter - 02-16-2015 07:07 AM



User(s) browsing this thread: 4 Guest(s)