Robbepop / apint

Arbitrary precision integers library.
Other
26 stars 4 forks source link

implement add and mul functions for Digit and ApInt and unit test #19

Closed AaronKutch closed 6 years ago

AaronKutch commented 6 years ago

I have added 3 macros (that will be shared with the division algorithm I am writing), added some methods to Digit and DoubleDigit for convenience, replaced the unimplemented! section in the checked_mul_assign function, and added a rigorous unit test. I have not done any benchmarking yet but after I implement division I plan on doing so. I think there are some improvements that can be done by adding another macro for when no overflow is possible, and a Karatsuba routine should be made, but for now this is good.

AaronKutch commented 6 years ago

Are you going to do the renaming (e.g. checked_mul_assign to assign_wrapping_mul ) after this?

AaronKutch commented 6 years ago

I should have checked the diff before issuing the pull request. It looks like my formatter does not like the extra spaces, and for some reason identation has been decreased by one. I'm not sure how to fix that

AaronKutch commented 6 years ago

I think my editor is somehow using tabs I will fix this

AaronKutch commented 6 years ago

I'm going to redo this

coveralls commented 6 years ago

Coverage Status

Coverage increased (+1.4%) to 69.894% when pulling e63b70f70d3bf7e1af9a2ae05c8d64fb2a89f96e on AaronKutch:iss18 into a8d800ea225e53127021e6e24d3d656d7cd38b9a on Robbepop:master.