@@ -28,30 +28,27 @@ apply the appropriate Jacobians.
2828## Limitations due to finite accuracy presentation
2929
3030In this section the transformations are described mathematically.
31- There are two cases where the observed behavior can be different from
32- the exact arithmetic:
33- - Stan’s arithmetic is implemented using double-precision
34- floating-point arithmetic, which may cause computation to behave
35- differently than mathematics. For example, lower bound constraint
36- is defined with logarithm constraint which mathematically excludes
37- the lower bound, but if the closest floating-point number for the
38- inverse transformed value is the boundary, then the value is
39- rounded to the boundary. This may cause unexpected warnings or
40- errors, if in other parts of the code the boundary value is
41- invalid. For example, we may observe floating-point value 0 for
42- a variance parameter that has been declared to be larger than 0.
43- See more about [Floating point Arithmetic in Stan user's guide](../stan-users-guide/floating-point.qmd)).
44- - CmdStan stores the output to CSV files with 6 significant digits
45- accuracy by default, but the constraints are checked with 8
46- decimal digit accuracy. Due to this, there can be errors if CSV
47- output is further used, for example, to run generated
48- quantities. For example, simplex constraint requires the values to
49- sum up to 1, but when writing the values to CSV they are rounded
50- to 6 significant digits and the sum of those rounded values can be
51- smaller or larger than 1 by more than 8 decimal digits. The
52- solution for CmdStan is to increase the number of significant
53- digits stored as discussed in [ CmdStan Command-Line Interface
54- Overview] ( ../cmdstan-guide/command_line_options.qmd ) .
31+ However, observed behavior can be different from the exact arithmetic.
32+
33+ Stan’s arithmetic is implemented using double-precision
34+ floating-point numbers, which may cause computation to behave
35+ differently than mathematics. For example, the lower bound constraint
36+ is defined above by an exponential inverse transform which mathematically excludes
37+ the lower bound, but if the closest floating-point number for the
38+ inverse transformed value is the boundary, then the value is
39+ rounded to the boundary. This may cause unexpected warnings or
40+ errors, if in other parts of the code the boundary value is
41+ invalid. For example, we may observe floating-point value 0 for
42+ a variance parameter that has been declared with ` lower=0 ` .
43+ In general, double-precision floating-point numbers cannot reliably store
44+ more than 16 digits of a number in decimal.
45+ See more about [ floating point arithmetic] ( ../stan-users-guide/floating-point.qmd )
46+ in the * Stan User's Guide* .
47+
48+ These issues are exacerbated by the fact that CmdStan stores the output to
49+ CSV files with 8 digits precision by default. More digits can be requested by the user
50+ at the cost of additional disk usage, as discussed in the
51+ [ CmdStan Command-Line Interface Overview] ( ../cmdstan-guide/command_line_options.qmd ) .
5552
5653## Changes of variables {#change-of-variables.section}
5754
0 commit comments