On Thu, Mar 08, 2001 at 04:28:48PM -0500, Dan Sugalski wrote:
> At 08:43 PM 3/8/2001 +0000, Nicholas Clark wrote:

> I think most processors that do 32x32 multiply provide a way to get the 
> 64-bit result. Whether *we* can is another matter, of course, but if 
> platform folks want to drop to assembly I'm fine with that.

Yeah. Cool. :-)
Much code to maintain :-(

> The potential vagaries of platform math is why I was thinking of 31-bit 
> things, because then all you need do is:
> 
>    int overflow = 0x80000000 & (c = a + b)
> 
> which isn't quite so clever, but still not too bad. :)


Do we need to settle on 31 or 32 at this point?
Do we need to settle on anything - can it vary by platform so that 64 bit
platforms can use 64 bit, in which case the 32/31 choice could even be by
platform (or always 32 if we find it works well)

Nicholas Clark

Reply via email to