Skip to content

Commit 115e612

Browse files
authored
Merge pull request #1308 from stan-dev/change-default-sig-figs
Change default sig_figs value to 8
2 parents 4151174 + db2d4c2 commit 115e612

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

src/cmdstan/arguments/arg_output_sig_figs.hpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@ class arg_output_sig_figs : public int_argument {
1010
arg_output_sig_figs() : int_argument() {
1111
_name = "sig_figs";
1212
_description
13-
= "The number of significant figures used for the output CSV files.";
14-
_validity
15-
= "0 <= integer <= 18 or -1 to use the default number of significant "
16-
"figures";
17-
_default = "-1";
18-
_default_value = -1;
13+
= "The number of significant figures used for the output CSV files. "
14+
"Stan recommends at least 8 (the default) if you will be using the "
15+
"output as part of a future input (e.g., for standalone generated "
16+
"quantities or as an initialization). If -1 is supplied, Stan will "
17+
"use the current operating system's default precision (This "
18+
"typically be smaller than Stan's default; on many systems it is 6 "
19+
"digits).";
20+
_validity = "0 <= sig_figs <= 18 || sig_figs == -1";
21+
_default = "8";
22+
_default_value = 8;
1923
_value = _default_value;
2024
}
2125

2226
bool is_valid(int value) {
23-
return (value >= 0 && value <= 18) || value == _default_value;
27+
return (value >= 0 && value <= 18) || value == -1;
2428
}
2529
};
2630

0 commit comments

Comments
 (0)