Open alashworth opened 5 years ago
Comment by bob-carpenter Thursday Nov 24, 2016 at 05:40 GMT
Right now, with this program
data {
real a;
real b;
real c;
}
parameters {
real y;
}
model {
print("a=", a, " b=", b, " c=", c);
y ~ normal(0, 1);
}
And input dump file
a <- NaN
b <- -inf
c <- 3
it will break reading b
because it causes an exception in problem for the initial integer reading pass
> ./is sample data file=is.R
Exception: data b value beyond int range
Diagnostic information:
stan/src/stan/io/dump.hpp(518): Throw in function bool stan::io::dump_reader::next()
Dynamic exception type: boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::invalid_argument> >
.
Issue by bob-carpenter Monday May 05, 2014 at 17:21 GMT Originally opened as https://github.com/stan-dev/stan/issues/637
Our input mechanisms for data and inits should handle NaN and +inf and -inf values.
The new JSON reader handles them for input. But the current R dump format reader, which is the one we're currently using, doesn't. So the dump format should get updated if it's not just eliminated.