Re: infinint left shift operation
Denis Corbin <[email protected]> Wed, 22 Jun 2005 14:17:20 +0200
| Newsgroups | gmane.comp.sysutils.backup.dar.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Wesley Leggette wrote: | | Hi, Hello, | | When using the "operator <<=" I'm getting weird results: | | [...] | | I call the equivalent of dar_infinint_shiftl(4, 1), getting the | following results: | | a original = 4 | b original = 1 | value = 2048 | | Both operators return incorrect values. OK, I have found the bug. The << operator was not properly implemented for shift not multiple of 8 bits. This is now fixed in CVS (branch_2_2_x), note that the operator << of class real_infinint is not used in dar/lidar, so this bug had no impact on dar/libdar. | | | I also get: | | a original = 1000 | b original = 1 | value = 512000 | | | Right shift seems to work okay. Thanks for feedback, | | | Thanks. | | | Cheers, Denis. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCuVbPpC5CI8gYGlIRAuh7AJ4jqVe6GDPNN0ATYfHKyaRZqFYqBQCff7tm +o8KY9HO9x+oC8cJ4p5Ximo= =nh5/ -----END PGP SIGNATURE----- ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click