Skip to content

stable log cdfs for normal #3150

Open
Open
@bob-carpenter

Description

@bob-carpenter

Stan's log cdfs just take the log of the linear cdf, so they're prone to underflow to -infinity after the cdc underflows to 0 or rounds to 1.

The R implementation of log cdfs is more stable, e.g.,

> pnorm(-50, log=TRUE)
[1] -1254.831

We should be able to borrow an implementation from R or from SciPy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions