UNPKG

@stdlib/math-base-special-gamma-lanczos-sum

Version:

Calculate the Lanczos sum for the approximation of the gamma function.

10 lines (9 loc) 1.11 kB
"use strict";var a=function(r,e){return function(){return e||r((e={exports:{}}).exports,e),e.exports}};var n=a(function(m,i){ function v(r){var e,s,t;return r===0?1/0:(r<0?e=-r:e=r,e<=1?(s=3847467039331777e-5+r*(3685766504351951e-5+r*(1588920245372942e-5+r*(4059208354298835e-6+r*(6805476611834733e-7+r*(7823975500312005e-8+r*(6246580776401795e-9+r*(341986.3488721347+r*(12287.194511824551+r*(261.61404416416684+r*2.5066282746310007))))))))),t=0+r*(362880+r*(1026576+r*(1172700+r*(723680+r*(269325+r*(63273+r*(9450+r*(870+r*(45+r*1)))))))))):(r=1/r,s=2.5066282746310007+r*(261.61404416416684+r*(12287.194511824551+r*(341986.3488721347+r*(6246580776401795e-9+r*(7823975500312005e-8+r*(6805476611834733e-7+r*(4059208354298835e-6+r*(1588920245372942e-5+r*(3685766504351951e-5+r*3847467039331777e-5))))))))),t=1+r*(45+r*(870+r*(9450+r*(63273+r*(269325+r*(723680+r*(1172700+r*(1026576+r*(362880+r*0)))))))))),s/t)}i.exports=v });var o=a(function(p,u){ var c=n();u.exports=c });var f=o();module.exports=f; /** @license Apache-2.0 */ /** @license Apache-2.0 */ /** @license Apache-2.0 */ //# sourceMappingURL=index.js.map