compareNumerics = (left, right) => {
  // eslint-disable-next-line @endo/restrict-comparison-operands
  if (left < right) return -1;
  // eslint-disable-next-line @endo/restrict-comparison-operands
  if (left > right) return 1;
  if (NumberIsNaN(left) === NumberIsNaN(right)) return 0;
  if (NumberIsNaN(right)) return -1;
  assert(NumberIsNaN(left));
  return 1;
}
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).

@template {number | bigint} T
@param {T} left
@param {T} right
@returns {RankComparison}