Better mod for bigint, added halve, div is voluntarily broken