Use the NLIMBS macro rather than try and calculate the number of limbs