Quote:

BTW, Richard, I noticed your function that handles negative integers loops when input is negative...




Oops. Posted the wrong (over-golfed!) version.
Code:
Break ON

For $ = -8 to 8
""+$+"! = "+fac($) ?
Next

Function fac($)
$fac=CDbl(IIf($<0,-1,1))
$=$*IIf($<0,-1,1)
While $
$fac=$fac*$
$=$-1
Loop
EndFunction



Gives:
Code:
-8! = -40320
-7! = -5040
-6! = -720
-5! = -120
-4! = -24
-3! = -6
-2! = -2
-1! = -1
0! = 1
1! = 1
2! = 2
3! = 6
4! = 24
5! = 120
6! = 720
7! = 5040
8! = 40320


Quote:

hey, no such thing as a negative factorial




I'm an easy going kind of guy, and I'll provide service to all kind of numbers - real, imaginary, integer, vulgar, positive and negative. I won't stand for positive discrimination on my watch