On 5/3/24 11:32 PM, Paul Eggert wrote: > Not quite, because it doesn't check for padding bits.
Sorry, I should have clarified excluding that part... > Also, your code assumes that preprocessor arithmetic works the same as > runtime arithmetic. Although C23 guarantees this (because it > guarantees two's complement) I don't think C17 and earlier do. If > memory serves, they even allow mixed-runtime systems, where arithmetic > is sometimes ones' complement and sometimes two's. Ah, interesting. Thanks for the explanation. Collin