Files

1.4 KiB

title, type, source, source_url, author, handle, post_id, date, archived, draft, tags, description, in_reply_to
title type source source_url author handle post_id date archived draft tags description in_reply_to
Needs repeating: You can always perform a signed integer range test with a single comparison. archive twitter https://x.com/EricLengyel/status/867967467770920960 Eric Lengyel EricLengyel 867967467770920960 2017-05-26 2026-08-27 false
archive
twitter
EricLengyel
Needs repeating: You can always perform a signed integer range test with a single comparison.

Source

Thread

1/ @EricLengyel ^867967467770920960

Needs repeating: You can always perform a signed integer range test with a single comparison. unsigned(x - lo) <= unsigned(hi - lo)

Branches: archive/threads/EricLengyel/2017-05-26-needs-repeating-you-can-always-perform-a-signed/2017-05-26-vaughncato-shouldnt-that-be-unsigned-x-unsigned-lo-unsigned, archive/threads/EricLengyel/2017-05-26-needs-repeating-you-can-always-perform-a-signed/2017-05-26-vaughncato-otherwise-ub-if-hi-int-max-and-lo-int-min, archive/threads/EricLengyel/2017-05-26-needs-repeating-you-can-always-perform-a-signed/2017-05-26-noop_dev-yeah-this-is-one-of-the-things-coworkers-hate-me, archive/threads/EricLengyel/2017-05-26-needs-repeating-you-can-always-perform-a-signed/2017-05-27-sreekotay-one-of-my-favs-and-special-cases-possible-for