XLeratorDB/math Documentation

Home


XLeratorDB/math

Use XLeratorDB/math for a wide variety of mathematical calculations. The feature-rich XLeratorDB function library lets you include calculations in any T-SQL statement including SELECT, INSERT, UPDATE, DELETE, CREATE VIEW as well as in CTEs, stored procedures, user-defined functions, and computed columns.

XLeratorDB/math is available in two packages - XLeratorDB/math which requires SQL Server 2005 or later, and XLeratorDB/math 2008 which requires SQL Server 2008 or later. 

Functions denoted with '2008+2012 only' are only available in the XLeratorDB/math 2008 package and will not install or run  in SQL Server 2005. XLeratorDB 2008 packages contain functions which leverage SQL CLR features that are only available in SQL Server 2008 or later, namely 'multi-input aggregates' which provide a much easier calling syntax and typically run much faster than their scalar counterparts.

FUNCTION REFERENCE - MATH FUNCTIONS
ARITHMETIC/ALGEBRA
CEILING Ceiling to a multiple
COMBIN Combinatorial
EGCD Euclidean GCD
ELCM Euclidean LCM
EVEN Nearest Even
FACT Factorial
FACTDOUBLE Double Factorial
FLOOR Floor to a multiple
GCD Greatest Common Divisor
GREATEROF    new! Return the coparative larger of two items based on the datatype of first item
INT Integer
LCM Least Common Multiple
LESSEROF    new! Return the coparative smaller of two items based on the datatype of first item
MROUND Round to a multiple
MULTINOMIAL Sum of squares
MULTINOMIAL_q Sum of squares
ODD Nearest Odd
PRODUCT Product of Values (similar to SUM)
PRODUCT38    new! Product of 2 decimal(38,18) values with precision 38 and scale 18
QUOTIENT Integer portion of a division
QUOTIENT38    new! Quotient of 2 decimal(38,18) values with precision 38 and scale 18
ROMAN Convert to Roman Numerals
ROUNDDOWN Round toward zero
ROUNDUP Round away from zero
SERIESSUM Sum of a Power Series
SERIESSUM_q Sum of a Power Series
SUMSQ Sum of the Squares
TRUNC Truncate to Integer
WAVG - 2008 Weighted average  2008+2012 only
XL_LOG Log
   
TRIGONOMETRY
ACOSH Inverse Hyperbolic Cosine
ASINH Inverse Hyperbolic Sine
ATANH Inverse Hyperbolic Tangent
COSH Hyperbolic Cosine
CSC Cosecant
SEC Secant
SINH Hyperbolic Sine
TANH Hyperbolic Tangent
   
DISTANCE
DISTANCE Calculate the distance between two points on earth
   
INTERPOLATIONS
INTERP Linear interpolation
INTERP_q Linear interpolation
INTERP - 2008 Linear interpolation  2008+2012 only
POLYCOEF - 2008 Polynomial coefficient  2008+2012 only
POLYFIT Polynomial fitting (Table Valued function)
POLYFIT_q Polynomial fitting (Table Valued function)
POLYINTERP - 2008 Polynomial interpolation  2008+2012 only
POLYRSQ - 2008 Polynomial goodness of fit  2008+2012 only
POLYVAL - 2008 Polynomial value  2008+2012 only
SPLINE Cubic spline interpolation
SPLINE_q Cubic spline interpolation
SPLINE - 2008 Cubic spline interpolation  2008+2012 only
   
NUMBER/SERIES GENERATORS
RAND Returns a random float >=0 and <1
RANDBETWEEN Random integer between two values
RANDNORM    new! Random integer based on the normal distribution
SeriesInt Generate a range of Integer values (Table Valued function)
SeriesFloat Generate a range of float values (Table Valued function)
SeriesDate Generate a range of date values (Table Valued function)
   
MATRIX FUNCTIONS
BKSUB    new! Solve for the equation A*x=b for an upper-triangular matrix
DIAG    new! Vector of the diagonal of the string representation of a matrix
EYE    new! Generate an m-by-n identity matrix
FWDSUB    new! Solve for the equation A*x=b for a lower-triangular matrix
LU    new! Decompose a string representation of a matrix into the product of lower and upper triangular matrices
LUdecomp Decompose a de-normalized matrix into lower and upper
LUdecomp_q Decompose a de-normalized matrix into lower and upper
LUdecompN Decompose a normalized matrix into lower and upper
LUdecompN_q Decompose a normalized matrix into lower and upper
MATADD    new! Add a value to every element of a matrix or add 2 matrices together
MATINVERSE    new! Calculate the matrix inverse of a square (N x N) array
MATMULT    new! Calculate the product of two matrices or multiply a matrix by a constant
MATRIX2STRING    new! Turn table data into a string representation of a matrix
MATRIX2STRING_q    new! Turn table data into a string representation of a matrix
MATSUB    new! Subtract a value from every element of a matrix or subtract two matrices
MCOLS    new! Return the number of columns in the string representation of a matrix
MCOLUMN    new! Return a column from the string representation of a matrix
MDETERM Matrix Determinant
MDETERM_q Matrix Determinant
MDETERMN Matrix Determinant (normalized input)
MDETERMN_q Matrix Determinant (normalized input)
MINDEX    new! Return the intersection of a row and a column from the string representation of a matrix
MMULT Matrix Multiplication
MMULT_q Matrix Multiplication
MMULTN Matrix Multiplication (normalized input)
MMULTN_q Matrix Multiplication (normalized input)
MINVERSE Matrix Inverse
MINVERSE_q Matrix Inverse
MINVERSEN Matrix Inverse (normalized input)
MINVERSEN_q Matrix Inverse (normalized input)
MRAND    new! Generate a matrix of pseudo-random numbers
MRANDN    new! Generate a matrix of pseudo-random numbers from the standard normal distribution
MROW    new! Return a row from the string representation of a matrix
MROWS    new! Return the number of rows in the string representation of a matrix
MTRIL    new! Return the lower triangular part of the string representation of a matrix
MTRIU    new! Return the upper triangular part of the string representation of a matrix
NMATRIX2STRING    new! Turn third-normal form table data into a string representation of a matrix
NMATRIX2STRING_q    new! Turn third-normal form table data into a string representation of a matrix
NMATRIX2STRING - 2008    new! Turn third-normal form table data into a string representation of a matrix  2008+2012 only
ONES    new! Generate an m-by-n matrix of ones
QR    new! Decompose a string representation of a matrix into the product of an upper triangular matrix and an orthogonal matrix
QRdecomp    new! Decompose a de-normalized matrix into the product of an upper triangular matrix and an orthogonal matrix
QRdecomp_q    new! Decompose a de-normalized matrix into the product of an upper triangular matrix and an orthogonal matrix
TRANSPOSE    new! Return the transposed matrix
ZERO    new! Generate an m-by-n matrix of zeroes
   
   
XLDB_MATH_VERSION Version Information


 |  View Topic History  |
Copyright 2008-2013 WestClinTech LLC         Privacy Policy        Terms of Service