docs icon indicating copy to clipboard operation
docs copied to clipboard

Feedback: Use Math Powers to describe INT ranges of values.

Open fabiog1901 opened this issue 1 year ago • 0 comments

Fabio Ghirardello (fabiog1901) commented:

Page: https://www.cockroachlabs.com/docs/v24.1/int#names-and-aliases

What is the reason for your feedback?

[ ] Missing the information I need

[ x] Too complicated

[ ] Out of date

[ ] Something is broken

[ ] Other

Additional details

It would be helpful to also describe the Range of the various INT types as math powers. For example, INT8 should be described as 2^64 / 2 + 1 to 2^64 / 2 - 1. This makes it clear how we got to those very large numbers.

Plus, it would be nice to format the numbers with 1000 notation, as in 9,223,372,036,854,775,807.

>>> 2**64 // -2 + 1
-9223372036854775807
>>> 2**64 // 2 - 1
9223372036854775807

Jira Issue: DOC-10546

fabiog1901 avatar Jun 17 '24 12:06 fabiog1901