Login     Register

        Contact Us     Search

XLeratorDB/math Documentation

SQL Server FACTDOUBLE function


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)


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service