
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/07/2010 02:30 PM, DE wrote:
i may misunderstand all this so better see e.g. http://en.wikipedia.org/wiki/Two's_complement
Thanks, I glanced through it to refresh my memory.
i suggest to pack the sign in the MSB of the most significant digit to get rid of the bool it still would be a sign-magnitude representation
so retrievel would be like
digits[n_digits - 1]&(1<<15)/*==0*/
but perhaps you would need to set that bit to 0 during some operations which involves some additional overhead
Since the savings would be minimal, and it would increase the overhead (even more than you mentioned), I don't think it's worth it. - -- Chad Nelson Oak Circle Software, Inc. * * * -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEUEARECAAYFAku88R8ACgkQp9x9jeZ9/wSJ6gCXbUGaElqm4nYPJnB12BsitZta 2ACeL/B7FzzLK4pF9kCOML2RCVQeAwM= =fbh5 -----END PGP SIGNATURE-----