From 634e515a9a34ace378e64b11a10b4662daedce78 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Tue, 1 Oct 2024 10:07:31 -0400 Subject: [PATCH] Link to to_int from rounding functions section --- src/functions-reference/real-valued_basic_functions.qmd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/functions-reference/real-valued_basic_functions.qmd b/src/functions-reference/real-valued_basic_functions.qmd index 5eab3cc22..800616a1e 100644 --- a/src/functions-reference/real-valued_basic_functions.qmd +++ b/src/functions-reference/real-valued_basic_functions.qmd @@ -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. \index{{\tt \bfseries floor }!{\tt (T x): R}|hyperpage} @@ -1601,7 +1603,7 @@ The logarithm of one minus the natural exponentiation of x Return the natural logarithm of the difference of the natural exponentiation of x and the natural exponentiation of y. \begin{equation*} \mathrm{log\_diff\_exp}(x,y) = \begin{cases} \log(\exp(x)-\exp(y)) & -\text{if } +\infty > x \ge y \\[6pt] +\text{if } +\infty > x \ge y \\[6pt] \textrm{NaN} & \text{otherwise} \end{cases} \end{equation*}