You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, in hexadecimal constants the exponent is still in decimal and is a power of two. Thus this example is 30/2 not 30/16. (Anyway 0.9375 is 15/16; not sure how you got that.)
From the spec:
A hexadecimal floating-point literal consists of a 0x or 0X prefix, an integer part (hexadecimal digits), a radix point, a fractional part (hexadecimal digits), and an exponent part (p or P followed by an optional sign and decimal digits). One of the integer part or the fractional part may be elided; the radix point may be elided as well, but the exponent part is required. (This syntax matches the one given in IEEE 754-2008 §5.12.3.) An exponent value exp scales the mantissa (integer and fractional part) by 2exp.
go/src/strconv/atof_test.go
Line 50 in 13f179b
The code
Should be
The text was updated successfully, but these errors were encountered: