powerOf2 static method

double powerOf2(
  1. int exp
)

Implementation

static double powerOf2(int exp) {
  if (exp > 1023 || exp < -1022)
    throw new ArgumentError("Exponent out of bounds");
  int expBias = exp + EXPONENT_BIAS;
  int bits = expBias << 52;
  return bits.toDouble();
}