Changeset be0d84 in git for Singular/mpsr_PutPoly.cc
- Timestamp:
- Mar 8, 1999, 6:30:53 PM (25 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 17e692576cbeb0b918e77a2b33f3d8bac726d8fe
- Parents:
- 55683a9a29c191728a4980caaffdc14fdfbe2a9d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/mpsr_PutPoly.cc
r55683a rbe0d84 3 3 ****************************************/ 4 4 5 /* $Id: mpsr_PutPoly.cc,v 1.1 3 1998-11-13 12:21:00 obachmanExp $ */5 /* $Id: mpsr_PutPoly.cc,v 1.14 1999-03-08 17:30:48 Singular Exp $ */ 6 6 7 7 /*************************************************************** … … 24 24 #include "longalg.h" 25 25 #include "mmemory.h" 26 #include "ring.h"27 26 #include "polys.h" 28 27 #include "ipid.h" … … 91 90 mpsr_InitTempArray(gNvars+1); 92 91 93 if ( (r->ch) == 0)92 if (rField_is_Q(r)) 94 93 // rational numbers 95 94 PutCoeff= PutRationalNumber; 96 else if ( (r->ch) > 1)95 else if (rField_is_Zp(r)) 97 96 // Form our point of view, ModuloP numbers and numbers from 98 97 // GF(p,n) are the same, here. They only differ in the annots 99 98 PutCoeff = PutModuloNumber; 100 else if ( (r->ch) == -1)99 else if (rField_is_R(r)) 101 100 PutCoeff = PutFloatNumber; 102 101 else … … 106 105 mpsr_InitTempArray(gNalgvars); 107 106 PutCoeff = PutAlgNumber; 108 if ( (r->ch) < 0)107 if (rField_is_Zp_a(r)) 109 108 // first, Z/p(a) 110 109 PutAlgAlgNumber = PutModuloNumber; … … 346 345 // Hmm .. this is not according to a "proper" Singular ring, 347 346 // but to be used in a recursive call of mpsr_PutRingAnnots 348 if (r->minpoly != NULL && r->parameter == NULL && r->ch > 0) 347 if (r->minpoly != NULL && r->parameter == NULL 348 && (rField_is_Q_a(r)||rField_is_GF(r))) 349 349 failr(PutMinPolyAnnot(link,r)); 350 350 … … 371 371 372 372 // First element is the coefficient 373 if ( (r->ch) == 0)373 if (rField_is_Q(r)) 374 374 { 375 375 // rational numbers … … 384 384 0)); 385 385 } 386 else if ( (r->ch) > 1)386 else if (rField_is_Zp(r)) 387 387 { 388 388 // modulo p numbers … … 398 398 MP_AnnotValuated)); 399 399 // with Modulo 400 mp_failr(MP_PutUint32Packet(link, r ->ch, 1));400 mp_failr(MP_PutUint32Packet(link, rChar(r), 1)); 401 401 if (r->parameter == NULL) 402 402 { … … 416 416 } 417 417 } 418 else if ( (r->ch) == -1)418 else if (rField_is_R(r)) 419 419 { 420 420 // floats … … 431 431 432 432 alg_r->N = rPar(r); 433 alg_r->ch = (r->ch < 0 ? - (r->ch) : 0);433 alg_r->ch = rChar(r); 434 434 alg_r->order = (int *) Alloc(3*sizeof(int)); 435 435 alg_r->order[2] = ringorder_no; … … 683 683 // need to set PutAlgAlgnumber and gNalgVars 684 684 CurrPutRing = r; 685 if (r ->ch > 0)685 if (rField_is_Zp(r)) // orig: (r->ch > 0) ??? 686 686 PutAlgAlgNumber = PutModuloNumber; 687 687 else
Note: See TracChangeset
for help on using the changeset viewer.