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
package main
funcmain() {
varbuint8var_float64=1.5* (1<<b)
}
generates the error message
main.go:5: invalid operation: 1 << b (shift of type float64)
But there's no shift of type float64. There's a shift of type uint8. The problem is that the result of that shift needs to be converted into a float64 before multiplying.