3964 Commits

Author SHA1 Message Date
Matt Borland e6513cfbea Fix merge conflict 2026-07-21 10:26:35 -04:00
Matt Borland 109df525bc Merge remote-tracking branch 'origin/develop' into module 2026-07-21 10:25:30 -04:00
Matt Borland 14f8fad48a Significantly increase testing coverage 2026-07-20 16:46:43 -04:00
Matt Borland 47f379c76d Fir re- and missing definitions 2026-07-20 13:46:40 -04:00
Matt Borland 2e9ae18f78 More specialty header removal 2026-07-20 12:18:18 -04:00
Matt Borland 5e246315f7 Exclude more headers 2026-07-20 10:55:56 -04:00
Matt Borland dd6daa78ec Create our own sortable iterator check 2026-07-20 09:49:51 -04:00
Matt Borland b8e7a75b99 Add missing header 2026-07-20 09:28:49 -04:00
Matt Borland 1b27fc15bb Fix bad asserts and missing overload 2026-07-20 09:26:44 -04:00
Matt Borland 249249870c Inline constexpr variable templates 2026-07-17 14:53:24 -04:00
Matt Borland 0270056a54 Fix John's initial issue 2026-07-17 14:42:22 -04:00
Matt Borland 03b38dbbad Remove anonymous namespace breaking module linkage 2026-07-16 15:44:30 -04:00
Matt Borland d89dc67028 Remove workaround that doesn't work with modules 2026-07-16 13:33:00 -04:00
Matt Borland e5b102ecc4 Update references to file extension 2026-07-16 13:28:23 -04:00
Matt Borland 74fc0c02a4 Keep cstdfloat out of the module purview 2026-07-15 13:29:42 -04:00
Matt Borland 5e49f1ca92 Add a GCC module test to CI 2026-07-15 13:05:24 -04:00
Matt Borland 18f8fb76b2 Export differentiation and the algebra types for the boost.math module
* BOOST_MATH_EXPORT on autodiff (make_fvar, make_ftuple, promote,
  real_cast), finite differences, lanczos smoothing, the complex
  inverse trigonometric functions, quaternion and octonion including
  their macro generated operator sets, and the boost/math_fwd.hpp
  forward declarations
* Fixes a pre-existing ambiguity: autodiff's fully qualified
  differentiation::detail::fvar references are ambiguous whenever
  finite_difference.hpp is visible in the same translation unit, so
  they now name the autodiff_v1 inline namespace explicitly
* Adds differentiation, complex.hpp, quaternion.hpp and octonion.hpp
  to the module interface unit (finite_difference and lanczos_smoothing
  precede autodiff by necessity)
* Module test harness gains quaternion_constexpr_test and
  octonion_test_simple; both tests now include what they use
2026-07-15 11:36:19 -04:00
Matt Borland 39b0970cf7 Export statistics and optimization for the boost.math module
* BOOST_MATH_EXPORT on the statistics free functions (univariate,
  bivariate, tests, regression, signal) and the optimization
  algorithms, parameter structs and constraint/convergence policies
* BOOST_MATH_TEST_EXPORT on the optimization detail helpers the
  differential evolution test exercises directly
* Adds the statistics and optimization headers to the module interface
  unit; cma_es is excluded because it requires Eigen
* test_functions_for_optimization.hpp resolves constants through the
  import in module mode
* Module test harness gains test_runs_test, linear_regression_test,
  ljung_box_test, differential_evolution_test and random_search_test
2026-07-15 11:36:18 -04:00
Matt Borland 88d19ef7bf Export quadrature and the modern interpolators for the boost.math module
* BOOST_MATH_EXPORT on the integrator class templates, trapezoidal and
  the wavelet transform, plus the interpolator class templates and their
  stream operators
* Adds the quadrature and interpolator headers to the module interface
  unit (cardinal_trigonometric and the deprecated boost::math namespace
  shims stay textual only)
