|
Message-ID: <FABE2D10-EF65-442B-BB46-4D636C7BC28F@trust-in-soft.com> Date: Sun, 23 Sep 2018 03:44:46 +0000 From: Pascal Cuoq <cuoq@...st-in-soft.com> To: "musl@...ts.openwall.com" <musl@...ts.openwall.com> Subject: Re: un-UBify-strings > On 23 Sep 2018, at 05:15, Rich Felker <dalias@...c.org> wrote: > > dist(s,d)==n is a no-overlap case. In this case the formula I proposed has the drawback of rejecting the case where (uintptr_t)s-(uintptr_t)d is exactly -n. This case may be the justification for the way the original comparison was expressed: > (uintptr_t)s-(uintptr_t)d-n <= -2*n (uintptr_t)s-(uintptr_t)d = -n ==> comparison true by LHS and RHS being equal (uintptr_t)s-(uintptr_t)d = n ==> comparison true by LHS being zero (uintptr_t)s-(uintptr_t)d > -n and (uintptr_t)s-(uintptr_t)d < n ==> comparison false
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.