Changeset 4bebba in git for Singular/ipshell.cc


Ignore:
Timestamp:
May 10, 2007, 9:48:36 AM (17 years ago)
Author:
Oliver Wienand <wienand@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
009d804796df43404d81c335304a5d0d04f0705f
Parents:
2a4de844a903a486ebd9eb9e66e636b0c391710c
Message:
New ring definition and flags in sip_ring


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

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    r2a4de84 r4bebba  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipshell.cc,v 1.156 2007-05-03 13:52:25 wienand Exp $ */
     4/* $Id: ipshell.cc,v 1.157 2007-05-10 07:48:36 wienand Exp $ */
    55/*
    66* ABSTRACT:
     
    554554}
    555555
    556 #ifdef HAVE_RING2TOM
     556#ifdef HAVE_RING2TOM_OLD
    557557// avoid to test the "special" char: -1, 0, 1, 2
    558558int Is2toM(int p)  /* brute force !!!! */
     
    43664366{
    43674367  int ch;
    4368 #if defined(HAVE_RING2TOM)|| defined(HAVE_RINGMODN)
    4369   int cring = 0;
     4368#ifdef HAVE_RINGS
     4369  int ringtype = 0;
     4370  unsigned long ringflaga = 0;
     4371  unsigned int ringflagb = 0;
    43704372#endif
    43714373  int float_len=0;
     
    44224424    }
    44234425    ch = module;
    4424     cring = 2;
     4426    ringtype = 2;
     4427    ringflaga = module;
    44254428  }
    44264429#endif
     
    44294432  && (strcmp(pn->name,"modpow")==0))
    44304433  {
    4431     long base = 0;
    4432     long exp = 0;
     4434    unsigned long base = 0;
     4435    unsigned int exp = 0;
    44334436    if ((pn->next!=NULL) && (pn->next->Typ()==INT_CMD))
    44344437    {
     
    44374440      if ((pn->next!=NULL) && (pn->next->Typ()==INT_CMD))
    44384441      {
    4439         exp = (unsigned long) pn->next->Data();
     4442        exp = (unsigned int) (unsigned long) pn->next->Data();
    44404443        pn=pn->next;
    44414444      }
     
    44494452    if (base == 2)
    44504453    {
    4451       cring = 1; // Use Z/2^ch
     4454      ringtype = 1; // Use Z/2^ch
     4455      ringflaga = exp;
    44524456      Print("Beta: using Z/2^%d", ch);
    44534457      PrintLn();
     
    44554459    else
    44564460    {
    4457       cring = base;
     4461      ringtype = 3;
     4462      ringflaga = base;
     4463      ringflagb = exp;
     4464      // ch = base**exp
    44584465      Werror("p^n not yet implemented");
    44594466      goto rInitError;
     
    44834490  */
    44844491  if ((ch!=-1)
    4485 #if defined(HAVE_RING2TOM)|| defined(HAVE_RINGMODN)
    4486        && (cring == 0)
     4492#ifdef HAVE_RINGS
     4493       && (ringtype == 0)
    44874494#endif
    44884495     )
     
    45204527  R = (ring) omAlloc0Bin(sip_sring_bin);
    45214528  R->ch = ch;
    4522 #ifdef HAVE_RING2TOM
    4523   R->cring = cring;
     4529#ifdef HAVE_RINGS
     4530  R->ringtype = ringtype;
     4531  R->ringflaga = ringflaga;
     4532  R->ringflagb = ringflagb;
    45244533#endif
    45254534  if (ch == -1)
Note: See TracChangeset for help on using the changeset viewer.