Changeset be0d84 in git for Singular/mpsr_PutPoly.cc


Ignore:
Timestamp:
Mar 8, 1999, 6:30:53 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
17e692576cbeb0b918e77a2b33f3d8bac726d8fe
Parents:
55683a9a29c191728a4980caaffdc14fdfbe2a9d
Message:
* hannes: access to coeff-description via functions (1. approach)


git-svn-id: file:///usr/local/Singular/svn/trunk@2890 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/mpsr_PutPoly.cc

    r55683a rbe0d84  
    33****************************************/
    44
    5 /* $Id: mpsr_PutPoly.cc,v 1.13 1998-11-13 12:21:00 obachman Exp $ */
     5/* $Id: mpsr_PutPoly.cc,v 1.14 1999-03-08 17:30:48 Singular Exp $ */
    66
    77/***************************************************************
     
    2424#include "longalg.h"
    2525#include "mmemory.h"
    26 #include "ring.h"
    2726#include "polys.h"
    2827#include "ipid.h"
     
    9190  mpsr_InitTempArray(gNvars+1);
    9291
    93   if ((r->ch) == 0)
     92  if (rField_is_Q(r))
    9493    // rational numbers
    9594    PutCoeff= PutRationalNumber;
    96   else if ((r->ch) > 1)
     95  else if (rField_is_Zp(r))
    9796    // Form our point of view, ModuloP numbers and numbers from
    9897    // GF(p,n) are the same, here. They only differ in the annots
    9998    PutCoeff = PutModuloNumber;
    100   else if ((r->ch) == -1)
     99  else if (rField_is_R(r))
    101100    PutCoeff = PutFloatNumber;
    102101  else
     
    106105    mpsr_InitTempArray(gNalgvars);
    107106    PutCoeff = PutAlgNumber;
    108     if ((r->ch) < 0)
     107    if (rField_is_Zp_a(r))
    109108      // first, Z/p(a)
    110109      PutAlgAlgNumber = PutModuloNumber;
     
    346345  // Hmm .. this is not according to a "proper" Singular ring,
    347346  // 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)))
    349349    failr(PutMinPolyAnnot(link,r));
    350350 
     
    371371
    372372  // First element is the coefficient
    373   if ((r->ch) == 0)
     373  if (rField_is_Q(r))
    374374  {
    375375    // rational numbers
     
    384384                                    0));
    385385  }
    386   else if ((r->ch) > 1)
     386  else if (rField_is_Zp(r))
    387387  {
    388388    // modulo p numbers
     
    398398                                    MP_AnnotValuated));
    399399    // with Modulo
    400     mp_failr(MP_PutUint32Packet(link, r->ch, 1));
     400    mp_failr(MP_PutUint32Packet(link, rChar(r), 1));
    401401    if (r->parameter == NULL)
    402402    {
     
    416416    }
    417417  }
    418   else if ((r->ch) == -1)
     418  else if (rField_is_R(r))
    419419  {
    420420    // floats
     
    431431
    432432    alg_r->N = rPar(r);
    433     alg_r->ch = (r->ch < 0 ? - (r->ch) : 0);
     433    alg_r->ch = rChar(r);
    434434    alg_r->order = (int *) Alloc(3*sizeof(int));
    435435    alg_r->order[2] = ringorder_no;
     
    683683  // need to set PutAlgAlgnumber and gNalgVars
    684684  CurrPutRing = r;
    685   if (r->ch > 0)
     685  if (rField_is_Zp(r)) // orig: (r->ch > 0) ???
    686686    PutAlgAlgNumber = PutModuloNumber;
    687687  else
Note: See TracChangeset for help on using the changeset viewer.