File: arithmetic.tst

package info (click to toggle)
gap-float 1.0.7%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 640 kB
  • sloc: ansic: 2,154; cpp: 2,018; xml: 194; makefile: 112; sh: 1
file content (35 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (3)
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
35
#############################################################################
##
#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> IsFloat(x);
true
gap> IsOne(x);
true
gap> IsZero(x);
false
gap> y := 4*Atan(x);;
gap> IsFloat(y);
true
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 );