public double readDouble() {long valueLongBits = readLong();double result = Double.longBitsToDouble(valueLongBits);if (Double.isNaN(result)) {throw new RuntimeException("Did not expect to read NaN");}return result;}
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;}