Gamma function: Difference between revisions

(Added Easylang)
(One intermediate revision by the same user not shown)
Line 4,153:
 
Note: &nbsp; The Taylor series isn't much good above values of &nbsp; <big>'''6½'''</big>.
Already on modest values of x (say > 3) you loose precision. See below for a solution.
<syntaxhighlight lang="rexx">/*REXX program calculates GAMMA using the Taylor series coefficients; ≈80 decimal digits*/
/*The GAMMA function symbol is the Greek capital letter: Γ */
Line 4,325 ⟶ 4,326:
3.3233509704478425511840640312646472177454 3.1415926535897932384626433832795028841972
6
</pre>
This program also has some minor issues. The number of steps, as well as e and pi, are hardcoded. This limits the precision to about 80 digits. See below for a solution.
 
===A generic Gamma function===
Below program calculates the Gamma function for any (real) element x (except integers < 1) in the specified precision (but over 100 digits it quickly becomes slow).
Improvements over above programs:
 
Closed formulas added for all half integers and positive integers (much faster than series). Argument reduction (mapping to interval 0.5...1.5) added to the Lanczos solution. Results are now also for larger values of x accurate to about 60 digits. Dynamic determination of digits and iterations added to the Spouge solution. It's now slightly faster on low x values and gives correct results using > 87 digits. Depending on the parameters, the program selects the optimal method for calculating Gamma.
 
As before, all needed functions are included in this version, so the entry is quite long...
<syntaxhighlight lang="rexx">
parse version version; say version; glob. = ''
say 'Gamma function in arbitrary precision'
say
say '(Half)integers formulas'
w = '-99.5 -10.5 -5.5 -2.5 -1.5 -0.5 0.5 1 1.5 2 2.5 5 5.5 10 10.5 99 99.5'
numeric digits 100
do i = 1 to words(w)
x = word(w,i); call time('r'); r = Gamma(x); e = format(time('e'),,3)
say 'Formulas' format(x,4,1) r '('e 'seconds)'
end
say
say 'Lanczos (max 60 digits) vs Spouge (no limit) vs Stirling (no limit) approximation'
w = '-12.8 -6.4 -3.2 -1.6 -0.8 -0.4 -0.2 -0.1 0.1 0.2 0.4 0.8 1.6 3.2 6.4 12.8'
do i = 1 to words(w)
x = word(w,i)
numeric digits 60
call time('r'); r = Gamma(x); e = format(time('e'),,3)
say 'Lanczos ' format(x,4,1) r '('e 'seconds)'
numeric digits 61
call time('r'); r = Gamma(x); e = format(time('e'),,3)
say 'Spouge ' format(x,4,1) r '('e 'seconds)'
if x > 0 then do
call time('r'); r = Stirling(x); e = format(time('e'),,3)
say 'Stirling' format(x,4,1) r '('e 'seconds)'
end
end
say
say 'Same for a bigger number'
w = '-99.9 99.9'
do i = 1 to words(w)
x = word(w,i)
numeric digits 60
call time('r'); r = Gamma(x); e = format(time('e'),,3)
say 'Lanczos ' format(x,4,1) r '('e 'seconds)'
numeric digits 100
call time('r'); r = Gamma(x); e = format(time('e'),,3)
say 'Spouge ' format(x,4,1) r '('e 'seconds)'
if x > 0 then do
call time('r'); r = Stirling(x); e = format(time('e'),,3)
say 'Stirling' format(x,4,1) r '('e 'seconds)'
end
end
exit
 
Gamma:
/* Gamma */
procedure expose glob.
arg x
/* Validity */
if x < 1 & Whole(x) then
return 'X'
/* Formulas for negative and positive (half)integers */
if x < 0 then do
if Half(x) then do
numeric digits Digits()+2
i = Abs(Floor(x)); y = (-1)**i*2**(2*i)*Fact(i)*Sqrt(Pi())/Fact(2*i)
numeric digits Digits()-2
return y+0
end
end
if x > 0 then do
if Whole(x) then
return Fact(x-1)
if Half(x) then do
numeric digits Digits()+2
i = Floor(x); y = Fact(2*i)*Sqrt(Pi())/(2**(2*i)*Fact(i))
numeric digits Digits()-2
return y+0
end
end
p = Digits()
if p < 61 then do
/* Lanczos with predefined coefficients */
/* Map negative x to positive x */
if x < 0 then
return Pi()/(Gamma(1-x)*Sin(Pi()*x))
/* Argument reduction to interval (0.5,1.5) */
numeric digits p+2
c = Trunc(x); x = x-c
if x < 0.5 then do
x = x+1; c = c-1
end
/* Series coefficients 1/Gamma(x) in 80 digits Fransen & Wrigge */
c.1 = 1.00000000000000000000000000000000000000000000000000000000000000000000000000000000
c.2 = 0.57721566490153286060651209008240243104215933593992359880576723488486772677766467
c.3 = -0.65587807152025388107701951514539048127976638047858434729236244568387083835372210
c.4 = -0.04200263503409523552900393487542981871139450040110609352206581297618009687597599
c.5 = 0.16653861138229148950170079510210523571778150224717434057046890317899386605647425
c.6 = -0.04219773455554433674820830128918739130165268418982248637691887327545901118558900
c.7 = -0.00962197152787697356211492167234819897536294225211300210513886262731167351446074
c.8 = 0.00721894324666309954239501034044657270990480088023831800109478117362259497415854
c.9 = -0.00116516759185906511211397108401838866680933379538405744340750527562002584816653
c.10 = -0.00021524167411495097281572996305364780647824192337833875035026748908563946371678
c.11 = 0.00012805028238811618615319862632816432339489209969367721490054583804120355204347
c.12 = -0.00002013485478078823865568939142102181838229483329797911526116267090822918618897
c.13 = -0.00000125049348214267065734535947383309224232265562115395981534992315749121245561
c.14 = 0.00000113302723198169588237412962033074494332400483862107565429550539546040842730
c.15 = -0.00000020563384169776071034501541300205728365125790262933794534683172533245680371
c.16 = 0.00000000611609510448141581786249868285534286727586571971232086732402927723507435
c.17 = 0.00000000500200764446922293005566504805999130304461274249448171895337887737472132
c.18 = -0.00000000118127457048702014458812656543650557773875950493258759096189263169643391
c.19 = 0.00000000010434267116911005104915403323122501914007098231258121210871073927347588
c.20 = 0.00000000000778226343990507125404993731136077722606808618139293881943550732692987
c.21 = -0.00000000000369680561864220570818781587808576623657096345136099513648454655443000
c.22 = 0.00000000000051003702874544759790154813228632318027268860697076321173501048565735
c.23 = -0.00000000000002058326053566506783222429544855237419746091080810147188058196444349
c.24 = -0.00000000000000534812253942301798237001731872793994898971547812068211168095493211
c.25 = 0.00000000000000122677862823826079015889384662242242816545575045632136601135999606
c.26 = -0.00000000000000011812593016974587695137645868422978312115572918048478798375081233
c.27 = 0.00000000000000000118669225475160033257977724292867407108849407966482711074006109
c.28 = 0.00000000000000000141238065531803178155580394756670903708635075033452562564122263
c.29 = -0.00000000000000000022987456844353702065924785806336992602845059314190367014889830
c.30 = 0.00000000000000000001714406321927337433383963370267257066812656062517433174649858
c.31 = 0.00000000000000000000013373517304936931148647813951222680228750594717618947898583
c.32 = -0.00000000000000000000020542335517666727893250253513557337960820379352387364127301
c.33 = 0.00000000000000000000002736030048607999844831509904330982014865311695836363370165
c.34 = -0.00000000000000000000000173235644591051663905742845156477979906974910879499841377
c.35 = -0.00000000000000000000000002360619024499287287343450735427531007926413552145370486
c.36 = 0.00000000000000000000000001864982941717294430718413161878666898945868429073668232
c.37 = -0.00000000000000000000000000221809562420719720439971691362686037973177950067567580
c.38 = 0.00000000000000000000000000012977819749479936688244144863305941656194998646391332
c.39 = 0.00000000000000000000000000000118069747496652840622274541550997151855968463784158
c.40 = -0.00000000000000000000000000000112458434927708809029365467426143951211941179558301
c.41 = 0.00000000000000000000000000000012770851751408662039902066777511246477487720656005
c.42 = -0.00000000000000000000000000000000739145116961514082346128933010855282371056899245
c.43 = 0.00000000000000000000000000000000001134750257554215760954165259469306393008612196
c.44 = 0.00000000000000000000000000000000004639134641058722029944804907952228463057968680
c.45 = -0.00000000000000000000000000000000000534733681843919887507741819670989332090488591
c.46 = 0.00000000000000000000000000000000000032079959236133526228612372790827943910901464
c.47 = -0.00000000000000000000000000000000000000444582973655075688210159035212464363740144
c.48 = -0.00000000000000000000000000000000000000131117451888198871290105849438992219023663
c.49 = 0.00000000000000000000000000000000000000016470333525438138868182593279063941453996
c.50 = -0.00000000000000000000000000000000000000001056233178503581218600561071538285049997
c.51 = 0.00000000000000000000000000000000000000000026784429826430494783549630718908519485
c.52 = 0.00000000000000000000000000000000000000000002424715494851782689673032938370921241
/* Series expansion */
x = x-1; s = 0
do k = 52 by -1 to 1
s = s*x+c.k
end
y = 1/s
/* Undo reduction */
if c = -1 then
y = y/x
else do
do i = 1 to c
y = (x+i)*y
end
end
end
else do
x = x-1
/* Spouge */
/* Estimate digits and iterations */
q = Floor(p*1.5); a = Floor(p*1.3)
numeric digits q
/* Series */
s = 0
do k = 1 to a-1
s = s+((-1)**(k-1)*Power(a-k,k-0.5)*Exp(a-k))/(Fact(k-1)*(x+k))
end
s = s+Sqrt(2*Pi()); y = Power(x+a,x+0.5)*Exp(-a-x)*s
end
/* Normalize */
numeric digits p
return y+0
 
Stirling:
/* Sterling */
procedure expose glob.
arg x
return sqrt(2*pi()/x) * power(x/e(),x)
 
E:
/* Euler number */
procedure expose glob.
p = Digits()
/* In memory? */
if glob.e.p <> '' then
return glob.e.p
if p < 101 then
/* Fast value */
glob.e.p = 2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516643+0
else do
numeric digits Digits()+2
/* Taylor series */
y = 2; t = 1; v = y
do n = 2
t = t/n; y = y+t
if y = v then
leave
v = y
end
numeric digits Digits()-2
glob.e.p = y+0
end
return glob.e.p
 
Exp:
/* Exponential e^x */
procedure expose glob.
arg x
numeric digits Digits()+2
/* Fast values */
if Whole(x) then
return E()**x
/* Argument reduction */
i = x%1
if Abs(x-i) > 0.5 then
i = i+Sign(x)
/* Taylor series */
x = x-i; y = 1; t = 1; v = y
do n = 1
t = (t*x)/n; y = y+t
if y = v then
leave
v = y
end
/* Inverse reduction */
y = y*e()**i
numeric digits Digits()-2
return y+0
 
Fact:
/* Factorial n! */
procedure expose glob.
arg x
/* Validity */
if \ Whole(x) then
return 'X'
if x < 0 then
return 'X'
/* Current in memory? */
if glob.fact.x <> '' then
return glob.fact.x
w = x-1
/* Previous in memory? */
if glob.fact.w = '' then do
/* Loop cf definition */
y = 1
do n = 2 to x
y = y*n
end
glob.fact.x = y
end
else
/* Multiply */
glob.fact.x = glob.fact.w*x
return glob.fact.x
 
Floor:
/* Floor */
procedure expose glob.
arg x
/* Formula */
if Whole(x) then
return x
else
return Trunc(x)-(x<0)
 
Frac:
/* Fractional part */
procedure expose glob.
arg x
/* Formula */
return x-x%1
 
Half:
/* Is a number half integer? */
procedure expose glob.
arg x
/* Formula */
return (Frac(Abs(x))=0.5)
 
Ln:
/* Natural logarithm base e */
procedure expose glob.
arg x
/* Validity */
if x <= 0 then
return 'X'
/* Fast values */
if x = 1 then
return 0
p = Digits()
/* In memory? */
if glob.ln.x.p <> '' then
return glob.ln.x.p
/* Precalculated values */
if x = 2 & p < 101 then do
glob.ln.x.p = Ln2()
return glob.ln.x.p
end
if x = 4 & p < 101 then do
glob.ln.x.p = Ln4()
return glob.ln.x.p
end
if x = 8 & p < 101 then do
glob.ln.x.p = Ln8()
return glob.ln.x.p
end
if x = 10 & p < 101 then do
glob.ln.x.p = Ln10()
return glob.ln.x.p
end
numeric digits p+2
/* Argument reduction */
z = x; i = 0; e = 1/E()
if z < 0.5 then do
y = 1/z
do while y > 1.5
y = y*e; i = i-1
end
z = 1/y
end
if z > 1.5 then do
do while z > 1.5
z = z*e; i = i+1
end
end
/* Taylor series */
q = (z-1)/(z+1); f = q; y = q; v = q; q = q*q
do n = 3 by 2
f = f*q; y = y+f/n
if y = v then
leave
v = y
end
numeric digits p
/* Inverse reduction */
glob.ln.x.p = 2*y+i
return glob.ln.x.p
 
Power:
/* Power function x^y */
procedure expose glob.
arg x,y
/* Validity */
if x < 0 then
return 'X'
/* Fast values */
if x = 0 then
return 0
if y = 0 then
return 1
/* Fast formula */
if Whole(y) then
return x**y
/* Formulas */
if Abs(y//1) = 0.5 then
return Sqrt(x)**Sign(y)*x**(y%1)
else
return Exp(y*Ln(x))
 
Sin:
/* Sine */
procedure expose glob.
arg x
numeric digits Digits()+2
/* Argument reduction */
u = Pi(); x = x//(2*u)
if Abs(x) > u then
x = x-Sign(x)*2*u
/* Taylor series */
t = x; y = x; x = x*x; v = y
do n = 2 by 2
t = -t*x/(n*(n+1)); y = y+t
if y = v then
leave
v = y
end
numeric digits Digits()-2
return y+0
 
Sqrt:
/* Square root x^(1/2) */
procedure expose glob.
arg x
/* Validity */
if x < 0 then
return 'X'
/* Fast values */
if x = 0 then
return 0
if x = 1 then
return 1
p = Digits()
/* Predefined values */
if x = 2 & p < 101 then
return Sqrt2()
if x = 3 & p < 101 then
return Sqrt3()
if x = 5 & p < 101 then
return Sqrt5()
numeric digits p+2
/* Argument reduction to [0,100) */
i = Xpon(x); i = (i-(i<0))%2; x = x/100**i
/* First guess 1 digit accurate */
t = '2.5 6.5 12.5 20.5 30.5 42.5 56.5 72.5 90.5 100'
do y = 1 until word(t,y) > x
end
/* Dynamic precision */
d = Digits()
do n = 1 while d > 2
d.n = d; d = d%2+1
end
d.n = 2
/* Method Heron */
do k = n to 1 by -1
numeric digits d.k
y = (y+x/y)*0.5
end
numeric digits p
return y*10**i
 
Whole:
/* Is a number integer? */
procedure expose glob.
arg x
/* Formula */
return Datatype(x,'w')
 
Xpon:
/* Exponent */
procedure expose glob.
arg x
/* Formula */
if x = 0 then
return 0
else
return Right(x*1E+99999,6)-99999
 
Ln2:
/* Natural log of 2 */
procedure expose glob.
/* Fast value */
y = 0.6931471805599453094172321214581765680755001343602552541206800094933936219696947156058633269964186875
return y+0
 
Ln4:
/* Natural log of 4 */
procedure expose glob.
/* Fast value */
y = 1.386294361119890618834464242916353136151000268720510508241360018986787243939389431211726653992837375
return y+0
 
Ln8:
/* Natural log of 8 */
procedure expose glob.
/* Fast value */
y = 2.079441541679835928251696364374529704226500403080765762362040028480180865909084146817589980989256063
return y+0
 
Ln10:
/* Natural log of 10 */
procedure expose glob.
/* Fast value */
y = 2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959830
return y+0
 
Pi:
/* Pi */
procedure expose glob.
p = Digits()
/* In memory? */
if glob.pi.p <> '' then
return glob.pi.p
if p < 101 then
/* Fast value */
glob.pi.p = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211707+0
else do
numeric digits Digits()+2
if p < 201 then do
/* Method Chudnovsky series */
y = 0
do n = 0
v = y; y = y + Fact(6*n)*(13591409+545140134*n)/(Fact(3*n)*Fact(n)**3*-640320**(3*n))
if y = v then
leave
end
y = 4270934400/(Sqrt(10005)*y)
end
else do
/* Method Agmean series */
y = 0.25; a = 1; g = Sqrt(0.5); n = 1
do until a = v
v = a
x = (a+g)*0.5; g = Sqrt(a*g)
y = y-n*(x-a)**2; n = n+n; a = x
end
y = a*a/y
end
numeric digits Digits()-2
glob.pi.p = y+0
end
return glob.pi.p
 
Sqrt2:
/* Square root of 2 */
procedure expose glob.
/* Fast value */
y = 1.414213562373095048801688724209698078569671875376948073176679737990732478462107038850387534327641573
return y+0
 
Sqrt3:
/* Square root of 3 */
procedure expose glob.
/* Fast value */
y = 1.732050807568877293527446341505872366942805253810380628055806979451933016908800037081146186757248576
return y+0
 
Sqrt5:
/* Square root of 5 */
procedure expose glob.
/* Fast value */
y = 2.236067977499789696409173668731276235440618359611525724270897245410520925637804899414414408378782275
return y+0
</syntaxhighlight>
{{out|Output:}}
<pre style="font-size:80%">
REXX-Regina_3.9.6(MT) 5.00 29 Apr 2024
Gamma function in arbitrary precision
 
(Half)integers formulas (100 digits)
Formulas -99.5 3.370459273906717035419140191178165368212858243169804822385940657239537725368041400224226278392502618E-157 (0.003 seconds)
Formulas -10.5 -2.640121820547716316246385325311240439682468432522587656059168154777653141232089673307782521306919765E-7 (0.000 seconds)
Formulas -5.5 0.01091265478190986298673234429377905644050439299584730891829569009625650045347052040480970101310888490 (0.001 seconds)
Formulas -2.5 -0.9453087204829418812256893244486107641586930432652731350473641545882193517818838300666403502605571549 (0.000 seconds)
Formulas -1.5 2.363271801207354703064223311121526910396732608163182837618410386470548379454709575166600875651392887 (0.000 seconds)
Formulas -0.5 -3.544907701811032054596334966682290365595098912244774256427615579705822569182064362749901313477089331 (0.000 seconds)
Formulas 0.5 1.772453850905516027298167483341145182797549456122387128213807789852911284591032181374950656738544665 (0.000 seconds)
Formulas 1.0 1 (0.000 seconds)
Formulas 1.5 0.8862269254527580136490837416705725913987747280611935641069038949264556422955160906874753283692723327 (0.001 seconds)
Formulas 2.0 1 (0.000 seconds)
Formulas 2.5 1.329340388179137020473625612505858887098162092091790346160355842389683463443274136031212992553908499 (0.000 seconds)
Formulas 5.0 24 (0.000 seconds)
Formulas 5.5 52.34277778455352018114900849241819367949013237611424488006401129409378637307891910622901158181014715 (0.000 seconds)
Formulas 10.0 362880 (0.000 seconds)
Formulas 10.5 1133278.388948785567334574165588892475560298308275159776608723414529483390056004153717630538727607291 (0.000 seconds)
Formulas 99.0 9.426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729113E+153 (0.001 seconds)
Formulas 99.5 9.367802114655996591305637999137598430056780942876744878408158310966911153528806387157595583300106562E+154 (0.001 seconds)
 
Lanczos (60 digits) vs Spouge (61 digits) vs Stirling (61 digits) approximations
Lanczos -12.8 -1.44241809348812392704183496823417171228485786984071442421769E-9 (0.001 seconds)
Spouge -12.8 -1.442418093488123927041834968234171712284857869840714424217876E-9 (0.061 seconds)
Lanczos -6.4 -0.00214311842968855616971089012135323947575979728834356196087007 (0.001 seconds)
Spouge -6.4 -0.002143118429688556169710890121353239475759797288343561960870050 (0.062 seconds)
Lanczos -3.2 0.689056412005979742919224040168358601528149721171394266681422 (0.001 seconds)
Spouge -3.2 0.6890564120059797429192240401683586015281497211713942666814006 (0.061 seconds)
Lanczos -1.6 2.31058285808092523235318127282049942788600677267861414816871 (0.001 seconds)
Spouge -1.6 2.310582858080925232353181272820499427886006772678614148168727 (0.063 seconds)
Lanczos -0.8 -5.73855463999850381650594784491144000429263749786675377223601 (0.001 seconds)
Spouge -0.8 -5.738554639998503816505947844911440004292637497866753772236066 (0.063 seconds)
Lanczos -0.4 -3.72298062203204275598583347080335570330149759689981183834669 (0.001 seconds)
Spouge -0.4 -3.722980622032042755985833470803355703301497596899811838346699 (0.062 seconds)
Lanczos -0.2 -5.82114856862651686818160469134229346570980884445593876492447 (0.001 seconds)
Spouge -0.2 -5.821148568626516868181604691342293465709808844455938764924472 (0.062 seconds)
Lanczos -0.1 -10.6862870211931935489730533569448077816983878506097317904937 (0.001 seconds)
Spouge -0.1 -10.68628702119319354897305335694480778169838785060973179049371 (0.066 seconds)
Lanczos 0.1 9.51350769866873183629248717726540219255057862608837734305000 (0.000 seconds)
Spouge 0.1 9.513507698668731836292487177265402192550578626088377343050001 (0.063 seconds)
Stirling 0.1 5.697187148977169278607259516105973271247103273209125657453591 (0.003 seconds)
Lanczos 0.2 4.59084371199880305320475827592915200343410999829340301778885 (0.000 seconds)
Spouge 0.2 4.590843711998803053204758275929152003434109998293403017788853 (0.062 seconds)
Stirling 0.2 3.325998424022392556831252338044446631141936051050822874561565 (0.003 seconds)
Lanczos 0.4 2.21815954375768822305905402190767945077056650177146958224198 (0.000 seconds)
Spouge 0.4 2.218159543757688223059054021907679450770566501771469582241978 (0.063 seconds)
Stirling 0.4 1.841476335936235407774504215721792671787348602355998395147546 (0.003 seconds)
Lanczos 0.8 1.16422971372530337363632093826845869314196176889118775298489 (0.000 seconds)
Spouge 0.8 1.164229713725303373636320938268458693141961768891187752984894 (0.059 seconds)
Stirling 0.8 1.053370968425608533997094555812234627247042644411690511716880 (0.003 seconds)
Lanczos 1.6 0.893515349287690261436600032992805368792359423255954841203208 (0.000 seconds)
Spouge 1.6 0.8935153492876902614366000329928053687923594232559548412032077 (0.064 seconds)
Stirling 1.6 0.8486932421525737351870671884548739160413838607490704857265386 (0.003 seconds)
Lanczos 3.2 2.42396547993536801209211236969059225781321007909891679339251 (0.000 seconds)
Spouge 3.2 2.423965479935368012092112369690592257813210079098916793392514 (0.069 seconds)
Stirling 3.2 2.361851203186240411720280147420856619690317833030951977155556 (0.003 seconds)
Lanczos 6.4 240.833779983445938793193921422181728753410453111118999895588 (0.000 seconds)
Spouge 6.4 240.8337799834459387931939214221817287534104531111189998955875 (0.060 seconds)
Stirling 6.4 237.7207525902404787072183649425603774456984237805478743551168 (0.002 seconds)
Lanczos 12.8 289487660.334241583580309266192984495005040185968050409506654 (0.000 seconds)
Spouge 12.8 289487660.3342415835803092661929844950050401859680504095066538 (0.059 seconds)
Stirling 12.8 287609477.0875058075487675889481380625378498188858381901124308 (0.003 seconds)
 
Same for a bigger number
Lanczos -99.9 1.72726520939328005075554286550876635176440408500391962571907E-157 (0.000 seconds)
Spouge -99.9 1.727265209393280050755542865508766351764404085003870332156550733790282578981487471194267631617799447E-157 (0.274 seconds)
Lanczos 99.9 5.89173215164436165675854187059394609460949390669692020855752E+155 (0.000 seconds)
Spouge 99.9 5.891732151644361656758541870593946094609493906696920208557519945524581875362460658552892944423816715E+155 (0.266 seconds)
Stirling 99.9 5.886819525828908144161960074977041612792659661747365945060453973672990129231211036627906746201731112E+155 (0.010 seconds)
</pre>
 
36

edits