Menu

#1 Combined patch

open
nobody
None
5
2008-09-01
2008-09-01
No

Please excuse me if I have not got the patch format correct, I'm not much used to SourceForge or public patch/diffs.

This patch patches BaseBigInt/RossiBigInt to:

* Use mutable for vector<ulong> units_, which is required for:
* Use const for conceptually const operators like operator+
* Remove units_not_front_back_is_null and just call truncate_units which makes the same test immediately anyway.
* Make resize_units/truncate_units const as they do not change the value of the object.
* Add inline operations for +*/% acting on ulong.
* Add inline operators for all comparisons except operator<, which are all based on operator<.
* Fixed operator< to not touch its input operand at all.

* Perhaps most importantly, corrected bugs in operator-= which are probably the cause of the two Help messages in the Forum. operator-= erroneously assumes that the input argument vector is no longer than *this' vector.

Hopefully this is useful.

Discussion

  • Peter N Lewis

    Peter N Lewis - 2008-09-01

    Patch file

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.