LoginSignup
4
5

More than 5 years have passed since last update.

Golang の 数値型

Last updated at Posted at 2015-06-10

メモ

Goプログラミング言語仕様 - golang.jp

uint8       符号なし  8-ビット 整数 (0 to 255)
uint16      符号なし 16-ビット 整数 (0 to 65535)
uint32      符号なし 32-ビット 整数 (0 to 4294967295)
uint64      符号なし 64-ビット 整数 (0 to 18446744073709551615)

int8        符号あり  8-ビット 整数 (-128 to 127)
int16       符号あり 16-ビット 整数 (-32768 to 32767)
int32       符号あり 32-ビット 整数 (-2147483648 to 2147483647)
int64       符号あり 64-ビット 整数 (-9223372036854775808 to 9223372036854775807)

float32     IEEE-754 32-ビット 浮動小数値
float64     IEEE-754 64-ビット 浮動小数値

complex64   float32の実数部と虚数部を持つ複素数
complex128  float64の実数部と虚数部を持つ複素数

byte        uint8の別名(エイリアス)
rune        int32の別名(エイリアス)
4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5