* Eamonn McManus:

> On 3 February 2012 00:11, Florian Weimer <fwei...@bfk.de> wrote:
>> Would it make sense to replace (x ^ r) < 0 && (x ^ y) >= 0
>> with (x ^ y ^ r) < 0?
>
> That would not be correct. For example, it would signal overflow for -1 + 1.

Oops.  But there has to be a way to implement this using just one
comparison.

-- 
Florian Weimer                <fwei...@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

Reply via email to