Changeset 1c7953 in git for kernel


Ignore:
Timestamp:
Sep 13, 2007, 4:17:08 PM (17 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c5facdfddea2addfd91babd8b9019161dea4b695')
Children:
01a57be60f163f44715ff7f3812b07c7ae891a78
Parents:
65bed3e3b194419dbe07eddc61d688cab60323cd
Message:
*hannes: 64bit adaption


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

Legend:

Unmodified
Added
Removed
  • kernel/ffields.cc

    r65bed3 r1c7953  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ffields.cc,v 1.6 2007-07-31 15:32:32 Singular Exp $ */
     4/* $Id: ffields.cc,v 1.7 2007-09-13 14:17:08 Singular Exp $ */
    55/*
    66* ABSTRACT: finite fields with a none-prime number of elements (via tables)
     
    146146#endif
    147147  if (((long)a == (long)nfCharQ) || ((long)b == (long)nfCharQ))
    148     return (number)nfCharQ;
     148    return (number)(long)nfCharQ;
    149149  /*else*/
    150150  int i=(int)((long)a+(long)b);
    151151  if (i>=nfCharQ1) i-=nfCharQ1;
    152152#ifdef LDEBUG
    153   nfTest((number)i);
    154 #endif
    155   return (number)i;
     153  nfTest((number)(long)i);
     154#endif
     155  return (number)(long)i;
    156156}
    157157
     
    163163  // Hmm .. this is just to prevent initialization
    164164  // from nfInitChar to go into an infinite loop
    165   if (i==0) return (number)nfCharQ;
     165  if (i==0) return (number)(long)nfCharQ;
    166166  while (i <  0)    i += nfCharP;
    167167  while (i >= nfCharP) i -= nfCharP;
    168   if (i==0) return (number)nfCharQ;
     168  if (i==0) return (number)(long)nfCharQ;
    169169  CARDINAL c=0;
    170170  while (i>1)
     
    174174  }
    175175#ifdef LDEBUG
    176   nfTest((number)c);
    177 #endif
    178   return (number)c;
     176  nfTest((number)(long)c);
     177#endif
     178  return (number)(long)c;
    179179}
    180180
Note: See TracChangeset for help on using the changeset viewer.