Skip to content

boost::math::ellint_2(0.0) becomes less accurate in boost 1.81 #909

@frederick-vs-ja

Description

@frederick-vs-ja

Source:

#include <format>
#include <iostream>
#include <numbers>

#include <boost/math/special_functions/ellint_2.hpp>

int main() {
    std::cout << std::format("{}\n{}\n", std::numbers::pi / 2, boost::math::ellint_2(0.0));
}

Output with MSVC STL and boost 1.81:

1.5707963267948966
1.5707963267948963

In boost 1.80, the result of boost::math::ellint_2(0.0) was equal to std::numbers::pi / 2, which was more accurate.

This issue was discovered when updating reference to boost-math in MSVC STL (microsoft/STL#3312).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions