Puzzle 12 Explanation: Go spec2
Understand different types and their behavior in Go.
We'll cover the following...
Try it yourself
Try executing the code below to see the result for yourself.
Press + to interact
package mainimport ("fmt")func main() {fmt.Println(0x1p-2)}
Explanation
Go has several number types. The two main ones are integers and floats.
Integer
These are whole numbers. Go has int8
, int16
, int32
, int64
, and int
. There ...