From: Ming Qian > Sent: 09 March 2022 05:02 ... > 3. use 'val >> 1' instead of ' val / 2' The compiler should do that anyway. Especially for unsigned values. And it has the wrong (different) rounding for negative values. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)