## File: gaussian.tst

package info (click to toggle)
gap 4r4p12-2
 `123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118` ``````############################################################################# ## #W gaussian.tst GAP library Thomas Breuer ## #H @(#)\$Id: gaussian.tst,v 4.9.4.3 2005/08/29 14:50:35 gap Exp \$ ## #Y Copyright (C) 1996, Lehrstuhl D fuer Mathematik, RWTH Aachen, Germany ## ## To be listed in testall.g ## gap> START_TEST("\$Id: gaussian.tst,v 4.9.4.3 2005/08/29 14:50:35 gap Exp \$"); gap> 257 in GaussianIntegers; true gap> 257 + 17*E(4) in GaussianIntegers; true gap> 1/2 in GaussianIntegers; false gap> 1 + E(3) in GaussianIntegers; false gap> 257 in GaussianRationals; true gap> 257 + 17*E(4) in GaussianRationals; true gap> 1/2 in GaussianRationals; true gap> 1 + E(3) in GaussianRationals; false gap> IsSubset( GaussianRationals, GaussianIntegers ); true gap> Quotient( GaussianIntegers, 35, 5 ); 7 gap> Quotient( GaussianIntegers, 35, 1+2*E(4) ); 7-14*E(4) gap> Quotient( GaussianIntegers, 35, 1+E(4) ); fail gap> IsAssociated( GaussianIntegers, 4, -4*E(4) ); true gap> IsAssociated( GaussianIntegers, 4*E(4), -4 ); true gap> IsAssociated( GaussianIntegers, 4*E(4), 5 ); false gap> StandardAssociate( GaussianIntegers, 4 ); 4 gap> StandardAssociate( GaussianIntegers, -4 ); 4 gap> StandardAssociate( GaussianIntegers, 1-E(4) ); 1+E(4) gap> StandardAssociate( GaussianIntegers, 1+E(4) ); 1+E(4) gap> EuclideanDegree( GaussianIntegers, 1+E(4) ); 2 gap> EuclideanDegree( GaussianIntegers, 2 ); 4 gap> EuclideanRemainder( GaussianIntegers, 35, 7 ); 0 gap> EuclideanRemainder( GaussianIntegers, 5, 1+2*E(4) ); 0 gap> EuclideanRemainder( GaussianIntegers, 5, 1+E(4) ); -1 gap> EuclideanRemainder( GaussianIntegers, 5-2*E(4), 1+E(4) ); -1 gap> EuclideanQuotient( GaussianIntegers, 35, 7 ); 5 gap> EuclideanQuotient( GaussianIntegers, 5, 1+2*E(4) ); 1-2*E(4) gap> EuclideanQuotient( GaussianIntegers, 5, 1+E(4) ); 3-3*E(4) gap> EuclideanQuotient( GaussianIntegers, 5-2*E(4), 1+E(4) ); 2-4*E(4) gap> QuotientRemainder( GaussianIntegers, 35, 7 ); [ 5, 0 ] gap> QuotientRemainder( GaussianIntegers, 5, 1+2*E(4) ); [ 1-2*E(4), 0 ] gap> QuotientRemainder( GaussianIntegers, 5, 1+E(4) ); [ 3-3*E(4), -1 ] gap> QuotientRemainder( GaussianIntegers, 5-2*E(4), 1+E(4) ); [ 2-4*E(4), -1 ] gap> IsPrime( GaussianIntegers, 3 ); true gap> IsPrime( GaussianIntegers, 5 ); false gap> IsPrime( GaussianIntegers, 2+E(4) ); true gap> IsPrime( GaussianIntegers, 1+2*E(4) ); true gap> IsPrime( GaussianIntegers, 5-E(4) ); false gap> Factors( GaussianIntegers, 35 ); [ 2-E(4), 2+E(4), 7 ] gap> Factors( GaussianIntegers, 255 ); [ -3, 1+2*E(4), 2+E(4), 1+4*E(4), 4+E(4) ] gap> Factors( GaussianIntegers, 2+E(4) ); [ 2+E(4) ] gap> Factors( GaussianIntegers, 1+2*E(4) ); [ 1+2*E(4) ] gap> Factors( GaussianIntegers, 5-E(4) ); [ 1-E(4), 3+2*E(4) ] gap> STOP_TEST( "gaussian.tst", 600000 ); ############################################################################# ## #E ``````