18.2 Infinity

  • IsInfinity( obj ) C
  • infinity V

    infinity is a special GAP object that lies in CyclotomicsFamily. It is larger than all other objects in this family. infinity is mainly used as return value of operations such as Size and Dimension for infinite resp. infinite dimensional domains.

    Note that no arithmetic operations are provided for infinity, in particular there is no problem to define what 0 * infinity or infinity - infinity means.

    Often it is useful to distinguish infinity from ``proper'' cyclotomics. For that, infinity lies in the category IsInfinity but not in IsCyc, and the other cyclotomics lie in the category IsCyc but not in IsInfinity.

    gap> s:= Size( Rationals );
    infinity
    gap> s = infinity; IsCyclotomic( s ); IsCyc( s ); IsInfinity( s );
    true
    true
    false
    true
    gap> s in Rationals; s > 17;
    false
    true
    gap> Set( [ s, 2, s, E(17), s, 19 ] );
    [ 2, 19, E(17), infinity ]
    

    [Top] [Previous] [Up] [Next] [Index]

    GAP 4 manual
    February 2000