Faster inverse gamma and factorial for the WP 34S

02162015, 07:07 AM
Post: #31




RE: Faster inverse gamma and factorial for the WP 34S
(02082015 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 highprecision 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 JeanMarc Baillard's HP41 digamma code". Here the chosen method (use an asymptotic series expansion up to x^{8} 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 e^{x} RCLx L does the trick just as well. Dieter 

« Next Oldest  Next Newest »

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