Double factorial [wp34s]
|
02-12-2016, 12:03 AM
Post: #1
|
|||
|
|||
Double factorial [wp34s]
Code:
Program A: double factorial. This uses the formula used by Wolfram Alpha: \[x!!=2^{\frac{x}{2}-\frac{\cos \left ( \pi x \right )-1}{4}}\times \pi ^{\frac{\cos \left ( \pi x \right )-1}{4}}\times\left ( \frac{x}{2} \right )!\] 4 A --> 8 6 A --> 48 7.77 A --> 290.3223156096666 8.88 +/- A --> 0.01106808239125682 3.33 +/- A --> -1,065802995433050 5 +/- A --> 0.3333333333333334 Program B: rising double factorial. 9.8 ENTER 3 B --> 1595.832000000000 ; 9.8 * 11.8 * 13.8 = 1595.832 8.1 ENTER 4 B --> 13957.60410000001 ; 8.1 * 10.1 * 12.1 * 14.1 = 13957.6041 Program C: falling double factorial. 7.7 ENTER 2 C --> 43.88999999999996 ; 7.7 * 5.7 = 43.89 6.6 ENTER 3 C --> 78.93600000000006 ; 6.6 * 4.6 * 2.6 = 78.936 Program D: double factorial (integer arguments). This and programs B and C uses a more simple formula found at Wikipedia. 5 +/- D --> 0.3333333333333334 3 +/- D --> -1 4 D --> 8.000000000000001 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)