text: public double ReadDouble(){long valueLongBits = ReadLong();double result = BitConverter.Int64BitsToDouble(valueLongBits);if (Double.IsNaN(result)){throw new Exception("Did not expect to read NaN"); }return result;}