WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

<random>: Consider using Boost.Math's lgamma() implementation #5914

@StephanTLavavej

Description

@StephanTLavavej

<random>'s poisson_distribution and binomial_distribution need a "log gamma" function. In #5891, I made them use the UCRT's C99 lgamma() instead of the STL's _XLgamma(). (While _XLgamma() had to be retained for bincompat, I replaced its terrible implementation with UCRT lgamma() too.)

Boost.Math has an even more accurate implementation of lgamma(). In theory, we could switch the STL's _XLgamma() over to wrapping Boost.Math, and then begin calling it again.

As _XLgamma() is compiled into the STL's original DLL and static LIB, I believe this is blocked by #362. We need the ability to change Boost.Math's standalone namespace to avoid conflicting with user Boost usage. This problem is annoying for Special Math but would be more severe if we introduced it into the STL's original static LIB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedSomething is preventing work on thisenhancementSomething can be improved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions