Skip to content

Send exact -infinity in log functions to the overflow policy - #1574

Merged
NAThompson merged 1 commit into
developfrom
exact-infinity-cleanup
Oct 13, 2026
Merged

NAThompson merged 1 commit into
developfrom
exact-infinity-cleanup

Conversation

@NAThompson

Copy link
Copy Markdown
Collaborator

Drop exact_infinity; fix logcdf at infinite x, students_t logcdf at huge |x|,
and polynomial_roots for variable precision (tools::). Part of #1569.

🤖 Generated with Claude Code

Drop exact_infinity; fix logcdf at infinite x, students_t logcdf at huge |x|,
and polynomial_roots for variable precision (tools::). Part of #1569.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NAThompson
NAThompson force-pushed the exact-infinity-cleanup branch from 9f5fd77 to e4dcb21 Compare October 13, 2026 18:17
@NAThompson
NAThompson merged commit 1f514cb into develop Oct 13, 2026
50 checks passed
@ckormanyos

ckormanyos commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Hi Nick (@NAThompson) I think it was in this PR, but I'm not quite sure. One of my independent projects fails the nightly now due to errors in policy. It is the second nightly run in a row failing, so it must have happened about 2 days ago.

run benchmarks with clang++ and language standard c++20

In file included from ./src/app/benchmark/app_benchmark_boost_math_cbrt_tgamma.cpp:39:
In file included from ../../boost-root/boost/math/constants/constants.hpp:16:
../../boost-root/boost/math/policies/policy.hpp:497:8: error: redefinition of 'policy<>'
  497 | struct policy<detail::forwarding_arg1, detail::forwarding_arg2, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../boost-root/boost/math/policies/policy.hpp:472:7: note: previous definition is here
  472 | class policy<default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
      |       ^
../../boost-root/boost/math/policies/policy.hpp:654:8: error: redefinition of 'normalise<boost::math::policies::policy<default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>, boost::math::policies::promote_float<>, boost::math::policies::promote_double<>, boost::math::policies::discrete_quantile<>, boost::math::policies::assert_undefined<>>'
  654 | struct normalise<policy<detail::forwarding_arg1, detail::forwarding_arg2>,
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  655 |           promote_float<false>,
      |           ~~~~~~~~~~~~~~~~~~~~~
  656 |           promote_double<false>,
      |           ~~~~~~~~~~~~~~~~~~~~~~
  657 |           discrete_quantile<>,
      |           ~~~~~~~~~~~~~~~~~~~~
  658 |           assert_undefined<>,
      |           ~~~~~~~~~~~~~~~~~~~
  659 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  660 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  661 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  662 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  663 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  664 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  665 |           default_policy>
      |           ~~~~~~~~~~~~~~~
../../boost-root/boost/math/policies/policy.hpp:637:8: note: previous definition is here
  637 | struct normalise<policy<>,
      |        ^
2 errors generated.
In file included from ./src/app/benchmark/app_benchmark_boost_math_cyl_bessel_j.cpp:71:
In file included from ../../boost-root/boost/math/special_functions/bessel.hpp:22:
In file included from ../../boost-root/boost/math/tools/roots.hpp:20:
In file included from ../../boost-root/boost/math/special_functions/sign.hpp:20:
In file included from ../../boost-root/boost/math/special_functions/math_fwd.hpp:31:
../../boost-root/boost/math/policies/policy.hpp:497:8: error: redefinition of 'policy<>'
  497 | struct policy<detail::forwarding_arg1, detail::forwarding_arg2, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../boost-root/boost/math/policies/policy.hpp:472:7: note: previous definition is here
  472 | class policy<default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>
      |       ^
../../boost-root/boost/math/policies/policy.hpp:654:8: error: redefinition of 'normalise<boost::math::policies::policy<default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy>, boost::math::policies::promote_float<>, boost::math::policies::promote_double<>, boost::math::policies::discrete_quantile<>, boost::math::policies::assert_undefined<>>'
  654 | struct normalise<policy<detail::forwarding_arg1, detail::forwarding_arg2>,
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  655 |           promote_float<false>,
      |           ~~~~~~~~~~~~~~~~~~~~~
  656 |           promote_double<false>,
      |           ~~~~~~~~~~~~~~~~~~~~~~
  657 |           discrete_quantile<>,
      |           ~~~~~~~~~~~~~~~~~~~~
  658 |           assert_undefined<>,
      |           ~~~~~~~~~~~~~~~~~~~
  659 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  660 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  661 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  662 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  663 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  664 |           default_policy,
      |           ~~~~~~~~~~~~~~~
  665 |           default_policy>
      |           ~~~~~~~~~~~~~~~
../../boost-root/boost/math/policies/policy.hpp:637:8: note: previous definition is here
  637 | struct normalise<policy<>,
      |        ^
2 errors generated.

@NAThompson

Copy link
Copy Markdown
Collaborator Author

@ckormanyos : Thanks for testing! New PR incoming.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants