package jxl.read.biff;

final class RKHelper {
  public static double getDouble(int rk) {
    if ((rk & 0x2) != 0) {
      int intval = rk >> 2;
      double d = intval;
      if ((rk & 0x1) != 0)
        d /= 100.0D; 
      return d;
    } 
    long valbits = (rk & 0xFFFFFFFC);
    valbits <<= 32L;
    double value = Double.longBitsToDouble(valbits);
    if ((rk & 0x1) != 0)
      value /= 100.0D; 
    return value;
  }
}
