5 // return neg, 0, pos as abs(b1)-abs(b2) is neg, 0, pos
7 mpmagcmp(mpint *b1, mpint *b2)
11 i = b1->flags | b2->flags;
13 return mpvectscmp(b1->p, b1->top, b2->p, b2->top);
15 i = b1->top - b2->top;
19 return mpveccmp(b1->p, b1->top, b2->p, b2->top);
22 // return neg, 0, pos as b1-b2 is neg, 0, pos
24 mpcmp(mpint *b1, mpint *b2)
28 sign = (b1->sign - b2->sign) >> 1; // -1, 0, 1
29 return sign | (sign&1)-1 & mpmagcmp(b1, b2)*b1->sign;