Skip to content

Accuracy of normal_lccdf much worse than normal_lcdf #1985

Description

@lciti

Description

The implementation for normal_lcdf has been improved significantly following #1284 by introducing a polynomial approximation of the Mills ratio based on a paper by Cody (1969). It looks like normal_lccdf has not been updated accordingly and instead still uses the older and much less accurate solution.

Incidentally, I also noticed that normal_lcdf and std_normal_lcdf implement the same solution with very similar code. I wonder if one could retain the current implementation of std_normal_lcdf and write std_normal_lccdf, normal_lcdf and normal_lccdf to simply call std_normal_lcdf with appropriate parameters (-x, (x-mu)/sigma, (mu-x)/sigma, respectively).

Current Version:

v3.2.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    distributionsIssues that deal with distribution functions: pdf, pmf, cdfnumericsNumerical issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions