spielwiese
Last change
on this file since 24e7427 was
24e7427,
checked in by Michael Brickenstein <bricken@…>, 18 years ago
|
*bricken: ring access, adjustment to updates
git-svn-id: file:///usr/local/Singular/svn/trunk@9036 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
681 bytes
|
Line | |
---|
1 | //ring s=0,(x,y,z),lp; |
---|
2 | |
---|
3 | ring r=0,(x,y,z),lp; |
---|
4 | timer=1; |
---|
5 | LIB("python_module.so"); |
---|
6 | Python_module::python("from Singular import * |
---|
7 | iv=IntVector() |
---|
8 | iv.append(1) |
---|
9 | iv.append(2) |
---|
10 | iv.append(3) |
---|
11 | print Polynomial(iv) |
---|
12 | zero=Number(0) |
---|
13 | one=Number(1) |
---|
14 | zerop=Polynomial(0) |
---|
15 | onep=Polynomial(1) |
---|
16 | |
---|
17 | #deprecated |
---|
18 | xy=Polynomial('xy') |
---|
19 | print xy |
---|
20 | comp=Polynomial('xy+1') |
---|
21 | print comp |
---|
22 | #the same as only monomials are build |
---|
23 | |
---|
24 | z=Polynomial('z'); |
---|
25 | z*=Number(3); |
---|
26 | print z,xy |
---|
27 | print xy+Number(1) |
---|
28 | print z+xy |
---|
29 | print z,xy |
---|
30 | print xy*xy |
---|
31 | print xy |
---|
32 | for t in ((xy+Number(1))*(xy+Number(-1))): |
---|
33 | print t,-t,t |
---|
34 | import util |
---|
35 | r=util.create_ring(char=0,nvars=3, ordering='lp') |
---|
36 | r.set() |
---|
37 | z2=Polynomial('z') |
---|
38 | #the following should fail |
---|
39 | #print z+z2 |
---|
40 | "); |
---|
41 | $ |
---|
Note: See
TracBrowser
for help on using the repository browser.