1 b3f61791 2004-03-21 devnull #include "os.h"
2 b3f61791 2004-03-21 devnull #include <mp.h>
3 b3f61791 2004-03-21 devnull #include "dat.h"
5 b3f61791 2004-03-21 devnull // return neg, 0, pos as abs(b1)-abs(b2) is neg, 0, pos
7 b3f61791 2004-03-21 devnull mpmagcmp(mpint *b1, mpint *b2)
11 b3f61791 2004-03-21 devnull i = b1->top - b2->top;
13 b3f61791 2004-03-21 devnull return i;
15 b3f61791 2004-03-21 devnull return mpveccmp(b1->p, b1->top, b2->p, b2->top);
18 b3f61791 2004-03-21 devnull // return neg, 0, pos as b1-b2 is neg, 0, pos
20 b3f61791 2004-03-21 devnull mpcmp(mpint *b1, mpint *b2)
22 b3f61791 2004-03-21 devnull if(b1->sign != b2->sign)
23 b3f61791 2004-03-21 devnull return b1->sign - b2->sign;
24 b3f61791 2004-03-21 devnull if(b1->sign < 0)
25 b3f61791 2004-03-21 devnull return mpmagcmp(b2, b1);
27 b3f61791 2004-03-21 devnull return mpmagcmp(b1, b2);