diff options
Diffstat (limited to 'src/zcmp.c')
| -rw-r--r-- | src/zcmp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/zcmp.c b/src/zcmp.c new file mode 100644 index 0000000..2a51d5e --- /dev/null +++ b/src/zcmp.c @@ -0,0 +1,11 @@ +/* See LICENSE file for copyright and license details. */ +#include "internals" + + +int +zcmp(z_t a, z_t b) +{ + if (zsignum(a) != zsignum(b)) + return zsignum(a) < zsignum(b) ? -1 : zsignum(a) > zsignum(b); + return zsignum(a) * zcmpmag(a, b); +} |
