I was playing with numbers on calculator and to my amaze i could see that calculator calculated $(4.5)!$ or any real numbers but factorial is defined for integers how is this done any advanced function. (Note I am grade $11$ student)

  • 14
    $\begingroup$ en.wikipedia.org/wiki/Gamma_function $\endgroup$ – 5xum Feb 22 '16 at 12:53
  • 3
    $\begingroup$ Did your calculator give $4.5!=\frac{945}{32}\sqrt{\pi}\approx 29.53125$? Knowing the value your calculator gave will definitely make it easier for us to appropriately answer your question. $\endgroup$ – vrugtehagel Feb 22 '16 at 12:59
  • $\begingroup$ See math.stackexchange.com/questions/396889/… $\endgroup$ – true blue anil Feb 22 '16 at 13:00
  • $\begingroup$ No it gave $53.09.....$ $\endgroup$ – Archis Welankar Feb 22 '16 at 13:01
  • 6
    $\begingroup$ Excuse me. I made a mistake in my calculation, actually $\Gamma(5.5)=\frac{945}{32}\sqrt{\pi}\approx 52.3427777845535$ $\endgroup$ – vrugtehagel Feb 22 '16 at 13:08

In general, $~n!~=~\displaystyle\int_0^\infty\exp\Big(-\sqrt[n]x\Big)~dx,~$ which for $~n=\dfrac12~$ yields $~\Big(\tfrac12\Big)!~=~\displaystyle\int_0^\infty e^{-x^2}~dx.~$

But the value of the Gaussian integral is known to be $\sqrt\pi~,~$ implying that $~\Big(\tfrac12\Big)!~=~\dfrac{\sqrt\pi}2,~$

since the integrand is even. Now all that's left to do is to repeatedly employ the well-known

factorial property $(n+1)!=(n+1)~n!~$ for $~n+1=4+\dfrac12,~$ and the result follows.

  • 2
    $\begingroup$ Nice, so 4.5! = 4.5 * 3.5 * 2.5 * 1.5 * 0.5! = 59.0625 * (pi^0.5)/2 = 52.34277 .... $\endgroup$ – sav Feb 22 '16 at 14:16
  • 1
    $\begingroup$ Of course, the integral one usually sees is $n! = \int_0^\infty x^n e^{-x} dx$ but I guess they are related through a simple substitution. It is implicit in your answer that it is "obvious" to use the same integral for an $n$ that is not an integer. It is also implicit in the answer that the integral definition obeys the same "factorial property" $(n+1)!=(n+1)n!$ for non-integer $n$ as it does for integers. It is not too hard to prove, of course. A justification for using this integral as a generalization of the factorial functions comes from the characterization by H. Bohr and J. Mollerup. $\endgroup$ – Jeppe Stig Nielsen Feb 22 '16 at 19:19
  • $\begingroup$ You should probably explain how you got the first equality... $\endgroup$ – user541686 Feb 23 '16 at 8:31
  • $\begingroup$ @Mehrdad: Well, if you insist... :-$)$ $\endgroup$ – Lucian Feb 23 '16 at 8:37
  • $\begingroup$ @Lucian: lol holy cow thanks. $\endgroup$ – user541686 Feb 23 '16 at 9:58

There is a function called the Gamma function. It is similar to the factorial as the factorial could be thought of as a special case of the gamma function.

$\Gamma(n) = (n-1)!$

or rather, when you shift it by one, as shown in the above equation.

The gamma function happens to be

$\Gamma(t) = \int_0^\infty x^{t-1} e^{-x} dx$

Calculators often use the gamma function to calculate factorials of non-natural values.

The generalization is useful when you need to extend the definition of the factorial beyond the natural numbers. For example, some probability distributions use the factorial, and the gamma function can be used to generalize them.

The factorial and gamma function both have some interesting properties in common.

For example, the factorial function can be defined recursively.


$(n+1)! = (n+1) \times n!$

The gamma function also has this property

$\Gamma (1) = 1$

$\Gamma(x+1) = (x+1) \times \Gamma(x) $

  • $\begingroup$ That wasnt really helpful as 5xum already included it in my link $\endgroup$ – Archis Welankar Feb 22 '16 at 13:19
  • $\begingroup$ hmm ... Does any part need more explanation? $\endgroup$ – sav Feb 22 '16 at 13:25
  • $\begingroup$ But still thanks and $(+1)$ $\endgroup$ – Archis Welankar Feb 22 '16 at 13:25
  • $\begingroup$ Realistically functions like this are hard to compute and the calculator probably does it numerically math.stackexchange.com/questions/19236/… $\endgroup$ – sav Feb 22 '16 at 13:42

It's possible the calculator gave you the value of $\Gamma(5.5)$.

The $\Gamma$ function is a sort of generalization of the factorial in the sense that for every $n\in\mathbb N$, you have that $\Gamma(n) = (n-1)!$. So if you ever want to calculate $m!$, that's the same as calculating $\Gamma(m+1)$.

  • $\begingroup$ But what calculation and how $(4.5)(3.5)...(0.5).1$ $\endgroup$ – Archis Welankar Feb 22 '16 at 12:57
  • $\begingroup$ @ArchisWelankar It's not $4.5\cdot 3.5\cdots 0.5$. It's a lot more complicated than that. en.wikipedia.org/wiki/Gamma_function $\endgroup$ – 5xum Feb 22 '16 at 13:03
  • $\begingroup$ So what would be $x$ in my question?? $\endgroup$ – Archis Welankar Feb 22 '16 at 13:08
  • $\begingroup$ @ArchisWelankar Did you even read my answer? I said: it is possible the calculater gave the value of $\Gamma(5.5)$ $\endgroup$ – 5xum Feb 22 '16 at 13:09
  • $\begingroup$ Yes thus i asked how $\endgroup$ – Archis Welankar Feb 22 '16 at 13:18

The Gamma function works for all real numbers. It gives the factorial of n-1 for integers, and an analytic continuation, ie. Smooth graph for in between inputs.

There is an easy introduction here:http://www.sosmath.com/calculus/improper/gamma/gamma.html


Along with the gamma function, it is much easier to approximate to good accuracy using Stirling's approximation.

It is defined as:

$$n!\approx \sqrt{2\pi n}\left(\frac ne\right)^n$$

  • $\begingroup$ Note that "good accuracy" is for larger values of $n$. The relative error is about $1/(12n)$, so the number of correct digits will be roughly equal to the number of digits in $n$. When $n=4.5$ it means you should only expect the first 1 or 2 digits to be accurate. $\endgroup$ – Erick Wong May 6 '16 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.