Skip to content

Instantly share code, notes, and snippets.

@suzujun
Last active February 27, 2023 12:57
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suzujun/6a6db0019f1c14c0ec9ff0ea4a495451 to your computer and use it in GitHub Desktop.
Save suzujun/6a6db0019f1c14c0ec9ff0ea4a495451 to your computer and use it in GitHub Desktop.
言語間の整数型範囲まとめ

signed: 符号あり

数値範囲 mysql java golang javascript
-128 ~ 127 tinyint byte int8 -
-32768 ~ 32767 smallint short int16 -
-8388608 ~ 8388607 mediumint (int) (int32) -
-2147483648 ~ 2147483647 int int int32 -
-9223372036854775808 ~ 9223372036854775807 bigint long int64

※カッコは補うためのタイプ

unsigned: 符号なし

数値範囲 mysql java golang javascript
0 ~ 255 tinyint (short) uint8 -
0 ~ 65535 smallint (int) uint16 -
0 ~ 16777215 mediumint (int) (uint32) -
0 ~ 4294967295 int (long) uint32 -
0 ~ 18446744073709551615 bigint java.math.BigInteger uint64 -

※カッコは補うためのタイプ

不動少数点数

範囲 mysql java golang javascript
32bit float float float32 -
64bit double double float64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment