add comments about rounding

parent 79d4b888
Pipeline #674 failed with stage
in 36 seconds
......@@ -37,6 +37,7 @@ precision = 10^precision;
data = setDataToZeroFromZeroTol(o, data);
for i=1:size(data,1)
fprintf(fid, '&');
% Use round half away from zero rounding
output = round(data(i)*precision)/precision;
if isnan(output)
fprintf(fid, '%s', o.tableNaNSymb);
......
......@@ -99,6 +99,7 @@ for i = 1:nrows
if val < o.zeroTol && val > -o.zeroTol
val = 0;
end
% Use round half away from zero rounding
val = round(val*rounding)/rounding;
if isnan(val)
val = o.tableNaNSymb;
......
......@@ -15,7 +15,7 @@ function o = printSeries(o, fid, dser, dates, precision)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2014-2016 Dynare Team
% Copyright (C) 2014-2019 Dynare Team
%
% This file is part of Dynare.
%
......@@ -47,7 +47,7 @@ for i=1:size(data,1)
end
fprintf(fid, '[');
end
% Use round half away from zero rounding
output = round(data(i)*precision)/precision;
if isnan(output)
fprintf(fid, '%s', o.tableNaNSymb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment