# Three notations by Iverson

The floor of y is the greatest integer less than or equal to y and is denoted ⌊y⌋.

Similarly, the ceiling of y is the smallest integer greater than or equal to y and is denoted ⌈y⌉.

Both of these notations were introduced by Kenneth Iverson. Before Iverson’s notation caught on, you might see [x] for the floor of x, and I don’t know whether there was a notation for ceiling.

There was also a lack of standardization over whether [x] meant to round x down or round it to the nearest integer. Iverson’s notation caught on because it’s both mnemonic and symmetrical.

Iverson also invented the notation of using a Boolean expression inside square brackets to indicate the function that is 1 when the argument is true and 0 when it is false. I find this notation very convenient. I’ve used it on projects for two different clients recently.

Here’s an equation from Concrete Mathematics using all three Iverson notations discussed here:

x⌉ – ⌊x⌋ = [x is not an integer].

In words, the ceiling of x minus the floor of x is 1 when x is not an integer and 0 when x is an integer.
{"ft_lang_label":"__label__en","ft_lang_prob":0.91732466,"math_prob":0.95799345,"size":1378,"snap":"2022-40-2023-06","text_gpt3_token_len":348,"char_repetition_ratio":0.13609898,"word_repetition_ratio":0.03265306,"special_character_ratio":0.22714078,"punctuation_ratio":0.083636366,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9847957,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-05T07:27:11Z\",\"WARC-Record-ID\":\"<urn:uuid:4ad3cc1e-23b5-4973-a934-1e57d240ace4>\",\"Content-Length\":\"53644\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:90302c6b-26ed-4816-8204-88887b45352e>\",\"WARC-Concurrent-To\":\"<urn:uuid:22b85f87-6760-4565-a444-7b9e0b6d9558>\",\"WARC-IP-Address\":\"74.208.236.113\",\"WARC-Target-URI\":\"https://www.johndcook.com/blog/2020/08/18/three-notations-by-iverson/\",\"WARC-Payload-Digest\":\"sha1:XKFDMHTYA7CZKMIHQJHNBEXUE43JGLVA\",\"WARC-Block-Digest\":\"sha1:VR4W5NTCADPNU4VKSN645GVOJHFUWCTA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500250.51_warc_CC-MAIN-20230205063441-20230205093441-00297.warc.gz\"}"}