Use XS prime count for small approx/lower/upper
Changes for 32-bit
32-bit fixes