File: ratfun.tst

package info (click to toggle)
gap 4r4p12-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 29,584 kB
  • ctags: 7,113
  • sloc: ansic: 98,786; sh: 3,299; perl: 2,263; makefile: 498; asm: 63; awk: 6
file content (51 lines) | stat: -rw-r--r-- 1,208 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#############################################################################
##
#W  ratfun.tst                  GAP Tests                    Alexander Hulpke
##
#H  @(#)$Id: ratfun.tst,v 4.4.4.3 2005/05/11 14:53:02 gap Exp $
##
#Y  (C) 1998 School Math. and Comp. Sci., University of St Andrews, Scotland
##
##  To be listed in testall.g
##

gap> START_TEST("$Id: ratfun.tst,v 4.4.4.3 2005/05/11 14:53:02 gap Exp $");
gap> t:=Indeterminate(Rationals,100);;
gap> SetName(t,"t");;
gap> p0:=0*t^0;;
gap> p1:=p0+0*t^0;;
gap> p2:=p0+1*t^0;;
gap> q0:=0;;
gap> q1:=q0+0*t^0;;
gap> q2:=q0+1*t^0;;
gap> List([p1,p2,q1,q2],x->IsPolynomial(x));
[ true, true, true, true ]
gap> List([p1,p2,q1,q2],x->IsRat(x));
[ false, false, false, false ]
gap> Value(p1,1);
0
gap> Value(p2,1);
1
gap> Value(q1,1);
0
gap> Value(q2,-1);
1
gap> y1:=Indeterminate(Rationals,1);;
gap> y2:=Indeterminate(Rationals,2);;
gap> y3:=Indeterminate(Rationals,3);;
gap> mat:=[[y1,1,0],[y2,y1,1],[y3,y2,y1]];;
gap> det:=DeterminantMat(mat*y1^0);;
gap> Value(det,[y1,y2,y3],[1,-5,1]);
12

gap> 1/( y1*y2 );
1/(x_1*x_2)


gap> STOP_TEST( "ratfun.tst", 5800000 );


#############################################################################
##
#E