XLeratorDB/math Documentation
FACTDOUBLE
Updated: 17 August 2010
Use FACTDOUBLE to calculate the double factorial of a number. The double factorial of a number is equal to n*(n-1)*(n-2)…*(n-i) where n-i greater than 2
Syntax
SELECT [westclintech].[wct].[FACTDOUBLE] (
<@Number, float,>)
Arguments
@Number
is the value to calculate the double factorial of. @Number is an expression of type float or of a type that can be implicitly converted to float.
Return Types
float
Remarks
· @Number is truncated to an integer
· @Number must be greater than or equal to 0
· @Number must be less than or equal to 300
Example
SELECT wct.FACTDOUBLE(13)
Here is the result set
----------------------
135135
(1 row(s) affected)