@@ -613,10 +613,10 @@ a ? b : c
613613```
614614
615615is an expression of the promoted type of ` b ` and ` c ` . The
616- only promotion allowed in Stan is from integer to real; if one
616+ only promotion allowed in Stan is integer -> real -> complex; e.g. if one
617617argument is of type ` int ` and the other of type ` real ` , the
618- conditional expression as a whole is of type ` real ` . In all
619- other cases, the arguments have to be of the same underlying Stan type
618+ conditional expression as a whole is of type ` real ` .
619+ In other cases, the arguments have to be of the same underlying Stan type
620620(i.e., constraints don't count, only the shape) and the conditional
621621expression is of that type.
622622
@@ -1070,7 +1070,7 @@ to complex expressions.
10701070
10711071### Promotion
10721072
1073- There are two promotion rules. First, integer expressions of type
1073+ There are three promotion rules. First, integer expressions of type
10741074` int ` may be used anywhere an expression of type ` real ` is used. An
10751075integer is promoted to real by casting it in the underlying C++.
10761076
@@ -1083,7 +1083,9 @@ Promotion is transitive, so that integers may be promoted to complex
10831083numbers in two stages, first converting the integer to real, then
10841084converting the real value to a complex type.
10851085
1086-
1086+ The third rule is (starting with Stan 2.29), array types are promoted
1087+ according to their contained type. For example, ` array[,] int ` may be
1088+ used where ` array [,] real ` or ` array [,] complex ` is required.
10871089
10881090#### Literals {-}
10891091
0 commit comments