Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1 Combined patch

open
nobody
None
5
2008-09-01
2008-09-01
Peter N Lewis
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

     
    Attachments