function [rangexfi1,rangexfi2] = range(xfi)
% MATLAB Code Generation Library function for range.
%
% RANGE(A) will return the range of A

% $INCLUDE(DOC) toolbox/eml/lib/fixedpoint/range.m $
% Copyright 2002-2015 The MathWorks, Inc.
%#codegen

eml_allow_mx_inputs;

% Check for nargin and assert if not 1
eml_invariant(nargin==1,'MATLAB:narginchk:notEnoughInputs');

if eml_ambiguous_types
    if nargout == 1
        rangexfi1 = [0,0];
        rangexfi2 = [];
    elseif nargout == 2
        rangexfi1 = 0;
        rangexfi2 = 0;
    end
    return;
end

eml_invariant(isfi(xfi),'fixed:fi:firstInputNotFi');
rangexfi1 = 0;
rangexfi2 = 0;

%----------------------------------------------------
