private static int CompareNoLeadingZeroes(
int xIndx,
int[] x,
int yIndx,
int[] y)
{
int diff = (x.Length - y.Length) - (xIndx - yIndx);
if (diff != 0)
{
return diff < 0 ? -1 : 1;
}
// lengths of magnitudes the same, test the magnitude values
while (xIndx < x.Length)
{
uint v1 = (uint)x[xIndx++];
uint v2 = (uint)y[yIndx++];
if (v1 != v2)
return v1 < v2 ? -1 : 1;
}
return 0;
}