Skip to content

Commit

Permalink
Merge pull request #1308 from stan-dev/change-default-sig-figs
Browse files Browse the repository at this point in the history
Change default sig_figs value to 8
  • Loading branch information
WardBrian authored Mar 3, 2025
2 parents 4151174 + db2d4c2 commit 115e612
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/cmdstan/arguments/arg_output_sig_figs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@ class arg_output_sig_figs : public int_argument {
arg_output_sig_figs() : int_argument() {
_name = "sig_figs";
_description
= "The number of significant figures used for the output CSV files.";
_validity
= "0 <= integer <= 18 or -1 to use the default number of significant "
"figures";
_default = "-1";
_default_value = -1;
= "The number of significant figures used for the output CSV files. "
"Stan recommends at least 8 (the default) if you will be using the "
"output as part of a future input (e.g., for standalone generated "
"quantities or as an initialization). If -1 is supplied, Stan will "
"use the current operating system's default precision (This "
"typically be smaller than Stan's default; on many systems it is 6 "
"digits).";
_validity = "0 <= sig_figs <= 18 || sig_figs == -1";
_default = "8";
_default_value = 8;
_value = _default_value;
}

bool is_valid(int value) {
return (value >= 0 && value <= 18) || value == _default_value;
return (value >= 0 && value <= 18) || value == -1;
}
};

Expand Down

0 comments on commit 115e612

Please sign in to comment.