- Timestamp:
- Oct 5, 2016, 5:36:44 PM (8 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 4aaf5920e25e841ccd0432b72d165b4d869a69bcd5cda0dfd81e6ccd6676b5a7762d696d084d9dad
- Parents:
- 65d6837cb0e0c17ca95e439bb49e5ed0e7fc2e9309cb63f3434835f3538f07adbf3c476e26186d46
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2016-10-05 17:36:44+02:00
- git-committer:
- GitHub <noreply@github.com>2016-10-05 17:36:44+02:00
- Location:
- Singular
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/surfacesignature.lib
r09cb63f rd5122e 334 334 { 335 335 number a,b; 336 int r;336 bigint r; 337 337 a = numerator(n); 338 338 b = denominator(n); 339 int z = int(number(a));340 int y = int(number(b));339 bigint z = bigint(a); 340 bigint y = bigint(b); 341 341 r = z mod y; 342 int q = (z-r) div y;343 number n1 = q;344 number n2 = n -n1;342 bigint q = (z-r) div y; 343 number n1 = number(q); 344 number n2 = number(n-n1); 345 345 return(n2); 346 346 } -
Singular/LIB/tropical.lib
r65d683 rd5122e 4727 4727 // which in a later version 4728 4728 // should be interpreded by Singular 4729 intvec wneu=choosegfanvector(read("/tmp/gfanoutput"),0, anzahlvariablen)[1];4729 intvec wneu=choosegfanvector(read("/tmp/gfanoutput"),0,homogentest)[1]; 4730 4730 setring PREGFANRING; 4731 4731 } … … 5450 5450 ///////////////////////////////////////////////////////////////////////// 5451 5451 5452 static proc choosegfanvector (string s,int findall,int anzahlvariablen)5453 "USAGE: choosegfanvector(s ); s string5452 static proc choosegfanvector (string s,int findall,int homogentest) 5453 "USAGE: choosegfanvector(s,fa,h); s string, fa,h int 5454 5454 RETURN: list, the jth entry is the jth integer vector contained in s 5455 5455 NOTE: the procedure is called from tropicalparametrise" … … 5467 5467 // the last entry in ww should correspond to the homogenisation variable 5468 5468 // (and can be omitted), unless the input to gfan was already homogeneous 5469 if ( anzahlvariablen==size(ww)-1)5469 if (homogentest==0) 5470 5470 { 5471 5471 ww=ww[1..size(ww)-1]; … … 5497 5497 { 5498 5498 execute("www=intvec("+w+");"); 5499 if ( anzahlvariablen==size(ww)-1)5499 if (homogentest==0) 5500 5500 { 5501 5501 ww[i]=intvec(www[1..size(www)-1]); … … 5667 5667 int numberdeletedvariables; // the number of deleted variables 5668 5668 int oldanzahlvariablen=anzahlvariablen; // anzahlvariablen for later reference 5669 int homogentest=0; 5669 5670 list liftings,partliftings; // the computed liftings (all resp. partly) 5670 5671 // consider each ring which has been returned when computing the zeros of the … … 5718 5719 // it suffices to homogenise an arbitrary system of generators 5719 5720 // II=groebner(II); 5721 homogentest=homog(II); 5720 5722 II=homog(II,maxideal(1)[nvars(PREGFANRING)+1]); 5721 5723 // if gfan version >= 0.3.0 is used and the characteristic … … 5785 5787 // which in a later version 5786 5788 // should be interpreded by Singular 5787 wneulist=choosegfanvector(read("/tmp/gfanoutput"),findall, anzahlvariablen);5789 wneulist=choosegfanvector(read("/tmp/gfanoutput"),findall,homogentest); 5788 5790 setring PREGFANRING; 5789 5791 } -
Singular/subexpr.cc
r09cb63f rd5122e 235 235 break; 236 236 } 237 case NUMBER_CMD:238 237 case BIGINT_CMD: 239 if (t==NUMBER_CMD)240 {241 number n=(number)d;242 nNormalize(n);243 d=n;244 }245 238 s=String(d); 246 239 if (s==NULL) return; … … 249 242 omFree((ADDRESS)s); 250 243 break; 244 case NUMBER_CMD: 245 { 246 number n=(number)d; 247 nNormalize(n); 248 if ((number)d !=n) 249 { 250 d=n; 251 if (rtyp==IDHDL) IDNUMBER(((idhdl)data))=n; 252 else if(rtyp==NUMBER_CMD) data=(void*)n; 253 } 254 s=String(d); 255 if (s==NULL) return; 256 PrintS(s); 257 omFree((ADDRESS)s); 258 break; 259 } 251 260 case LIST_CMD: 252 261 { … … 822 831 case NUMBER_CMD: 823 832 StringSetS((char*) (typed ? "number(" : "")); 824 if ((rtyp==IDHDL)&&(IDTYP((idhdl)data)==NUMBER_CMD)) 825 { 826 nWrite(IDNUMBER((idhdl)data)); 827 } 828 else if (rtyp==NUMBER_CMD) 829 { 830 number n=(number)data; 831 nWrite(n); 832 data=(char *)n; 833 } 834 else if((rtyp==VMINPOLY)&&(rField_is_GF(currRing))) 833 if((rtyp==VMINPOLY)&&(rField_is_GF(currRing))) 835 834 { 836 835 nfShowMipo(currRing->cf); … … 838 837 else 839 838 { 840 number n=nCopy((number)d); 841 nWrite(n); 842 nDelete(&n); 839 nWrite((number)d); 843 840 } 844 841 StringAppendS((char*) (typed ? ")" : ""));
Note: See TracChangeset
for help on using the changeset viewer.