We do optimization in the unconstrained space. When this eventually gets mapped back to the constrained space, the values can be numerically unstable if the parameters in the unconstrained space are very far away. Right now, we arbitrarily truncate at 25 and -25.
The effective domain for the transforms from unconstrained
to constrained depend on the constraint. For exp(), it's
around +/- log(MAX_DOUBLE) (about 315 if I remember correctly)
for example.
We do optimization in the unconstrained space. When this eventually gets mapped back to the constrained space, the values can be numerically unstable if the parameters in the unconstrained space are very far away. Right now, we arbitrarily truncate at 25 and -25.
Follow the convention in Stan's library.