This code inadvertently does a 32 bit calculation whose result must be 64 bits, resulting in incorrect floating point conversions.
When the underlying components of the vector are f64, BW is 64 and the shift:
1 << (BW/2) results in an undefined result when BW >= 31.
We need to write as lL << (BW/2) in order to do the shift in 64 bits with a 64 bit result