Changeset ea11dc in git


Ignore:
Timestamp:
Feb 16, 2011, 3:51:13 PM (13 years ago)
Author:
Mohamed Barakat <mohamed.barakat@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
1628d3bf1aeaf963c1526ddb08897203dc352ddd
Parents:
6131742d9c3d9355ca824df2aada696af30a31fd
git-author:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-02-16 15:51:13+01:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 11:59:28+01:00
Message:
fixed longrat.{cc,h}
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/structs.h

    r613174 rea11dc  
    642642#endif
    643643
    644 #if defined(__cplusplus)
    645 static inline int si_max(const int a, const int b)  { return (a>b) ? a : b; }
    646 static inline int si_min(const int a, const int b)  { return (a<b) ? a : b; }
    647 static inline long si_max(const long a, const long b)  { return (a>b) ? a : b; }
    648 static inline unsigned long si_max(const unsigned long a, const unsigned long b)  { return (a>b) ? a : b; }
    649 static inline long si_min(const long a, const long b)  { return (a<b) ? a : b; }
    650 static inline unsigned long si_min(const unsigned long a, const unsigned long b)  { return (a<b) ? a : b; }
    651 #else
    652 #define si_max(A,B) ((A) > (B) ? (A) : (B))
    653 #define si_min(A,B) ((A) < (B) ? (A) : (B))
    654 #endif
    655 
    656644extern omBin char_ptr_bin;
    657645extern omBin sleftv_bin;
  • libpolys/coeffs/ffields.cc

    r613174 rea11dc  
    9292  0 };
    9393
    94 const char* eati(const char *s, int *i)
    95 {
    96   int l=0;
    97 
    98   if    (*s >= '0' && *s <= '9')
    99   {
    100     *i = 0;
    101     while (*s >= '0' && *s <= '9')
    102     {
    103       *i *= 10;
    104       *i += *s++ - '0';
    105       l++;
    106       if ((l>=MAX_INT_LEN)||((*i) <0))
    107       {
    108         s-=l;
    109         Werror("`%s` greater than %d(max. integer representation)",
    110                 s,INT_MAX);
    111         return s;
    112       }
    113     }
    114   }
    115   else *i = 1;
    116   return s;
    117 }
    118 
    11994/*1
    12095* numbers in GF(p^n):
  • libpolys/coeffs/longrat.cc

    r613174 rea11dc  
    77*/
    88
    9 #include <kernel/mod2.h>
    10 #include <kernel/structs.h>
    11 #include <kernel/longrat.h>
     9#include <coeffs/longrat.h>
    1210
    1311// 64 bit version:
  • libpolys/coeffs/longrat.h

    r613174 rea11dc  
    4848LINLINE BOOLEAN  nlEqual(number a, number b, const coeffs r);
    4949LINLINE number   nlInit(int i, const coeffs r);
    50 number nlRInit (int i);
     50number nlRInit (long i);
    5151LINLINE BOOLEAN  nlIsOne(number a, const coeffs r);
    5252LINLINE BOOLEAN  nlIsZero(number za, const coeffs r);
Note: See TracChangeset for help on using the changeset viewer.