fact
Declaration
double* function fact(double* X)
where 0< X <= 100.
Description
Fact returns the factorial of a double X. If X is not a whole number then X is
truncated before calculating the factorial. X must be less than 101.
Example Stored Procedure
CREATE PROCEDURE test_fact (X DOUBLE PRECISION)
RETURNS (result DOUBLE PRECISION) AS
BEGIN
result = fact(X);
END!!
WISQL - calling the example stored procedure
execute procedure test_fact(42);
RESULT
======================
1.40500611775288e+51
execute procedure test_fact(3.9);
RESULT
======================
6
execute procedure test_fact(100);
RESULT
======================
9.33262154439441e+157
Error Results - restrictions on X are : X < 101
execute procedure test_fact(101);
RESULT
======================
-999999