Changeset 9c97cd4 in git for Singular/ipshell.cc


Ignore:
Timestamp:
Sep 12, 2013, 3:50:34 PM (11 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '6e5adcba05493683b94648c659a729c189812c77')
Children:
534bf97a4c2f4b22e8d36d3ab35606b3938e6a087627f67da8dc2c135f659c4e3f2ef25e3de4f00e
Parents:
56209f8653229a50b5d3c8ae9e5b129acee31d02
Message:
chg: Z/n can be defined via integer,n for bigint n
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    r56209f r9c97cd4  
    17081708  LL->Init(2);
    17091709    LL->m[0].rtyp=INT_CMD;
    1710     LL->m[0].data=(void *)si_max(R->cf->float_len,SHORT_REAL_LENGTH/2);
     1710    LL->m[0].data=(void *)(long)si_max(R->cf->float_len,SHORT_REAL_LENGTH/2);
    17111711    LL->m[1].rtyp=INT_CMD;
    1712     LL->m[1].data=(void *)si_max(R->cf->float_len2,SHORT_REAL_LENGTH);
     1712    LL->m[1].data=(void *)(long)si_max(R->cf->float_len2,SHORT_REAL_LENGTH);
    17131713  L->m[1].rtyp=LIST_CMD;
    17141714  L->m[1].data=(void *)LL;
     
    18061806    // char:
    18071807    Lc->m[0].rtyp=INT_CMD;
    1808     Lc->m[0].data=(void*)r->cf->m_nfCharQ;
     1808    Lc->m[0].data=(void*)(long)r->cf->m_nfCharQ;
    18091809    // var:
    18101810    lists Lv=(lists)omAlloc0Bin(slists_bin);
     
    18411841  {
    18421842    L->m[0].rtyp=INT_CMD;
    1843     L->m[0].data=(void *)r->cf->ch;
     1843    L->m[0].data=(void *)(long)r->cf->ch;
    18441844  }
    18451845  // ----------------------------------------
     
    51775177    modBase = (int_number) omAlloc(sizeof(mpz_t));
    51785178    mpz_init_set_si(modBase, 0);
    5179     if ((pn->next!=NULL) && (pn->next->Typ()==INT_CMD))
    5180     {
    5181       mpz_set_ui(modBase, (int)(long) pn->next->Data());
    5182       pn=pn->next;
    5183       if ((pn->next!=NULL) && (pn->next->Typ()==INT_CMD))
    5184       {
    5185         modExponent = (long) pn->next->Data();
     5179    if (pn->next!=NULL)
     5180    {
     5181      if (pn->next->Typ()==INT_CMD)
     5182      {
     5183        mpz_set_ui(modBase, (int)(long) pn->next->Data());
    51865184        pn=pn->next;
    5187       }
    5188       while ((pn->next!=NULL) && (pn->next->Typ()==INT_CMD))
    5189       {
    5190         mpz_mul_ui(modBase, modBase, (int)(long) pn->next->Data());
    5191         pn=pn->next;
     5185        if ((pn->next!=NULL) && (pn->next->Typ()==INT_CMD))
     5186        {
     5187          modExponent = (long) pn->next->Data();
     5188          pn=pn->next;
     5189        }
     5190        while ((pn->next!=NULL) && (pn->next->Typ()==INT_CMD))
     5191        {
     5192          mpz_mul_ui(modBase, modBase, (int)(long) pn->next->Data());
     5193          pn=pn->next;
     5194        }
     5195      }
     5196      else if (pn->next->Typ()==BIGINT_CMD)
     5197      {
     5198        number p=(number)pn->next->CopyD();
     5199        nlGMP(p,(number)modBase,coeffs_BIGINT);
     5200        nlDelete(&p,coeffs_BIGINT);
    51925201      }
    51935202    }
Note: See TracChangeset for help on using the changeset viewer.