• motsu@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    4
    ·
    1 year ago

    Can you give more context to where the phrasing is used? Coming from a computer science angle, there are different data types for different things. For instance, you would use a “float” (floating point) data type to store a number like 7.12. Likewise, you use an “int” to store a whole number (such as 7). Because computers use a certain number of bits to store information, this means there’s a max size to your data. int data types specifically have a “signed int” option as well as an “unsigned int” (the latter being a non negative integer). The benefit there is that by not storing a sign, the int can store numbers about 2x as large as a signed int.

    If I dont need to ever store a negative value, I might explicitly call out that when writing out an algorithm