}
}
public double getDouble() {
if (type != 'n') throw new WrongTypeException(type, 'n');
Bytes term = firstTerm;
int s = prefix.getLength() + 1;
long bits = (((long)term.get(s+0)) << 8 * 7) |
(((long)term.get(s+1)&0xFF) << 8 * 6) |
(((long)term.get(s+2)&0xFF) << 8 * 5) |
(((long)term.get(s+3)&0xFF) << 8 * 4) |
(((long)term.get(s+4)&0xFF) << 8 * 3) |
(((long)term.get(s+5)&0xFF) << 8 * 2) |
(((long)term.get(s+6)&0xFF) << 8 * 1) |
(((long)term.get(s+7)&0xFF) << 8 * 0);
// see sencode for why we do these bit manipulations:
if ((bits & 0x8000000000000000L) == 0) {
bits ^= 0xFFFFFFFFFFFFFFFFL;
} else {