* Module test harness gains git_issue_898,
  cardinal_quadratic_b_spline_test and whittaker_shannon_test
2026-07-15 11:36:18 -04:00
Matt Borland cf763575fd Export the public tools for the boost.math module
* BOOST_MATH_EXPORT on the root finders, minima, polynomial and its
  operators, rational/polynomial evaluators, series and continued
  fraction machinery, recurrences, norms, condition numbers, color maps,
  expansions, agm and toms748
* Adds the curated tools headers to the module interface unit
* Module test harness gains git_issue_1139, cubic_roots_test and
  quartic_roots_test
2026-07-15 11:36:18 -04:00
Matt Borland 8a5dcf9b0e Export ccmath for the boost.math module
* BOOST_MATH_EXPORT on the constexpr cmath function set
* Adds ccmath/ccmath.hpp to the module interface unit
* Module test harness gains ccmath_isinf_test and ccmath_isnan_test
2026-07-15 11:36:18 -04:00
Matt Borland 5ee0d7734c Export the statistical distributions for the boost.math module
* BOOST_MATH_EXPORT on the 38 distribution class templates (fwd.hpp and
  definition sites), every non-member accessor overload, the convenience
  typedefs, the complement machinery and find_location/find_scale
* distributions/fwd.hpp now includes tools/config.hpp so the export
  macro is always defined
* Adds distributions.hpp to the module interface unit
* Module test harness gains git_issue_1294, git_issue_800,
  git_issue_1120 and scipy_issue_17146
2026-07-15 11:36:18 -04:00
Matt Borland 2a1c7afea4 Export the special functions for the boost.math module
* BOOST_MATH_EXPORT on the public declarations in math_fwd.hpp,
  round_fwd.hpp, unchecked_factorial.hpp, unchecked_bernoulli.hpp and
  every special function header (declaration and definition sites)
* Adds special_functions.hpp to the module interface unit
* rsqrt.hpp, jacobi.hpp and cardinal_b_spline.hpp now include
  tools/config.hpp so the export macro is always defined
* math_unit_test.hpp resolves math entities through the import in
  module mode
* Module test harness gains test_digamma_simple, test_expm1_simple,
  test_log1p_simple, git_issue_1194 and git_issue_1255
2026-07-15 11:36:18 -04:00
Matt Borland f9861a7d22 Guard std includes for module builds across all headers
Mechanical sweep wrapping every standard library include in
#ifndef BOOST_MATH_BUILD_MODULE so the module interface unit can provide
them through the global module fragment or import std. Also converts the
static constexpr color map data tables to BOOST_MATH_INLINE_CONSTEXPR for
module linkage. No change in any existing configuration; validated against
the full compile_test suite and the module build.
2026-07-15 11:36:18 -04:00
Matt Borland 348a583965 Add C++20 module infrastructure and foundation components
Adds gated C++20 named module support (module boost.math), inert unless
BOOST_MATH_BUILD_MODULE is defined:

* BOOST_MATH_EXPORT / BOOST_MATH_TEST_EXPORT macro block in tools/config.hpp
* module/math.cxx interface unit covering constants and policies
* module/CMakeLists.txt test harness requiring import std
* module/quick_test.cpp smoke test and module/Jamfile for b2
* test/CMakeLists.txt branch for -DBOOST_MATH_BUILD_MODULE=ON
* cmake-module-test CI job (clang-20 + libc++ + CMake 4.4.0)
* Export annotations for constants, policies, error handling, and the
  tools support headers they pull in
* std includes in those headers guarded for module builds
* Namespace scope static constexpr variables converted to
  BOOST_MATH_INLINE_CONSTEXPR (float_constants and friends,
  max_string_digits) for module linkage
