default: throw new RuntimeException();
}
}
public double getDouble() {
Bytes term = terms[0];
if (term.get(0) != 'n') throw new RuntimeException();
long bits = (((long)term.get(1)) << 8 * 7) |
(((long)term.get(2)&0xFF) << 8 * 6) |
(((long)term.get(3)&0xFF) << 8 * 5) |
(((long)term.get(4)&0xFF) << 8 * 4) |
(((long)term.get(5)&0xFF) << 8 * 3) |
(((long)term.get(6)&0xFF) << 8 * 2) |
(((long)term.get(7)&0xFF) << 8 * 1) |
(((long)term.get(8)&0xFF) << 8 * 0);
// see sencode for why we do these bit manipulations:
if ((bits & 0x8000000000000000L) == 0) {
bits ^= 0xFFFFFFFFFFFFFFFFL;
} else {