Numerical Precision of normal_lcdf

Hi all,

I’m working on a model that relies on the normal_lcdf(x|mu, sigma) function, but I appear to be running into numerical precision problems with x >> mu. R’s pnorm(x,mu,sigma,log.p=T) doesn’t exhibit the same problem (at least at the scale of x I’m looking at):

I found this thread where the similar case x << mu was discussed and Bob mentions concerns with the lcdf functions.

Has there been any movement with the implementation of *_lcdf functions? Or does anyone know of an approximation of normal_lcdf that works with large x?

3 Likes

I think this is serious enough to make an issue in stan-dev/math repo. Let me know if you need help submitting the issue.

Okay, thanks. Issue submitted: https://github.com/stan-dev/math/issues/1284

2 Likes