2026-07-15 11:36:18 -04:00
Matt Borland 8ee12a5355 Merge pull request #1414 from su-senka/feature/chatterjee-mnn
Add M nearest-neighbour Chatterjee correlation (#990)
2026-07-02 15:06:46 -04:00
Matt Borland e06a6a657c Fix UB in sorting results with the cubic root finder 2026-07-01 09:41:49 -04:00
Oleksandr 2709fb2bac Add M nearest-neighbour Chatterjee correlation (#990) 2026-07-01 07:58:34 +02:00
Matt Borland bad351c738 Add patch from issue 2026-06-30 17:31:48 -04:00
jzmaddock 45fe9991ca Try and get gcov to register lines we know are hit. 2026-06-21 12:01:53 +01:00
jzmaddock ad99070a18 Comment out dead code, tweak testing for more coverage. 2026-06-19 19:12:08 +01:00
jzmaddock b1f70c8f98 pFq: prevent spurious overflow.
Make sure we throw the correct exceptions when the result is infinite.
Fixes #1404.
2026-06-11 17:53:02 +01:00
jzmaddock 9a964b4aa6 Merge pull request #1403 from dschmitz89/find_degrees_of_freedom_initial_guess
ENH: add warm start for root finder in `find_degrees_of_freedom`
2026-06-09 19:19:27 +01:00
a-leontyev fecc83bd81 Guard against intermediate x*x overflow in Student's t pdf/cdf (#1402)
* Guard against intermediate x*x overflow in Student's t pdf/cdf
* Return exact tail values instead of raising overflow_error (review feedback)

---------

Co-authored-by: LeantionX <leontyevanton1995@gmail.com>
Co-authored-by: Matt Borland <matt@mattborland.com>
2026-06-09 19:17:58 +01:00
jzmaddock 22da3792e5 students_t: Add exception handling guards.
The degree of freedom finders can call the quantile with arguments which result in an infinite result, as far as our root finders are concerned, any large value as a result will do, but we need to not allow an exception to escape or the root finder terminates.
2026-06-09 17:51:20 +01:00
John Maddock 594f210a7e Merge branch 'find_degrees_of_freedom_initial_guess' of https://github.com/dschmitz89/math into pr403 2026-06-09 13:25:03 +01:00
jzmaddock 13c0bc8963 Merge pull request #1368 from JacobHass8/nc-f-find-v1
Find degrees of freedom for `non_central_f` distribution
2026-06-09 13:17:47 +01:00
dschmitz89 ce299579d4 ENH: add initial guess for power equation inversion 2026-06-08 21:24:00 +02:00
dschmitz89 38ebc9a6cf ENH: add warm start for root finder 2026-06-08 21:16:39 +02:00
Jacob Hass a0bd79c0e2 Changed to non-central chi-squared dist 2026-06-02 13:18:04 -07:00
Jacob Hass bdce34ddf7 Added chi squared approximation 2026-06-02 10:05:01 -07:00
Jacob Hass 7a0975efc9 Fixed find_location negative scale 2026-05-28 13:53:18 -07:00
Jacob Hass 3aa42a3f82 Added extreme value distribution 2026-05-27 20:53:01 -07:00
Jacob Hass 5abd8a2a37 Added chi_squared distribution 2026-05-26 18:46:05 -07:00
Jacob Hass 2b07b7a3ec Added cauchy tests 2026-05-26 18:06:34 -07:00
Jacob Hass f2b43c29df Added nan handling for binomial distribution 2026-05-26 12:48:04 -07:00
Jacob Hass 96f7df8e25 Added som basic binomial tests 2026-05-26 11:43:58 -07:00
Jacob Hass ceb66f5c15 Merge branch 'boostorg:develop' into nc-f-find-v1 2026-05-25 15:41:49 -07:00
Jacob Hass 04eace43b1 Added checks for multiple degrees of freedom 2026-05-24 11:11:05 -07:00
jzmaddock 31197cace9 Fix edge case short circuit logic in binomial distro inverse.
Fixes: https://github.com/boostorg/math/issues/1397
2026-05-22 18:06:26 +01:00