Gamma function for complex numbers

Description

The program presented here calculates the Gamma function for any complex argument, with the exception of negative integers for which the function has no value.
For instance, to calculate the Gamma function for i, key in the following: 1 I f A. After a few seconds, the calculator displays the real part of the result -0.154949828; to view the imaginary part -0.498015669, press Re↔Im. If you wish to clear complex mode after using the program, press CF 8.

Program Resources

Labels

Name Description
 A
 1
 2

Storage Registers

Name Description
 0
 1
 2
 3

Program

Line Display Key Sequence Line Display Key Sequence Line Display Key Sequence
000 064 0 0 128 9 9
001 42,21,11 f LBL A 065 1 1 129 3 3
002 1 1 066 4 4 130 8 8
003 34 x↔y 067 0 0 131 5 5
004 42,21, 2 f LBL 2 068 9 9 132 26 EEX
005 43,30, 1 g TEST x>0 069 8 8 133 6 6
006 22 1 GTO 1 070 2 2 134 16 CHS
007 36 ENTER 071 4 4 135 45 3 RCL 3
008 33 R⬇ 072 45 3 RCL 3 136 42 30 f Re↔Im
009 20 × 073 42 30 f Re↔Im 137 43 35 g CLx
010 43 33 g R⬆ 074 43 35 g CLx 138 45 1 RCL 1
011 1 1 075 45 1 RCL 1 139 6 6
012 40 + 076 3 3 140 40 +
013 22 2 GTO 2 077 40 + 141 10 ÷
014 42,21, 1 f LBL 1 078 10 ÷ 142 30
015 44 1 STO 1 079 40 + 143 1 1
016 42 30 f Re↔Im 080 1 1 144 40 +
017 44 3 STO 3 081 48 . 145 43 26 g π
018 42 30 f Re↔Im 082 2 2 146 2 2
019 34 x↔y 083 3 3 147 20 ×
020 44 0 STO 0 084 1 1 148 11 √x̅
021 42 30 f Re↔Im 085 7 7 149 20 ×
022 44 2 STO 2 086 3 3 150 45 3 RCL 3
023 42 30 f Re↔Im 087 9 9 151 42 30 f Re↔Im
024 7 7 088 5 5 152 43 35 g CLx
025 6 6 089 7 7 153 45 1 RCL 1
026 48 . 090 2 2 154 10 ÷
027 1 1 091 45 3 RCL 3 155 43 12 g LN
028 8 8 092 42 30 f Re↔Im 156 45 3 RCL 3
029 0 0 093 43 35 g CLx 157 42 30 f Re↔Im
030 0 0 094 45 1 RCL 1 158 43 35 g CLx
031 9 9 095 4 4 159 45 1 RCL 1
032 1 1 096 40 + 160 5 5
033 7 7 097 10 ÷ 161 48 .
034 3 3 098 30 162 5 5
035 45 3 RCL 3 099 1 1 163 40 +
036 42 30 f Re↔Im 100 48 . 164 43 12 g LN
037 43 35 g CLx 101 2 2 165 45 3 RCL 3
038 45 1 RCL 1 102 0 0 166 42 30 f Re↔Im
039 1 1 103 8 8 167 43 35 g CLx
040 40 + 104 6 6 168 45 1 RCL 1
041 10 ÷ 105 5 5 169 48 .
042 8 8 106 0 0 170 5 5
043 6 6 107 9 9 171 40 +
044 48 . 108 7 7 172 20 ×
045 5 5 109 4 4 173 40 +
046 0 0 110 26 EEX 174 45 3 RCL 3
047 5 5 111 3 3 175 42 30 f Re↔Im
048 3 3 112 16 CHS 176 43 35 g CLx
049 2 2 113 45 3 RCL 3 177 45 1 RCL 1
050 0 0 114 42 30 f Re↔Im 178 30
051 3 3 115 43 35 g CLx 179 5 5
052 3 3 116 45 1 RCL 1 180 48 .
053 45 3 RCL 3 117 5 5 181 5 5
054 42 30 f Re↔Im 118 40 + 182 30
055 43 35 g CLx 119 10 ÷ 183 12
056 45 1 RCL 1 120 40 + 184 45 2 RCL 2
057 2 2 121 5 5 185 42 30 f Re↔Im
058 40 + 122 48 . 186 43 35 g CLx
059 10 ÷ 123 3 3 187 45 0 RCL 0
060 30 124 9 9 188 10 ÷
061 2 2 125 5 5 189 43 32 g RTN
062 4 4 126 2 2
063 48 . 127 3 3