AuFac.cin
Jump to navigation
Jump to search
// AuFac.cin defines z_type AuFac(z_type) that evaluates the AuFac, id est, (ArcSuperFactorial), id est, the Abel function of Factorial. In wide ranges of values of z, \(\rm AuFac(Sufac(z))\!=\!z~\) and \(~\rm SuFac(Aufac(z))\!=\!z~\). // Of order of 14 correct decimal digits are expected in the result.
z_type arcsuperfac0(z_type z){ int n; z_type s, c, e; DB k=0.61278745233070836381366079016859252; DB U[19]={1., -0.798731835172434541585621072345730147, 0.69806411355936704552792746483306691, - 0.6339640557572814865638000833478131, 0.5884152357911398848274232132172143, -0.5538887519936519511632593654732843, 0.526547902598592454703287733600892, -0.504191460428021561516069870422848, 0.48545298002933922263549078734881, -0.46943468090947139273094056497701, 0.4555204862393622788179080677150, -0.4432726222110411295132308010077, 0.4323708863150174727399798603985, -0.4225752531177612936293974175008, 0.413701949171132722406449918702, -0.40560764595293667778491699902, 0.39817872478532299454624349817, -0.391323 -0.384}; // z-=2.; s=U[15]*z; for(n=14;n>=0;n--){ s+=U[n]; s*=z;} z-=2.; s=U[18]*z; for(n=17;n>=0;n--){ s+=U[n]; s*=z;} return log(s)/k;} z_type AuFac(z_type z){ if(abs(z-2.)<.12) return arcsuperfac0(z); return AuFac(afacc(z))+1.;}
//