File: arithmetic.tst

package info (click to toggle)
gap-float 0.6.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 612 kB
  • ctags: 593
  • sloc: ansic: 2,568; cpp: 2,013; xml: 177; makefile: 119; sh: 100
file content (34 lines) | stat: -rw-r--r-- 806 bytes parent folder | download | duplicates (2)
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