The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Incomplete Gamma Function
12-18-2013, 06:02 AM (This post was last modified: 01-17-2014 05:19 AM by Namir.)
Post: #1
Incomplete Gamma Function
This program implements an incomplete Gamma function base don an HP-25 program by Peter Henrici.

Memory Map

R0 = X
R1 = A
R2 = L(n-2)
R3 = L(n-1)
R4 = s
R5 = gamma(n)
R6 = n
R7 = tolerance

Listing

Code:
1 LBL a
2 STO 7
3 R/S
4 LBL A
5 STO 1
6 X<>Y
7 STO 0
8 CLX
9 STO 2
10 STO 4
11 1
12 STO 3
13 STO 6
14 RCL 1
15 RCL 0
16 Y^X
17 STO 5
18 RCL 1
19 EXP
20 STO/ 5
21 LBL 0
22 RCL 5
23 RCL 6
24 RCL 0
25 -
26 STO* 5
27 1
28 -
29 RCL 3
30 RCL 2
31 -
32 *
33 RCL 6
34 RCL 1
35 +
36 RCL 3
37 STO 2
38 *
39 +
40 RCL 6
41 /
42 STO 3
43 RCL 2
44 *
45 /
46 STO+ 4
47 PAUSE
48 ABS
49 RCL 7
50 X<>Y
51 X<=Y?
52 GTO 1
53 1
54 STO+ 6
55 RCL 6
56 STO/ 5
57 GTO 0
58 LBL 1
59 RCL 4
60 R/S
61 GTO A


Usage


1. Enter the tolerance value and press [f][A]. The program automatically resumes with step 2.
2. Enter the values for A and X, and then press [A].
3. The program pauses to display the improvements in the calculated incomplete gamma function. When these improvements are less than the tolerance value, the program displays the result. If you press [R/S] after viewing the value of the incomplete gamma, the program flow resumes with step 2.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Incomplete Gamma Function - Namir - 12-18-2013 06:02 AM
RE: Incomplete Gamma Function - bshoring - 03-26-2015, 10:41 PM
RE: Incomplete Gamma Function - Dieter - 03-26-2015, 11:10 PM
RE: Incomplete Gamma Function - bshoring - 03-27-2015, 07:26 PM
RE: Incomplete Gamma Function - Dieter - 03-29-2015, 06:18 PM



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