Changeset 92fab96 in git


Ignore:
Timestamp:
Jun 13, 2006, 3:39:02 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
b859e37eb1c7f486aa9e47ec9868d29fd23e5339
Parents:
ffde366b5edf43184cdef9fba1212ec84b1b00c5
Message:
*hannes: bigint(number)


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

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rffde366 r92fab96  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: iparith.cc,v 1.400 2006-05-30 07:28:20 Singular Exp $ */
     4/* $Id: iparith.cc,v 1.401 2006-06-13 13:39:00 Singular Exp $ */
    55
    66/*
     
    37373737  return FALSE;
    37383738}
     3739static BOOLEAN jjN2BI(leftv res, leftv v)
     3740{
     3741  number n,i; i=(number)v->Data();
     3742  if (rField_is_Zp())     n=nlInit((int)(long)i);
     3743  else if (rField_is_Q())
     3744  {
     3745    if ((SR_HDL(i)&SR_INT)==SR_INT) n=nlInit((int)SR_TO_INT(i));
     3746    else if (i->s==3)               n=nlCopy(i);
     3747    else goto err;
     3748  }
     3749  else goto err;
     3750  res->data=(void *)n;
     3751  return FALSE;
     3752err:
     3753  WerrorS("cannot convert to bigint"); return TRUE;
     3754}
    37393755static BOOLEAN jjNAMEOF(leftv res, leftv v)
    37403756{
     
    44664482,{jjBETTI,      BETTI_CMD,       INTMAT_CMD,     IDEAL_CMD      ALLOW_PLURAL}
    44674483,{jjBETTI,      BETTI_CMD,       INTMAT_CMD,     MODUL_CMD      ALLOW_PLURAL}
     4484,{jjN2BI,       BIGINT_CMD,      NUMBER_CMD,     BIGINT_CMD     ALLOW_PLURAL}
    44684485,{jjDUMMY,      BIGINT_CMD,      BIGINT_CMD,     BIGINT_CMD     ALLOW_PLURAL}
    44694486,{jjCHAR,       CHARACTERISTIC_CMD, INT_CMD,     RING_CMD       ALLOW_PLURAL}
  • Singular/ipconv.cc

    rffde366 r92fab96  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipconv.cc,v 1.30 2006-06-13 10:21:00 Singular Exp $ */
     4/* $Id: ipconv.cc,v 1.31 2006-06-13 13:39:02 Singular Exp $ */
    55/*
    66* ABSTRACT: automatic type conversions
     
    187187}
    188188
    189 static void * iiN2BI(void *data)
    190 {
    191   number n,i; i=(number)data;
    192   if (rField_is_Zp())     n=nlInit((int)(long)data);
    193   else if (rField_is_Q())
    194   {
    195     if ((SR_HDL(i)&SR_INT)==SR_INT) n=nlInit((int)SR_TO_INT(i));
    196     else if (i->s==3)               n=nlCopy(i);
    197     else { WerrorS("cannot convert to bigint"); n=nlInit(0); }
    198   }
    199   else { WerrorS("cannot convert to bigint"); n=nInit(0); }
    200   return (void *)n;
    201 }
    202189static void * iiN2P(void *data)
    203190{
     
    295282//  number -> matrix
    296283   { NUMBER_CMD,      MATRIX_CMD,     iiN2Ma  , NULL },
    297 //  number -> bigint
    298    { NUMBER_CMD,      BIGINT_CMD,     iiN2P  , NULL },
    299284//  number -> ideal
    300285//  number -> vector
Note: See TracChangeset for help on using the changeset viewer.