diff --git a/src/pkg/strconv/ftoa.go b/src/pkg/strconv/ftoa.go index 4ec3cdbb97..b6049c5458 100644 --- a/src/pkg/strconv/ftoa.go +++ b/src/pkg/strconv/ftoa.go @@ -64,7 +64,7 @@ func FtoaN(f float64, fmt byte, prec int, n int) string { } func genericFtoa(bits uint64, fmt byte, prec int, flt *floatInfo) string { - neg := bits>>flt.expbits>>flt.mantbits != 0 + neg := bits>>(flt.expbits+flt.mantbits) != 0 exp := int(bits>>flt.mantbits) & (1<