Compare two same-type numeric values, returning results consistent with compareRank's "rank order" (i.e., treating both positive and negative zero as equal and placing NaN as self-equal after all other numbers).