Changeset 0e64fdd in git


Ignore:
Timestamp:
Jun 11, 1999, 7:13:40 PM (24 years ago)
Author:
Mathias Schulze <mschulze@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
74fe50d0de12691ddaa37a4a8527e5e220253ab8
Parents:
32820ddece73298afa8bef909edd914a3d0b8c3f
Message:
*** empty log message ***


git-svn-id: file:///usr/local/Singular/svn/trunk@3126 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/mod2.h.in

    r32820d r0e64fdd  
    227227#if SIZEOF_EXPONENT == 1
    228228#define MAX_EXPONENT 0x7f
    229 #define MAX_COMPONENT 0xff
     229#define MAX_COMPONENT 0x7f
    230230#elif SIZEOF_EXPONENT == 2
    231 #define MAX_EXPONENT 0xffff
    232 #define MAX_COMPONENT 0xff
     231#define MAX_EXPONENT 0x7fff
     232#define MAX_COMPONENT 0x7fff
    233233#else /* SIZEOF_EXPONENT == 4 */
    234234#define MAX_EXPONENT 0x7fffffff
    235 #define MAX_COMPONENT 0xffffffff
     235#define MAX_COMPONENT 0x7fffffff
    236236#endif
    237237
  • Singular/pcv.cc

    r32820d r0e64fdd  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: pcv.cc,v 1.24 1999-06-11 14:45:29 Singular Exp $ */
     4/* $Id: pcv.cc,v 1.25 1999-06-11 17:13:40 mschulze Exp $ */
    55/*
    66* ABSTRACT: conversion between polys and coef vectors
     
    174174  for(int i=0;i<pcvMaxDegree;i++)
    175175    pcvIndex[0][i]=i;
     176  unsigned k,l;
    176177  for(int i=1;i<pVariables;i++)
    177178  {
    178     unsigned x=0;
     179    k=0;
    179180    for(int j=0;j<pcvMaxDegree;j++)
    180181    {
    181       unsigned y=pcvIndex[i-1][j];
    182       if(y>(unsigned)~0-x)
     182      l=pcvIndex[i-1][j];
     183      if(l>unsigned(~0)-k)
    183184      {
    184185        j=pcvMaxDegree;
     
    186187        WerrorS("unsigned overflow");
    187188      }
    188       pcvIndex[i][j]=x+=y;
     189      else pcvIndex[i][j]=k+=l;
    189190    }
    190191  }
     
    207208int pcvM2N(poly m)
    208209{
    209   unsigned n=0,d=0;
     210  unsigned n=0,dn,d=0;
    210211  for(int i=0;i<pVariables;i++)
    211212  {
    212213    d+=pGetExp(m,i+1);
    213     n+=pcvIndex[i][d];
     214    dn=pcvIndex[i][d];
     215    if(dn>MAX_COMPONENT-n)
     216    {
     217      i=pVariables;
     218      WerrorS("component overflow");
     219    }
     220    else n+=dn;
    214221  }
    215222  return n+1;
  • Singular/pcv.h

    r32820d r0e64fdd  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: pcv.h,v 1.12 1999-06-09 11:53:06 mschulze Exp $ */
     4/* $Id: pcv.h,v 1.13 1999-06-11 17:13:33 mschulze Exp $ */
    55/*
    66* ABSTRACT: conversion between polys and coef vectors
     
    2020void pcvInit(int d);
    2121void pcvClean();
     22int pcvM2N(poly m);
     23poly pcvN2M(int n);
    2224poly pcvP2CV(poly p,int d0,int d1);
    2325poly pcvCV2P(poly cv,int d0,int d1);
Note: See TracChangeset for help on using the changeset viewer.