aboutsummaryrefslogtreecommitdiffstats
path: root/src/zcmp.c
blob: 2a51d5e172ee76b385c806975639c838d66f1ae5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
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);
}