math/mpint.h (MP_TOINT): Convert MP digits to target type before shifting.