(12C Platinum) GAMMA FUNCTION - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (12C Platinum) GAMMA FUNCTION (/thread-13230.html) |
(12C Platinum) GAMMA FUNCTION - Gamo - 07-03-2019 07:58 AM This program was adapted form HP-19C Solutions Handbook page 31 [Reference: Gamma Function, John Ulissides. "65 Notes," V 3 N 10, p. 37.] As stated in the handbook this program approximates the gamma function for 0<X≤61 with eight digit accuracy over most of the range. In this case this program use less PI significant digit than the 19C build in PI function so this program will give out the most to five digit accuracy. ------------------------------ Equation: GAMMA(x) = e [LN(√2Pi/X) + X (LN(X) - X + A)] Where A = [1- 1/30(X^2) + 1/105(X^4))(1/12(X))] ------------------------------- Example: FIX 5 1! 1 [R/S] display 1.00000 0.5! .5 [R/S] display 1.77245 5.25! 5.25 [R/S] display 35.21161 7! 7 [ENTER] 1 [+] display 8 [R/S] display 5040.00021 ------------------------------ Program: HP-12C Platinum on RPN mode Code:
Gamo |