code: public int intValue() throws OtpErlangRangeException {
          final long l = longValue();
          final int i = (int) l;
  
          if (i != l) {
              throw new OtpErlangRangeException("Value too large for int: " + val);
          }
  
          return i;
      }
docs: Get this number as an int.
  
  @return the value of this number, as an int.
  
  @exception OtpErlangRangeException
  if the value is too large to be represented as an int.