function y = logspace(d1,d2,n)
%MATLAB Code Generation Library Function

%   Limitations:  Does not support special case behavior for d2 = pi.

%   Copyright 2002-2020 The MathWorks, Inc.
%#codegen

% This file is prepped for half support.
% coder.internal.allowHalfInputs;
if nargin < 3
    n = 50;
end
coder.internal.prefer_const(n);
coder.internal.assert(nargin > 1, ...
    'MATLAB:minrhs');
coder.internal.assert(isa(d1,'float') && isscalar(d1), ...
    'Coder:toolbox:logspace_2', ...
    'IfNotConst','Fail');
coder.internal.assert(isa(d2,'float') && isscalar(d2), ...
    'Coder:toolbox:logspace_3', ...
    'IfNotConst','Fail');
coder.internal.assert(coder.internal.isConst(n) || ...
    eml_option('VariableSizing'), ...
    'Coder:toolbox:logspace_4', ...
    'IfNotConst','Fail');
SCALARN = coder.internal.isConst(isscalar(n)) && isscalar(n);
coder.internal.assert(coder.internal.isBuiltInNumeric(n) && ...
    isreal(n) && SCALARN && n >= 1 && ...
    coder.internal.scalar.floor(n) == n, ...
    'Coder:toolbox:logspace_invalidN');
TOL = coder.const(4*eps(ones(class(d2))));
PI = coder.const(cast(pi,class(d2)));
if abs(d2 - PI) < TOL
    if ~coder.setwarningflag
        coder.internal.warning('Coder:toolbox:piSpecialSupported');
    end
end
y = 10 .^ linspace(d1,d2,n);
