Integer representation
Taral
taralx at gmail.com
Wed Jun 29 12:10:10 PDT 2005
00 80 00 is what you want. The reason being that in two's complement,
80 00 is -0x7fff.
On 6/29/05, meepbear * <meepbear at hotmail.com> wrote:
> I have a rather pesky bug I've wasted the past few hours on trying to track
> it down: DH assertions work fine except 1 in every so many will fail for no
> apparant reason.
>
> My best guess so far is that it has to do with integer representations. For
> instance if I have 0x8000 hexadecimal is that supposed to go down the wire
> as "8000" or "08000" or "008000"?
> I have no idea how Perl store its bigints so I need some help with this :).
>
> It's either a problem with the most significant bit that would signal a
> negative number if they're not unsigned in which case I'd just need to pad
> with a leading zero(s) and/or an alignment problem in which case I would
> need to know if they're word or double word aligned.
>
>
>
--
Taral <taralx at gmail.com>
More information about the yadis
mailing list