Changeset 73a7ff in git


Ignore:
Timestamp:
May 30, 2006, 9:28:21 AM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
Children:
d45ad9b4fc43037b47292cb6d24fc9e6f9f539df
Parents:
79da9b20f112d01ae5c92f2e7576c6e09b756c2d
Message:
*hannes: more bigint


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

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r79da9b r73a7ff  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.399 2006-05-29 12:34:41 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.400 2006-05-30 07:28:20 Singular Exp $ */
    55
    66/*
     
    639639  }
    640640}
     641static BOOLEAN jjPOWER_BI(leftv res, leftv u, leftv v)
     642{
     643  int e=(int)(long)v->Data();
     644  number n=(number)u->Data();
     645  if (e>=0)
     646  {
     647    nlPower(n,e,(number*)&res->data);
     648  }
     649  else
     650  {
     651    WerrorS("exponent must be non-negative");
     652    return TRUE;
     653  }
     654  if (u!=NULL) return jjOP_REST(res,u,v);
     655  return FALSE;
     656}
    641657static BOOLEAN jjPOWER_N(leftv res, leftv u, leftv v)
    642658{
    643659  int e=(int)(long)v->Data();
    644   number n=(number)u->CopyD(NUMBER_CMD);
     660  number n=(number)u->Data();
     661  int d=0;
    645662  if (e<0)
    646663  {
    647     number m=nInvers(n);
    648     nDelete(&n);
    649     n=m;
     664    n=nInvers(n);
    650665    e=-e;
     666    d=1;
    651667  }
    652668  nPower(n,e,(number*)&res->data);
    653   nDelete(&n);
     669  if (d) nDelete(&n);
    654670  if (u!=NULL) return jjOP_REST(res,u,v);
    655671  return FALSE;
     
    28382854,{jjMOD_N,     INTMOD_CMD,     NUMBER_CMD,     NUMBER_CMD, NUMBER_CMD ALLOW_PLURAL}
    28392855,{jjPOWER_I,   '^',            INT_CMD,        INT_CMD,    INT_CMD ALLOW_PLURAL}
     2856,{jjPOWER_BI,   '^',           BIGINT_CMD,     BIGINT_CMD, INT_CMD ALLOW_PLURAL}
    28402857,{jjPOWER_N,   '^',            NUMBER_CMD,     NUMBER_CMD, INT_CMD ALLOW_PLURAL}
    28412858,{jjPOWER_P,   '^',            POLY_CMD,       POLY_CMD,   INT_CMD ALLOW_PLURAL}
     
    44134430static BOOLEAN jjnInt(leftv res, leftv u)
    44144431{
    4415   number n=(number)u->CopyD(NUMBER_CMD);
     4432  number n=(number)u->Data();
    44164433  res->data=(char *)nInt(n);
    4417   nDelete(&n);
     4434  return FALSE;
     4435}
     4436static BOOLEAN jjnlInt(leftv res, leftv u)
     4437{
     4438  number n=(number)u->Data();
     4439  res->data=(char *)nlInt(n);
    44184440  return FALSE;
    44194441}
     
    44444466,{jjBETTI,      BETTI_CMD,       INTMAT_CMD,     IDEAL_CMD      ALLOW_PLURAL}
    44454467,{jjBETTI,      BETTI_CMD,       INTMAT_CMD,     MODUL_CMD      ALLOW_PLURAL}
     4468,{jjDUMMY,      BIGINT_CMD,      BIGINT_CMD,     BIGINT_CMD     ALLOW_PLURAL}
    44464469,{jjCHAR,       CHARACTERISTIC_CMD, INT_CMD,     RING_CMD       ALLOW_PLURAL}
    44474470,{jjCHAR,       CHARACTERISTIC_CMD, INT_CMD,     QRING_CMD      ALLOW_PLURAL}
     
    45304553,{jjINDEPSET,   INDEPSET_CMD,    INTVEC_CMD,     IDEAL_CMD      NO_PLURAL}
    45314554,{jjDUMMY,      INT_CMD,         INT_CMD,        INT_CMD        ALLOW_PLURAL}
     4555,{jjnlInt,      INT_CMD,         INT_CMD,        BIGINT_CMD     ALLOW_PLURAL}
    45324556,{jjnInt,       INT_CMD,         INT_CMD,        NUMBER_CMD     ALLOW_PLURAL}
    45334557,{jjP2I,        INT_CMD,         INT_CMD,        POLY_CMD       ALLOW_PLURAL}
  • Singular/ipassign.cc

    r79da9b r73a7ff  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipassign.cc,v 1.81 2005-10-24 12:21:41 Singular Exp $ */
     4/* $Id: ipassign.cc,v 1.82 2006-05-30 07:28:21 Singular Exp $ */
    55
    66/*
     
    2626#include "ring.h"
    2727#include "subexpr.h"
     28#include "lists.h"
    2829#include "numbers.h"
    29 #include "lists.h"
     30//#include "modulop.h"
    3031#include "longalg.h"
    3132#include "stairc.h"
     
    283284  if (res->data!=NULL) nDelete((number *)&res->data);
    284285  nNormalize(p);
     286  res->data=(void *)p;
     287  jiAssignAttr(res,a);
     288  return FALSE;
     289}
     290static BOOLEAN jiA_BIGINT(leftv res, leftv a, Subexpr e)
     291{
     292  number p=(number)a->CopyD(BIGINT_CMD);
     293  if (res->data!=NULL) nlDelete((number *)&res->data,NULL);
    285294  res->data=(void *)p;
    286295  jiAssignAttr(res,a);
     
    602611,{jiA_INTVEC,   INTMAT_CMD,     INTMAT_CMD }
    603612,{jiA_NUMBER,   NUMBER_CMD,     NUMBER_CMD }
     613,{jiA_BIGINT,   BIGINT_CMD,     BIGINT_CMD }
    604614,{jiA_LIST_RES, LIST_CMD,       RESOLUTION_CMD }
    605615,{jiA_LIST,     LIST_CMD,       LIST_CMD }
Note: See TracChangeset for help on using the changeset viewer.