assertEquals(8, write.writeDouble(-65, 1000, true));
assertEquals(8, write.writeDouble(-8192, 1000, false));
assertEquals(8, write.writeDouble(-8192, 1000, true));
write.writeDouble(1.23456d);
Input read = new UnsafeInput(write.toBytes());
assertEquals(read.readDouble(), 0d);
assertEquals(read.readDouble(), 63d);
assertEquals(read.readDouble(), 64d);
assertEquals(read.readDouble(), 127d);
assertEquals(read.readDouble(), 128d);
assertEquals(read.readDouble(), 8192d);
assertEquals(read.readDouble(), 16384d);
assertEquals(read.readDouble(), 32767d);
assertEquals(read.readDouble(), -63d);
assertEquals(read.readDouble(), -64d);
assertEquals(read.readDouble(), -127d);
assertEquals(read.readDouble(), -128d);
assertEquals(read.readDouble(), -8192d);
assertEquals(read.readDouble(), -16384d);
assertEquals(read.readDouble(), -32768d);
assertEquals(read.readDouble(1000, true), 0d);
assertEquals(read.readDouble(1000, false), 0d);
assertEquals(read.readDouble(1000, true), 63d);
assertEquals(read.readDouble(1000, false), 63d);
assertEquals(read.readDouble(1000, true), 64d);
assertEquals(read.readDouble(1000, false), 64d);
assertEquals(read.readDouble(1000, true), 127d);
assertEquals(read.readDouble(1000, false), 127d);
assertEquals(read.readDouble(1000, true), 128d);
assertEquals(read.readDouble(1000, false), 128d);
assertEquals(read.readDouble(1000, true), 8191d);
assertEquals(read.readDouble(1000, false), 8191d);
assertEquals(read.readDouble(1000, true), 8192d);
assertEquals(read.readDouble(1000, false), 8192d);
assertEquals(read.readDouble(1000, true), 16383d);
assertEquals(read.readDouble(1000, false), 16383d);
assertEquals(read.readDouble(1000, true), 16384d);
assertEquals(read.readDouble(1000, false), 16384d);
assertEquals(read.readDouble(1000, true), 32767d);
assertEquals(read.readDouble(1000, false), 32767d);
assertEquals(read.readDouble(1000, false), -64d);
assertEquals(read.readDouble(1000, true), -64d);
assertEquals(read.readDouble(1000, false), -65d);
assertEquals(read.readDouble(1000, true), -65d);
assertEquals(read.readDouble(1000, false), -8192d);
assertEquals(read.readDouble(1000, true), -8192d);
assertEquals(1.23456d, read.readDouble());
}