%#codegen
function c = fi_div(a,b)
coder.inline( 'always' );
a1 = fi( a, 'RoundMode', 'fix' );
b1 = fi( b, 'RoundMode', 'fix' );
nType = divideType( a1, b1 );
if isfi( a ) && isfi( b ) && isscalar( b )
    c1 = divide( nType, a1, b1 );
    c = fi( c1, numerictype( c1 ), fimath( a ) );
else
    c = fi( a / b, nType );
end
end