Filog.cin

From Citizendium
Revision as of 07:55, 2 October 2013 by imported>John Stephenson (restore C++ category - there are so many articles tagged like this. Will lose track if not kept.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
// Filog.cin is the C++ code that defines function Filog that evaluates the fixed point of logarithm 
// for given complex value of logarithm of its base. The Filog(z) returns soluiton  of the equation
// 
// The algorithm below expresses Filog through the Tania function; the routines for the Tania are also supplied.

z_type ArcTania(z_type z) {return z + log(z) - 1. ;}
z_type ArcTaniap(z_type z) {return 1. + 1./z ;}
z_type TaniaTay(z_type z) { int n; z_type s;
s=1.+z*(.5+z*(1./16.+z*(-1./192.+z*(-1./3072.+z*(1.3/6144.+z*(-4.7/147456.
//+z*(7.3/4128768.) //some reserve term
)))))); DO(n,3) s+=(z-ArcTania(s))/ArcTaniap(s); return s ; }
z_type TaniaNega(z_type z){int n;z_type s=exp(z-exp(z)+1.); 
DO(n,4) s+=(z-ArcTania(s))/ArcTaniap(s); return s ; }
z_type TaniaBig(z_type z){int n;z_type s=z; s=z-log(s)+1.; 
DO(n,3) s+=(z-ArcTania(s))/ArcTaniap(s); return s ; }
z_type TaniaS(z_type z){int n; z_type s,t=z+z_type(2.,-M_PI);t*=2./9.; t=I*sqrt(t);
s=-1.+t*(3.+t*(-3.+t*(.75+t*(.3+t*(.9/16.+t*(-.3/7.+t*(-12.51/224. //+t*(-.9/28.)
)))))));
DO(n,3) s+=(z-ArcTania(s))/ArcTaniap(s); return s ; }
z_type Tania(z_type z){ z_type t;
if( fabs(Im(z))< M_PI && Re(z)<-2.51) return TaniaNega(z);
if( abs(z)>7. || Re(z)>3.8 ) return TaniaBig(z);
if( Im(z) > .7 ) return TaniaS(z);
if( Im(z) < -.7) return conj(TaniaS(conj(z)));
return TaniaTay(z);
}
z_type Filog(z_type z){ return Tania(z_type(-1.,-M_PI)+log(z))/(-z);}

Keywords

Tania function, Fixed point of logarithm, Filog, Fixed point, Tetration, Logarithm