‣ IsPMComplex | ( filter ) |
‣ PMCOMPLEX_FAMILY | ( family ) |
‣ PMCOMPLEX_PSEUDOFIELD | ( global variable ) |
‣ PMCOMPLEX | ( global variable ) |
A "poor man's" implementation of complex numbers, based on the underlying 64-bit floating-point numbers in GAP.
Strictly speaking, complex numbers do not form a field in GAP, because associativity etc. do not hold. Still, a field is defined, PMCOMPLEX_FIELD
, making it possible to construct an indeterminate and rational functions, to be passed to FR's routines.
These complex numbers can be made the default floating-point numbers via SetFloats(PMCOMPLEX);
. They may then be entered as standard floating-point numbers, with the suffix _z
.
gap> z := Indeterminate(PMCOMPLEX_FIELD,"z"); z gap> (z+1/2)^5/(z-1/2); (z^5+2.5*z^4+2.5*z^3+1.25*z^2+0.3125*z+0.03125)/(z+(-0.5)) gap> NewFloat(IsPMComplex,1,2); 1+2i gap> last^2; -3+4i gap> RealPart(last); -3 gap> Norm(last2); 25 gap> NewFloat(IsPMComplex,"1+2*I"); 1+2i gap> RootsFloat(z^2-5); [ 2.23607, -2.23607 ] gap> RootsFloat(ListWithIdenticalEntries(80,1.0_z)); [ 0.987688+0.156434i, 0.996917+0.0784591i, 0.996917-0.0784591i, 0.987688-0.156434i, 0.760406+0.649448i, 0.92388+0.382683i, 0.951057-0.309017i, 0.97237+0.233445i, 0.809017+0.587785i, 0.522499+0.85264i, 0.649448+0.760406i, 0.891007+0.45399i, 0.587785+0.809017i, 0.707107+0.707107i, 0.951057+0.309017i, 0.233445+0.97237i, 0.45399+0.891007i, 0.309017+0.951057i, 0.382683+0.92388i, 0.85264+0.522499i, -0.59719-0.608203i, -0.867574-0.11552i, -0.186972-0.990223i, -0.999006+0.318176i, -0.739308+0.0272973i, -0.432752-0.7287i, -0.672709+0.537561i, 0.156434+0.987688i, 0.295424-0.953359i, 0.588289-0.808509i, 0.455128-0.893999i, 0.0951213-1.01063i, 0.229628-0.939435i, -0.216054-0.95336i, -0.914152+0.49378i, 0.524052-0.853005i, 0.97237-0.233445i, -0.233486+0.972416i, 0.379514-0.92918i, 3.09131e-07+1.i, 0.182752-0.984684i, 0.891007-0.45399i, -0.0892207-1.01443i, 0.852641-0.522499i, 0.00247318-1.02032i, 0.92388-0.382683i, -0.585832+0.81608i, 0.809018-0.587792i, -0.656055+0.770506i, 0.760385-0.649467i, -0.452862+0.889692i, -0.0784562+0.996918i, 0.707015-0.707079i, 0.0784591+0.996917i, -0.15643+0.987703i, -0.307608-0.969002i, 0.649377-0.760134i, -0.382904+0.92328i, -0.857704+0.573345i, -0.403754-0.946275i, -0.827986-0.648221i, -0.990655-0.396897i, -0.929824-0.488558i, -0.671579-0.790133i, -0.886052-0.560249i, -1.05047-0.0873829i, -0.496236-0.900246i, -0.726008+0.713809i, -1.02514+0.223541i, -1.01722-0.277614i, -0.585809-0.852796i, -0.518635+0.85364i, -1.04842+0.0255453i, -0.752485-0.724528i, -0.309225+0.951018i, -0.9612+0.409487i, -0.793651+0.646744i, -1.01735-0.194111i, -1.04161+0.124175i ] gap> AsSortedList(List(last,AbsoluteValue)); [ 0.739812, 0.847513, 0.852377, 0.861109, 0.875231, 0.967092, 0.977534, 0.998083, 0.998317, 0.998841, 0.99953, 0.999747, 0.999886, 0.999916, 0.999996, 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.00001, 1.00001, 1.00003, 1.00005, 1.00112, 1.0015, 1.00318, 1.0037, 1.00458, 1.00772, 1.01197, 1.01509, 1.01665, 1.01814, 1.01834, 1.02033, 1.0238, 1.02796, 1.02881, 1.03169, 1.03462, 1.0357, 1.03698, 1.03899, 1.04459, 1.04479, 1.04832, 1.04845, 1.04873, 1.04899, 1.04923, 1.05036, 1.05155, 1.0541, 1.05442, 1.0672 ]
DeclareGlobalFunction("Mandel");
‣ Mandel ( [map] ) | ( function ) |
Returns: Calls the external program mandel
.
This function starts the external program mandel
, by Wolf Jung. The program is searched for along the standard PATH; alternatively, its location can be set in the string variable EXEC@FR.mandel.
When called with no arguments, this command returns starts mandel
in its default mode. With a rational map as argument, it starts mandel
pointing at that rational map.
More information on mandel
can be found at http://www.mndynamics.com.
DeclareOperation("NonContractingSubmatrix", [IsMatrix]);
‣ NonContractingSubmatrix ( mat ) | ( operation ) |
Returns: fail
or a list of indices l
such that mat{l}{l}
is irreducible and non-contracting
This function computes a minimal submatrix whose spectral radius is \(\geq1\). If none exists, it returns fail
.
gap> NonContractingSubmatrix([[2]]); [ 1 ] gap> NonContractingSubmatrix([[1/2]]); fail gap> NonContractingSubmatrix([[0,1],[1,0]]); [ 1, 2 ] gap> NonContractingSubmatrix([[0,1],[0,1]]); [ 2 ]
‣ InfoIMG | ( info class ) |
This is an Info
class for the package IMG. The command SetInfoLevel(InfoIMG,1);
switches on the printing of some information during the computations of certain IMG functions; in particular all automatic conversions between IMG machines and Mealy machines.
The command SetInfoLevel(InfoIMG,2);
requests a little more information, and in particular prints intermediate results in potentially long calculations such as...
The command SetInfoLevel(InfoIMG,3);
ensures that IMG will print information every few seconds or so. This is useful to gain confidence that the program is not stuck due to a programming bug by the author of IMG.
generated by GAPDoc2HTML