gap> 
gap> 
gap> # Start
gap> 
gap> START_TEST( "Test of the 'if' package" );
gap> SizeScreen([80]);;
gap> 
gap> 
gap> IF_Interface(IF_yacas, "Gcd", [1000, 360] );
40
gap> 
gap> 
gap> # the conversion using OpenMath is tested
gap> 
gap> #I  Searching Method for OMPut with 2 arguments:
gap> #I  Total: 16 entries
gap> #I  Method 1: ``OMPut: for a range'', value: 40
gap> 
gap> IF_Interface(IF_yacas, "", [ [3..10] ] );
[ 3 .. 10 ]
gap> 
gap> 
gap> #I  Method 2: ``OMPut: for a matrix'', value: 32
gap> 
gap> IF_Interface(IF_yacas, "", [ [[11,12],[21,22]] ] );
[ [ 11, 12 ], [ 21, 22 ] ]
gap> 
gap> 
gap> #I  Method 3: ``OMPut: for a character table'', value: 23
gap> #I  Method 4: ``OMPut: for a group'', value: 23
gap> #I  Method 5: ``OMPut: for an integer'', value: 20
gap> 
gap> IF_Interface(IF_yacas, "", [ 10^72 ] );
1000000000000000000000000000000000000000000000000000000000000000000000000
gap> IF_Interface(IF_yacas, "", [ 10^3930 ] )=10^3930; # longer number are apparently not supported
true
gap> 
gap> 
gap> #I  Method 6: ``OMPut: for a rational'', value: 19
gap> 
gap> IF_Interface(IF_yacas, "", [ 10/72 ] );
5/36
gap> 
gap> 
gap> #I  Method 7: ``OMPut: for infinity'', value: 18
gap> 
gap> IF_Interface(IF_yacas, "", [ infinity ] );
infinity
gap> 
gap> 
gap> #I  Method 8: ``OMPut: for a proper cyclotomic'', value: 18
gap> 
gap> IF_Interface(IF_yacas, "", [ 2/3+5/4*E(4) ] );
2/3+5/4*E(4)
gap> 
gap> 
gap> #I  Method 9: ``OMPut: for a row vector'', value: 14
gap> 
gap> IF_Interface(IF_yacas, "", [ [1,2,3] ] );
[ 1, 2, 3 ]
gap> 
gap> 
gap> #I  Method 10: ``OMPut: for a hasse diagram'', value: 13
gap> #I  Method 11: ``OMPut: for a set'', value: 10
gap> 
gap> IF_Interface(IF_yacas, "", [ [] ] );
[  ]
gap> IF_Interface(IF_yacas, "", [ Set([true,false]) ] );
[ true, false ]
gap> 
gap> #I  Method 12: ``OMPut: for a permutation'', value: 10
gap> #I  Method 13: ``OMPut: for a string'', value: 7
gap> 
gap> ## IF_Interface(IF_yacas, "", [ "ciao" ] );
gap> 
gap> 
gap> #I  Method 14: ``OMPut: for a function'', value: 3
gap> #I  Method 15: ``OMPut: for a boolean'', value: 3
gap> 
gap> IF_Interface(IF_yacas, "", [ false ] );
false
gap> 
gap> 
gap> #I  Method 16: ``OMPut: for a list or collection'', value: 3
gap> 
gap> IF_Interface(IF_yacas, "", [ [ false, true, infinity, 1, 0 ] ] );
[ false, true, infinity, 1, 0 ]
gap> 
gap> 
gap> 
gap> # end of test file
gap> 
gap> STOP_TEST( "test", 10000 );
Test of the 'if' package
GAP4stones: 16
gap> 
