Click or drag to resize

SpecialFunctionsFactorial(Int32) Method

Computes the factorial function x -> x! of an integer number > 0. The function can represent all number up to 22! exactly, all numbers up to 170! using a double representation. All larger values will overflow.

Namespace: Altaxo.Calc
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static double Factorial(
	int x
)

Parameters

x  Int32

[Missing <param name="x"/> documentation for "M:Altaxo.Calc.SpecialFunctions.Factorial(System.Int32)"]

Return Value

Double
A value value! for value > 0
Exceptions
ExceptionCondition
ArgumentOutOfRangeException
Remarks
If you need to multiply or divide various such factorials, consider using the logarithmic version FactorialLn(Int32) instead so you can add instead of multiply and subtract instead of divide, and then exponentiate the result using Exp(Double). This will also circumvent the problem that factorials become very large even for small parameters.
See Also