Skip to content

Commit

Permalink
Merge pull request #819 from stan-dev/functions-reference/link-to-to_int
Browse files Browse the repository at this point in the history
Link to to_int from rounding functions section
  • Loading branch information
bob-carpenter authored Nov 18, 2024
2 parents c2180ce + 675eb98 commit fe5f556
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/functions-reference/real-valued_basic_functions.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -783,8 +783,10 @@ calculations, but the result is likely to be reduced acceptance
probabilities and less efficient sampling.

The rounding functions cannot be used as indices to arrays because
they return real values. Stan may introduce integer-valued versions
of these in the future, but as of now, there is no good workaround.
they return real values. For operations over `data` or in the
`generated quantities` block, the
[`to_int()` function](integer-valued_basic_functions.qmd#casting-functions)
can be used.

<!-- R; floor; (T x); -->
\index{{\tt \bfseries floor }!{\tt (T x): R}|hyperpage}
Expand Down

0 comments on commit fe5f556

Please sign in to comment.