function imin = intmin(classname)
% Embedded MATLAB Library function.
%
% Limitations:
% Only 8, 16, and 32 bit signed and unsigned integer types are supported.

% Copyright 2002-2004 The MathWorks, Inc.

if (nargin == 0)
    imin = int32(-2147483648);
else
    eml_assert(ischar(classname),'Input must be a string, the name of an integer class.');
    switch (classname)
      case 'int8'
        imin = int8(-128);
      case 'uint8'
        imin = uint8(0);
      case 'int16'
        imin = int16(-32768);
      case 'uint16'
        imin = uint16(0);
      case 'int32'
        imin = int32(-2147483648);
      case 'uint32'
        imin = uint32(0);
      case 'int64'
        %imin = int64(-9223372036854775808);
        eml_assert(0,'Integer class "int64" not supported.');
      case 'uint64'
        %imin = uint64(0);
        eml_assert(0,'Integer class "uint64" not supported.');
      otherwise
        eml_assert(0,'Invalid class name.');
    end
end


