[Date Prev][Date Next] [Chronological] [Thread] [Top]

**To**:**Howard Chu <hyc@symas.com>****Subject**:**Re: ordered indexing for integers****From**:**Hallvard B Furuseth <h.b.furuseth@usit.uio.no>**- Date: Fri, 30 Nov 2007 14:37:39 +0100
- Cc: OpenLDAP-devel@openldap.org
- In-reply-to: <hbf.20071130al9x@bombur.uio.no>
- References: <4742F5EE.5070100@symas.com> <hbf.20071130al9x@bombur.uio.no>

Also overflow gives wrong ordering: value 0x100000000: index 0480000000 value 0x80000000: index 0580800000 I'm too tired to figure out what the code does at overflow now, and maybe I misunderstood the discussion earlier, but it should give the right _ordering_ for overflow even if it can't make a very exact index. I wrote: > To get the correct ordering, use normal (fully sign-extended) two's > complement but with the sign bit inversed. (Same as value + max > positive value + 1) Actually, looking at lutil_str2bin() one's complement would be easier:-) And maybe it needs to turn '-0' into '0'? I think that's invalid LDAP Integer syntax so it doesn't matter in that context, but still. -- Regards, Hallvard

**Follow-Ups**:**Re: ordered indexing for integers***From:*Howard Chu <hyc@symas.com>

**References**:**ordered indexing for integers***From:*Howard Chu <hyc@symas.com>

**Re: ordered indexing for integers***From:*Hallvard B Furuseth <h.b.furuseth@usit.uio.no>

- Prev by Date:
**Re: ordered indexing for integers** - Next by Date:
**Re: ordered indexing for integers** - Index(es):