在Go中,有一個部分用于數字類型,但我不太清楚某些定義。在這種情況下,“無符號”,“所有有符號的集合”,“虛構部分”是什么意思?uint8 the set of all unsigned 8-bit integers (0 to 255)uint16 the set of all unsigned 16-bit integers (0 to 65535)uint32 the set of all unsigned 32-bit integers (0 to 4294967295)uint64 the set of all unsigned 64-bit integers (0 to 18446744073709551615)int8 the set of all signed 8-bit integers (-128 to 127)int16 the set of all signed 16-bit integers (-32768 to 32767)int32 the set of all signed 32-bit integers (-2147483648 to 2147483647)int64 the set of all signed 64-bit integers (-9223372036854775808 to 9223372036854775807)float32 the set of all IEEE-754 32-bit floating-point numbersfloat64 the set of all IEEE-754 64-bit floating-point numberscomplex64 the set of all complex numbers with float32 real and imaginary partscomplex128 the set of all complex numbers with float64 real and imaginary partsbyte alias for uint8rune alias for int32參考資料: https://golang.org/ref/spec#Numeric_types
1 回答

墨色風雨
TA貢獻1853條經驗 獲得超6個贊
var x complex128 = complex(1, 2) // 1+2i
復數的最大值:complex128(1.7976931348623157e+308 + 1.7976931348623157e+308 i)
如果你熟悉復數,那么你可以理解它。否則這里 = 或i
root of (-1)
i^2 = -1
無符號表示僅正數和 0。
uint64 系列0 to 18,446,744,073,709,551,615
uint32 范圍0 to 4,294,967,295
和平均值 從負到正的總數范圍set of signed
- 1 回答
- 0 關注
- 137 瀏覽
添加回答
舉報
0/150
提交
取消