Re: Signed division with rounding towards -infinity (and floating point rounding)

2007-09-18 Thread Christopher Key
Tim Prince wrote: > Christopher Key wrote: > > >> I have some code that needs to perform signed division by a power of two >> with rounding towards minus infinity, i.e. it requires an arithmetic >> right shift. Now in the C specification, right shifting a signed &

Signed division with rounding towards -infinity (and floating point rounding)

2007-09-18 Thread Christopher Key
Hello, Apologies if this has already been covered; I've searched the archives and not found anything. I have some code that needs to perform signed division by a power of two with rounding towards minus infinity, i.e. it requires an arithmetic right shift. Now in the C specification, right shift