static int exponent(double d) { DoubleBits db = new DoubleBits.fromDouble(d); return db.getExponent(); }