Friday, August 25, 2017

TI-84 Plus CE and Casio fx-3650P: Factorial of n! and (n + 1/2)!

TI-84 Plus CE and Casio fx-3650P:  Factorial of n! and (n + 1/2)!

Factorial Formulas

The factorial for any non-negative integer n is computed by:

n! = n * (n-1) * (n-2) * … * 1
where 0! = 1

All scientific calculators with the factorial function will calculate the factorial of any positive integer up to 69 (253 for calculators with an upper limit of 10^499). 

When the factorial required for numbers in the form n/2 (example:  0.5, 1.5, 2.5, 3.5, and so on), the formula is:

(n/2)! = √π * ((n/2) * (n/2 – 1) * (n/2 – 2) * … * 1/2 )
‘where 1/2! = √π/2 ≈ 0.8862269255

When n is not an integer, we usually have to rely on the Gamma function using the relation Γ(n + 1) = n!.  This will not be covered in this post.


TI-84 Plus CE Program FACTHALF

The program FACTHALF accepts either n or n/2 as an input, where n is a non-zero integer.

"2017-08-24 EWS"
"NIST.GOV"
Disp "N! or (N/2)!"
Prompt X
If fPart(X/2)≠0.5
Then
X!→F
Else
X/2→F
Repeat X=­0.5
X-1→X
X*F→F
End
F*√(π)→F
End
Disp F

Casio fx-3650P Program for (n/2)!

The program assumes that you calculating (n/2)!.  Valid arguments are 0.5, 1.5, 2.5, etc.

(36 steps)
? → X: 1 → Y: Lbl 1: XY → Y : X -1 → X: X ≠ -.5 Goto 1:
Y √π → Y

Table of Some (n/2)! Values

0.5! = (1/2)! ≈ 0.886226925
1.5! = (3/2)! ≈ 1.329340388
2.5! = (5/2)! ≈ 3.32335097
3.5! = (7/2)! ≈ 11.6317284
4.5! = (9/2)! ≈ 52.34277778
5.5! = (11/2)! ≈ 287.8852778

Source:

“6.3.2.  What Are Variables Control Charts?”  Engineering Statistics Handbook.  http://www.itl.nist.gov/div898/handbook/pmc/section3/pmc32.htm
Retrieved August 24, 2017

Eddie


This blog is property of Edward Shore, 2017.

Dozenal RPN Calculator App for Android for Android Smartphones and Numworks Beta Firmware Version 25

  Dozenal Calculator App for Android Smartphones and Numworks Beta Firmware Version 25 Dozenal Calculator App for Android Smartphones T...