Skip to content

Commit 634e515

Browse files
committed
Link to to_int from rounding functions section
1 parent ba8c1c5 commit 634e515

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/functions-reference/real-valued_basic_functions.qmd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,10 @@ calculations, but the result is likely to be reduced acceptance
783783
probabilities and less efficient sampling.
784784

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

789791
<!-- R; floor; (T x); -->
790792
\index{{\tt \bfseries floor }!{\tt (T x): R}|hyperpage}
@@ -1601,7 +1603,7 @@ The logarithm of one minus the natural exponentiation of x
16011603
Return the natural logarithm of the difference of the natural
16021604
exponentiation of x and the natural exponentiation of y. \begin{equation*}
16031605
\mathrm{log\_diff\_exp}(x,y) = \begin{cases} \log(\exp(x)-\exp(y)) &
1604-
\text{if } +\infty > x \ge y \\[6pt]
1606+
\text{if } +\infty > x \ge y \\[6pt]
16051607
\textrm{NaN} & \text{otherwise} \end{cases}
16061608
\end{equation*}
16071609

0 commit comments

Comments
 (0)