Uncommons Maths is a java library with nice math utilities and random number generators.
This requires the library uncommons-maths-1.2.2.jar to be in classpath.
The following example shows using Maths.factorial() API.
It lets us to calculate the factorial in the range 0 - 20.