Class Factorial

    • Method Detail

      • doubleValue

        public static double doubleValue​(int n)
        Computes the factorial of n.

        The result should be small enough to fit into a double: The largest n for which n! does not exceed Double.MAX_VALUE is 170. Double.POSITIVE_INFINITY is returned for n > 170.

        Parameters:
        n - Argument.
        Returns:
        n!
        Throws:
        IllegalArgumentException - if n < 0.
        Since:
        1.1