Changeset 84a6a7 in git


Ignore:
Timestamp:
May 29, 2006, 5:14:30 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
Children:
7145030af0d072406bdbbd5f4cbd550cdea8ccba
Parents:
e9fe0516c17fbf29b282b51748cbc90f6e3a2ad2
Message:
*hannes: bigint prep (2)


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

Legend:

Unmodified
Added
Removed
  • Singular/ipid.cc

    re9fe05 r84a6a7  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipid.cc,v 1.73 2005-12-16 08:58:56 Singular Exp $ */
     4/* $Id: ipid.cc,v 1.74 2006-05-29 15:14:29 Singular Exp $ */
    55
    66/*
     
    1818#include "febase.h"
    1919#include "numbers.h"
     20#include "longrat.h"
    2021#include "polys.h"
    2122#include "ring.h"
     
    248249        IDNUMBER(h) = nInit(0);
    249250        break;
     251      case BIGINT_CMD:
     252        IDNUMBER(h) = nlInit(0);
     253        break;
    250254      case IDEAL_CMD:
    251255      case MODUL_CMD:
     
    614618    assume(r!=NULL);
    615619    n_Delete(&IDNUMBER(h),r);
     620  }
     621  // bigint -------------------------------------------------------------
     622  else if (IDTYP(h) == BIGINT_CMD)
     623  {
     624    nlDelete(&IDNUMBER(h),NULL);
    616625  }
    617626  // intvec / intmat  ---------------------------------------------------
  • Singular/subexpr.cc

    re9fe05 r84a6a7  
    55* ABSTRACT: handling of leftv
    66*/
    7 /* $Id: subexpr.cc,v 1.93 2006-02-10 13:12:38 Singular Exp $ */
     7/* $Id: subexpr.cc,v 1.94 2006-05-29 15:14:30 Singular Exp $ */
    88
    99#include <stdlib.h>
     
    2929#include "ffields.h"
    3030#include "numbers.h"
     31#include "longrat.h"
    3132#include "ipshell.h"
    3233#include "lists.h"
     
    184185          }
    185186        case NUMBER_CMD:
     187        case BIGINT_CMD:
    186188          s=String(d);
    187189          if (s==NULL) return;
     
    300302      case NUMBER_CMD:
    301303        if (r!=NULL) n_Delete((number *)(&data),r);
     304        break;
     305      case BIGINT_CMD:
     306        nlDelete((number *)(&data),r);
    302307        break;
    303308      case LIST_CMD:
     
    457462    case NUMBER_CMD:
    458463      return  (void *)nCopy((number)d);
     464    case BIGINT_CMD:
     465      return  (void *)nlCopy((number)d);
    459466    case MAP_CMD:
    460467      return  (void *)maCopy((map)d);
     
    598605    if (name!=NULL) n=name;
    599606    else n=sNoName;
    600     switch (Typ())
     607    int t=Typ();
     608    switch (t /*Typ()*/)
    601609    {
    602610        case INT_CMD:
     
    636644            char* ps = pString((poly) d);
    637645            s = (char*) omAlloc(strlen(ps) + 10);
    638             sprintf(s,"%s(%s)", (Typ() == POLY_CMD ? "poly" : "vector"), ps);
     646            sprintf(s,"%s(%s)", (t /*Typ()*/ == POLY_CMD ? "poly" : "vector"), ps);
    639647            return s;
    640648          }
     
    666674          s = StringAppendS((char*) (typed ? ")" : ""));
    667675          return omStrDup(s);
     676
     677        case BIGINT_CMD:
     678          {
     679          StringSetS((char*) (typed ? "bigint(" : ""));
     680          number nl=(number)d;
     681          nlWrite(nl);
     682          s = StringAppendS((char*) (typed ? ")" : ""));
     683          return omStrDup(s);
     684          }
    668685
    669686        case MATRIX_CMD:
     
    689706          {
    690707            char* ns = (char*) omAlloc(strlen(s) + 10);
    691             sprintf(ns, "%s(%s)", (Typ()==MODUL_CMD ? "module" : "ideal"), s);
     708            sprintf(ns, "%s(%s)", (t/*Typ()*/==MODUL_CMD ? "module" : "ideal"), s);
    692709            omCheckAddr(ns);
    693710            return ns;
     
    703720          {
    704721            char* ns;
    705             if (Typ() == INTMAT_CMD)
     722            if (t/*Typ()*/ == INTMAT_CMD)
    706723            {
    707724              ns = (char*) omAlloc(strlen(s) + 40);
     
    728745          {
    729746            char* ns;
    730             if (Typ() == QRING_CMD)
     747            if (t/*Typ()*/ == QRING_CMD)
    731748            {
    732749              char* id = iiStringMatrix((matrix) ((ring) d)->qideal, dim);
     
    15691586#endif
    15701587      break;
     1588    case BIGINT_CMD:
     1589#ifdef LDEBUG
     1590      nlTest((number)Data());
     1591#endif
     1592      break;
    15711593    case POLY_CMD:
    15721594      pTest((poly)Data());
Note: See TracChangeset for help on using the changeset viewer.