Multiplication cries for optimization (e.g. Karatzuba or Toom-Cook)
Division also can be optimized; given a fast multiplication a most straightforward approach is Newton-Raphson.
The semantics of
hugeint_sub
andhugeint_decrement
is questionable, or, if I may say so, surprising.hugeint_ladd_cutoverflow
assumes that the carry fits in anunsigned int
. It is not necessarily a case.I don't think it is a good idea to interpret a
position
beingNULL
as an implicit shift by 1.
↧
Answer by vnp for Arbitrary large unsigned integers
↧