Advertisement
Advertisement


What is the maximum value for an int32?


Question

I can never remember the number. I need a memory rule.

2019/07/17
1
1380
7/17/2019 8:00:09 AM

Accepted Answer

It's 2,147,483,647. Easiest way to memorize it is via a tattoo.

2018/02/21
5072
2/21/2018 1:13:53 AM

The most correct answer I can think of is Int32.MaxValue.

2008/09/18

If you think the value is too hard to remember in base 10, try base 2: 1111111111111111111111111111111

2010/06/01

if you can remember the entire Pi number, then the number you are looking for is at the position 1,867,996,680 till 1,867,996,689 of the decimal digits of Pi

The numeric string 2147483647 appears at the 1,867,996,680 decimal digit of Pi. 3.14......86181221809936452346214748364710527835665425671614...

source: http://www.subidiom.com/pi/


It's 10 digits, so pretend it's a phone number (assuming you're in the US). 214-748-3647. I don't recommend calling it.

2008/09/18

Rather than think of it as one big number, try breaking it down and looking for associated ideas eg:

  • 2 maximum snooker breaks (a maximum break is 147)
  • 4 years (48 months)
  • 3 years (36 months)
  • 4 years (48 months)

The above applies to the biggest negative number; positive is that minus one.

Maybe the above breakdown will be no more memorable for you (it's hardly exciting is it!), but hopefully you can come up with some ideas that are!

2008/09/18

Source: https://stackoverflow.com/questions/94591
Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Email: [email protected]