Stirling
Version 1.0.0.0 (1.79 KB) by
Antonio Trujillo-Ortiz
Stirling's approximation to factorials.
Stirling´s approximation returns the logarithm of the factorial value or the factorial value for n as large as 170 (a greater value returns INF for it exceeds the largest floating point number, e+308). For a better expansion it is used the Kemp (1989) and Tweddle (1984) suggestions.
It needs to input n - can be a fractional or a scalar and o - option of the result (logarithm of the factorial value = 1; factorial value = 2)[default = 2].
Cite As
Antonio Trujillo-Ortiz (2026). Stirling (https://www.mathworks.com/matlabcentral/fileexchange/3600-stirling), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R11
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Industrial Statistics in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 | It was added an appropriate format to cite this file. |
