Changeset cfce1fc in git


Ignore:
Timestamp:
Feb 15, 2008, 6:11:49 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '91fdef05f09f54b8d58d92a472e9c4a43aa4656f')
Children:
f8936f565657685235517dead95409e8ff929d77
Parents:
b0db25abf3084c7d7d01f25d0aba758412326e95
Message:
*hannes: cast bigint -> number


git-svn-id: file:///usr/local/Singular/svn/trunk@10576 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipconv.cc

    rb0db25 rcfce1fc  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipconv.cc,v 1.35 2007-01-29 18:19:59 Singular Exp $ */
     4/* $Id: ipconv.cc,v 1.36 2008-02-15 17:11:49 Singular Exp $ */
    55/*
    66* ABSTRACT: automatic type conversions
     
    128128}
    129129
     130extern number ngfMapQ(number from); // gnumpfl.cc
     131extern number ngcMapQ(number from); // gnumpc.cc
     132extern number nrMapQ(number from);  // shortfl.cc
     133
     134static void * iiBI2N(void *data)
     135{
     136  if (currRing==NULL) return NULL;
     137  // a bigint is really a number from char 0, with diffrent operations...
     138  if (rField_is_Q())      return (void*)nlCopy((number)data);
     139  if (rField_is_Zp())     return (void*)npMap0((number)data);
     140  if (rField_is_long_R()) return (void*)ngfMapQ((number)data);
     141  if (rField_is_long_C()) return (void*)ngcMapQ((number)data);
     142  if (rField_is_R())      return (void*)nrMapQ((number)data);
     143  if (rField_is_Q_a())    return (void*)naMap00((number)data);
     144  if (rField_is_Zp_a())   return (void*)naMap0P((number)data);
     145  WerrorS("cannot convert bigint to this ring");
     146  return NULL;
     147}
     148
    130149static void * iiIm2Ma(void *data)
    131150{
     
    226245//  int -> intvec
    227246   { INT_CMD,         INTVEC_CMD,     iiI2Iv , NULL },
     247//  bigint -> number
     248   { BIGINT_CMD,      NUMBER_CMD,     iiBI2N , NULL },
    228249//  intvec -> intmat
    229250   { INTVEC_CMD,      INTMAT_CMD,     iiDummy, NULL },
Note: See TracChangeset for help on using the changeset viewer.