pub fn zigzag(x: i64) -> u64
Map a signed integer onto an unsigned one so small magnitudes stay short.