Post Reply 
Double factorial [wp34s]
02-13-2016, 01:36 AM (This post was last modified: 02-13-2016 01:40 AM by Gerson W. Barbosa.)
Post: #12
RE: Double factorial [wp34s]
The following replaces my initial programs. Thank you all for your suggestions, your pointing out my obvious mistakes and for the wp34s instruction set refresh.

Code:

 0001 **LBL B
0002 RCL+ X
0003 DEC X
0004 DEC X
0005 STO+ Y
0006 x[<->] L
0007 **LBL C
0008 STO+ X
0009 RCL- Y
0010 +/-
0011 x[<->] Y
0012 XEQ A
0013 x[<->] Y
0014 XEQ A
0015 /
0016 RTN
0017 **LBL A
0018 z[<->] I
0019 # 1/2
0020 RCL[times] Y
0021 2[^x]
0022 RCL L
0023 x!
0024 [times]
0025 x[<->] Y
0026 (-1)[^x]
0027 DEC X
0028 # 004
0029 /
0030 CNST 86
0031 x[<->] Y
0032 y[^x]
0033 [times]
0034 RCL I
0035 [<->] YZXX
0036 RTN
0037 END

Program A: double factorial.

Program B: rising double factorial.

Program C: falling double factorial.

Rising factorial:

Code:

LBL 01
x<>y
Gamma
X<>Y
RCL+ L
Gamma
x<>y
/
RTN

Falling factorial:

Code:

LBL 02
x<>y
x!
x<>y
+/-
RCL+ L
x!
/
RTN
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Double factorial [wp34s] - Paul Dale - 02-12-2016, 06:27 AM
RE: Double factorial [wp34s] - Dieter - 02-12-2016, 07:49 AM
RE: Double factorial [wp34s] - Dieter - 02-12-2016, 07:54 PM
RE: Double factorial [wp34s] - Paul Dale - 02-13-2016, 12:14 AM
RE: Double factorial [wp34s] - Paul Dale - 02-12-2016, 10:45 AM
RE: Double factorial [wp34s] - Paul Dale - 02-12-2016, 10:33 PM
RE: Double factorial [wp34s] - Paul Dale - 02-13-2016, 10:41 PM
RE: Double factorial [wp34s] - Dieter - 02-15-2016, 07:03 AM
RE: Double factorial [wp34s] - emece67 - 02-13-2016, 12:57 AM
RE: Double factorial [wp34s] - Paul Dale - 02-13-2016, 04:46 AM
RE: Double factorial [wp34s] - Dieter - 02-13-2016, 06:53 AM
RE: Double factorial [wp34s] - Paul Dale - 02-13-2016, 07:05 AM
RE: Double factorial [wp34s] - Dieter - 02-13-2016, 07:00 PM
RE: Double factorial [wp34s] - emece67 - 02-13-2016, 09:15 AM
RE: Double factorial [wp34s] - Gerson W. Barbosa - 02-13-2016 01:36 AM
RE: Double factorial [wp34s] - John Keith - 02-14-2016, 03:24 PM



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