1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#############################################################################
##
#W arithmetic.tst Float Package Laurent Bartholdi
##
#Y Copyright (C) 2011, Laurent Bartholdi
##
#############################################################################
##
## This file tests basic arithmetic
##
#############################################################################
gap> START_TEST("arithmetic");
gap>
gap> x := 1.0;;
gap> IsOne(x);
true
gap> IsZero(x);
false
gap> y := 4*Atan(x);;
gap> y > 3.14 and y < 3.15;
true
gap> x+x = 2.0;
true
gap> x-x = 0.0;
true
gap> Sqrt(x) = 1.0;
true
gap> AbsoluteValue(Sin(y)) < 1.e-10;
true
gap> STOP_TEST( "arithmetic.tst", 3*10^8 );
arithmetic
#E arithmetic.tst . . . . . . . . . . . . . . . . . . . . . . . . . . . .ends here
|