exponent property Null safety

int exponent

Get the exponent part of this value interpreted as a float. Not valid for infinity or -infinity.

Implementation

int get exponent {
  int lower12 = _lower12;
  int r = 10 * ((lower12 >> 4) & 0xf) + (lower12 & 0xf);
  if (lower12 & 0xf00 == 0x900) {
    r = -(100 - r);
  } else if ((lower12 & 0x0f00) != 0x000) {
    throw CalculatorError(6); // Invalid float format
  }
  if (r > -100 && r < 100) {
    return r;
  } else {
    throw CalculatorError(6); // Invalid float format
  }
}