Changeset d0a51ee in git
- Timestamp:
- May 5, 2010, 4:42:53 PM (13 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 371bc5f2b1adfa76d36a0242eb9c7d7cb44b9b92
- Parents:
- 3510a61a2a6264c7487502f0c82c410e2f92369f
- git-author:
- Martin Lee <martinlee84@web.de>2010-05-05 16:42:53+02:00
- git-committer:
- Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:51:40+01:00
- Location:
- coeffs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
coeffs/coeffs.h
r3510a6 rd0a51ee 154 154 short float_len; /* additional char-flags, rInit */ 155 155 short float_len2; /* additional char-flags, rInit */ 156 157 BOOLEAN ShortOut; /// ffields need this. 158 156 159 }; 157 160 -
coeffs/ffields.cc
r3510a6 rd0a51ee 14 14 #include "numbers.h" 15 15 #include "ffields.h" 16 17 18 typedef void* ADDRESS; 19 20 #define MAX_INT_LEN 11 16 21 17 22 int nfCharQ=0; /* the number of elemts: q*/ … … 106 111 s-=l; 107 112 Werror("`%s` greater than %d(max. integer representation)", 108 s, MAX_INT_VAL);113 s,INT_MAX); 109 114 return s; 110 115 } … … 484 489 *i *= 10; 485 490 *i += *s++ - '0'; 486 if (*i > ( MAX_INT_VAL/ 10)) *i = *i % nfCharP;491 if (*i > (INT_MAX / 10)) *i = *i % nfCharP; 487 492 } 488 493 while (*s >= '0' && *s <= '9'); … … 564 569 int nfMinPoly[16]; 565 570 566 void nfShowMipo( )571 void nfShowMipo(const coeffs r) 567 572 { 568 573 int i=nfMinPoly[0]; … … 572 577 j++; 573 578 if (nfMinPoly[j]!=0) 574 StringAppend("%d*%s^%d",nfMinPoly[j], currRing->parameter[0],i);579 StringAppend("%d*%s^%d",nfMinPoly[j],r->parameter[0],i); 575 580 i--; 576 581 if(i<0) break; … … 692 697 * map Z/p -> GF(p,n) 693 698 */ 694 number nfMapP(number c )695 { 696 return nfInit((int)((long)c), currRing);699 number nfMapP(number c, const coeffs src, const coeffs dst) 700 { 701 return nfInit((int)((long)c), dst); 697 702 } 698 703 … … 701 706 */ 702 707 int nfMapGG_factor; 703 number nfMapGG(number c )708 number nfMapGG(number c, const coeffs src, const coeffs dst) 704 709 { 705 710 int i=(long)c; … … 711 716 * map GF(p,n1) -> GF(p,n2), n1 > n2, n2 | n1 712 717 */ 713 number nfMapGGrev(number c )718 number nfMapGGrev(number c, const coeffs src, const coeffs dst) 714 719 { 715 720 int ex=(int)((long)c); … … 723 728 * set map function nMap ... -> GF(p,n) 724 729 */ 725 nMapFunc nfSetMap(const ring src, const ringdst)730 nMapFunc nfSetMap(const coeffs r, const coeffs src, const coeffs dst) 726 731 { 727 732 if (nField_is_GF(src,nfCharQ)) 728 733 { 729 return ndCopy ; /* GF(p,n) -> GF(p,n) */734 return ndCopyMap; /* GF(p,n) -> GF(p,n) */ 730 735 } 731 736 if (nField_is_GF(src)) … … 744 749 if ((n2 % n1)==0) 745 750 { 746 int save_ch= currRing->ch;747 char **save_par= currRing->parameter;751 int save_ch=r->ch; 752 char **save_par=r->parameter; 748 753 nfSetChar(src->ch,src->parameter); 749 754 int nn=nfPlus1Table[0];
Note: See TracChangeset
for help on using the changeset viewer.