Use fmod before casting to uint32_t. xlc and sun were saturating to 0xFFFFFFFF instead of taking the low order bits.