# Major math error with Grapher

Discussion in 'Mac Apps and Mac App Store' started by Papajohn56, Feb 7, 2008.

1. ### Papajohn56 macrumors 6502

Joined:
Aug 13, 2005
#1
Using a factorial in Grapher results in an incorrect function output, it seems Grapher does the Gamma function rather than the standard step function for factorial. Take a look:

Which gamma is actually defined as:

rather than the true factorial:

2. ### gauchogolfer macrumors 603

Joined:
Jan 28, 2005
Location:
American Riviera
#2
How would you plot a factorial for negative numbers, anyways? Isn't that the whole point of the Gamma function, to account for real and complex numbers? Still, I'm not sure it counts as a 'Major Math Error'. Is there a different function indicator rather than ! that you could use for factorial?

3. ### Papajohn56 thread starter macrumors 6502

Joined:
Aug 13, 2005
#3
Exactly, that's the biggest problem, along with positive decimal factorials.

Joined:
Aug 19, 2007
5. ### gauchogolfer macrumors 603

Joined:
Jan 28, 2005
Location:
American Riviera
#5
Thanks for the link, but I think we both know what the Gamma function is already. The OP would like to know why ! defaults to Gamma and not factorial, I imagine. Maybe it's because factorial is only defined for positive integers, and Grapher can only handle continuous functions? Iono.

6. ### Papajohn56 thread starter macrumors 6502

Joined:
Aug 13, 2005
#6
yeah, I know factorial and gamma are related, but they aren't the same. That's my concern

7. ### MisterMe macrumors G4

Joined:
Jul 17, 2002
Location:
USA
#7
The gamma function is defined over the range of negative non-integers, zero, and positive numbers. The factorial is not a step function. In the OP's parlance, the factorial function is defined only for zero and positive integral arguments. The OP cannot invoke non-integral arguments and then complain about the result.

8. ### Papajohn56 thread starter macrumors 6502

Joined:
Aug 13, 2005
#8
Yes but Gamma and Factorial are not the same thing. As a matter of fact, for positive integers, Gamma is equal to (n-1)!, rather than just n!

They are not the same function, even though they are related. When I enter factorial, I shouldn't get Gamma as the output.