Login     Register

        Contact Us     Search

XLeratorDB/statistics Documentation

SQL Server Factorial Power function


FACTORIALPOWER
Updated: 30 May 2017

Use the SQL Server scalar function FACTORIALPOWER to calculate the step-h factorial power x(n,h).

Syntax
SELECT [wct].[FACTORIALPOWER] (
   <@x, int,>
  ,<@n, int,>
  ,<@h, int,>)
Arguments
Input NameDefinition
@xNumber of interest
@nNumber of steps
@hStep-size
Return Type
float
Remarks
  • If @h > 0 then the falling factorial is returned.
  • If @h < 0 then the rising factorial is returned.
  • If @x, @h, or @n is NULL, then an error is returned.
  • Available in XLeratorDB / statistics 2008 only
Examples
Example #1
SELECT
    n.h,
    wct.FACTORIALPOWER(25,8,n.h) as FactorialPower
FROM
    (VALUES (-3),(-2),(-1),(0),(1),(2),(3))n(h)

This produces the following result.

See Also


Copyright 2008-2024 Westclintech LLC         Privacy Policy        Terms of Service