Go doc for Package fmt Floating-point and complex constituents
says:
Floating-point and complex constituents:
%b decimalless scientific notation with exponent a power of two,
in the manner of strconv.FormatFloat with the 'b' format,
e.g. -123456p-78
Code:
fmt.Printf("0b%b
", 255) // 0b11111111
fmt.Printf("%b
", 1.0) // 4503599627370496p-52
What is 4503599627370496p-52
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…