Skip to content

Update docs for new sig_figs default in CmdStan#862

Merged
bob-carpenter merged 2 commits intomasterfrom
sig-figs-changes
Mar 3, 2025
Merged

Update docs for new sig_figs default in CmdStan#862
bob-carpenter merged 2 commits intomasterfrom
sig-figs-changes

Conversation

@WardBrian
Copy link
Member

Submission Checklist

  • Builds locally
  • New functions marked with <<{ since VERSION }>>
  • Declare copyright holder and open-source license: see below

Summary

Changes for stan-dev/cmdstan#1308

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
Simons Foundation

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

Copy link
Member

@bob-carpenter bob-carpenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor changes

Stan’s arithmetic is implemented using double-precision
floating-point numbers, which may cause computation to behave
differently than mathematics. For example, the lower bound constraint
is defined with a logarithm constraint which mathematically excludes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constraint is positivity.

It's enforced with an exp() inverse transform of unconstrained parameters, which are always a finite non-zero number in arithmetic, but which can underflow to 0 or overflow to +infinity with floating-point representations.

a variance parameter that has been declared to be larger than 0.
In general, double-precision floating-point numbers cannot reliably store
more than 16 digits of a number in decimal.
See more about [Floating point Arithmetic in Stan user's guide](../stan-users-guide/floating-point.qmd).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • "Floating" and "Arithmetic" should not be capitalized.
  • I'd make the link just "floating point arithmetic"
  • Stan user's guide -> Stan User's Guide (italics and capitalized as a book title)

more than 16 digits of a number in decimal.
See more about [Floating point Arithmetic in Stan user's guide](../stan-users-guide/floating-point.qmd).

These issues can be exacerbated by the fact that CmdStan stores the output to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be -> are

See more about [Floating point Arithmetic in Stan user's guide](../stan-users-guide/floating-point.qmd).

These issues can be exacerbated by the fact that CmdStan stores the output to
CSV files with 8 digits accuracy by default. More digits can be requested by the user
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accuracy -> precision

@WardBrian WardBrian requested a review from bob-carpenter March 3, 2025 19:46
Copy link
Member

@bob-carpenter bob-carpenter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for updating

@bob-carpenter bob-carpenter merged commit c360c60 into master Mar 3, 2025
@WardBrian WardBrian deleted the sig-figs-changes branch March 3, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants