Skip to content

Commit c3d0b6c

Browse files
committed
Adjust column widths if extra precision is requested
1 parent 3fc080a commit c3d0b6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/fast++-write_output.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ void write_catalog(const options_t& opts, const input_state_t& input, const grid
156156
} else if (cname == "nmodel") {
157157
cwidth.push_back(15);
158158
} else {
159-
uint_t ocwidth = 10;
159+
uint_t ocwidth = opts.output_precision > 0 && opts.output_precision < 1e-6 ?
160+
4 - round(log10(opts.output_precision)) : 10;
161+
160162
// Make sure we use the right format
161163
cname = output.param_names[idp[ic]];
162164
param.back() = cname;

0 commit comments

Comments
 (0)