Repository navigation
Conversation
Add M nearest-neighbour Chatterjee correlation (#990)
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
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.
* 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
* 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
* 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
* 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
* 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
* 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
* 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
The standard library maintainers agreed to provide import std in C++20 mode as well as C++23, so the docs no longer claim a C++23 requirement. The library sources never gated on C++23: the only floor is the C++17 inline variable check in tools/config.hpp.
* Iterate the Halley step in the double students_t quantile The Shaw series estimates for non-integer df in (2, 3) are only good to ~1e-5, so one Halley step left errors of 1e-12. Repeat the step while it is large. Closes #1535. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Normalize bessel_jn's backward recurrence by the larger of J0 and J1 Near a zero of J0 the recurrence cancels all digits of its J0 end, so dividing J0(x) by it lost up to 1e5 eps, and everything at a zero. Closes #1537. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Fix hypergeometric_1F1's Bessel series for small b - a and 0F1's CF region The A&S 13.3.6 series normalised on an ill-conditioned I_v and stepped down from a rounded order; 0F1 used its CF where the Bessel relation is better. Closes #1538. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Compute jacobi_dn from sn and cn without cancellation dn = cos(T0) / cos(T1 - T0) divides two small cosines near u = (2n+1)K and lost up to 1e5 eps; use dn^2 = cn^2 + k'^2 sn^2 instead. Closes #1539. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Use the asymptotic Bessel derivative expansions only for larger x The three term expansions of J' and Y' are good to only 1e4 eps at x ~ 100 and small order, where the recurrence relations give a few eps. Require x about twice as large and treat v < 2 as v = 2. Closes #1540. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Correct the rounding errors of the Laguerre recurrence Where L_n oscillates the recurrence's rounding errors accumulate to ~n^1.5 eps. Find each step's error with fma and carry it forward by the same recurrence: within the conditioning everywhere, at 2x the cost. Closes #1542. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Avoid cancellation in 1 - k^2 and c - k^2 in the incomplete ellint_2 Both are small for k near 1 and phi near pi/2 but were formed by subtracting nearly equal numbers, giving up to 1e5 ulps. Use (1 - k)(1 + k) and (c - 1) + (1 - k^2). Closes #1543. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Evaluate the expint continued fraction backward from twice the terms Forward evaluation lost tens of eps to rounding, and where it converges slowly it stopped while the tail still mattered. Worst error 105 -> 4 eps, at 1.5-2x the cost. Closes #1545. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Stop using Temme's expansion in gamma_p for x < a near sigma = 0.4 at small a At a ~ 20 and (a - x) / a ~ 0.4 the expansion is good to only ~100 eps whereas the series gives ~10, and gamma_p_inv inherited the error. Part of #1546. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * Color heatmap function panels by signed log when a few values dwarf the rest A linear scale set by 0F1's 1e9 corner or 1F1's 1e48 drew the rest of the panel black; sgn(f) ln(1 + |f|/s) is used only then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep the inverse Gaussian cdf's second term from underflowing exp(2 shape) Phi(-b) lost its digits once Phi(-b) went subnormal, giving 45% errors at cdf ~1e-212; use the erfcx form there too. The cdf is now within its conditioning. Closes #1536. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Evaluate 2F0(-n, b; z) for b, z > 0 by a corrected recurrence The series alternates and lost up to 1e39 eps. Recur in n, carrying each step's rounding error found with fma: correctly rounded, or an evaluation_error where even that can't help (n > 50, n z ~ 1-20). Closes #1541. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Use the continued fraction for ibeta near the mean when b < 40 Sidestepping to the series via ibeta_a_step lost up to 250 eps there, which ibeta_inv and ibetac_inv inherited; the continued fraction is within its prefix's few eps, and faster. Part of #1546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Leave room above ibeta_inv's inflection point bound For a == b and p == 1/2 the root is exactly the inflection point, which was also the search's upper bound, and the root finder only crept up on it: ibeta_inv(a, a, 0.5) was off by up to 1e8 ulps for a < 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add fma for autodiff's fvar laguerre and hypergeometric_2F0 now call fma, which fvar lacked. The derivatives are those of a * b + c, and the value is rounded once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix CI: exact products without a fused fma, test fixes cpp_bin_float's fma rounds twice, so laguerre and 2F0 now use a two_product helper that falls back to Dekker's product; also include laguerre.hpp in its test, add BOOST_MATH_STD_USING for floor in 1F1, full-precision 2F0 constants, and a real_concept tolerance for ibeta_inv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix test_laguerre float overflow on Windows The test now includes laguerre.hpp, so it needs the same ignore_error overflow policy as test_instances; otherwise float overflows throw instead of returning infinity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* Fix clang warnings in headers: unused parameters, lambda captures, sign compare Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix clang warnings in tests and examples: unused parameters, snprintf, pragmas Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Quiet b2 output in CI Pass -d0 to the b2 test steps so passing runs print nothing; failures still show their output. Refs #1507 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Build the MSVC CI tests with optimization Like the gcc and clang jobs, which use -O2: b2's debug default of /Od makes the tests slow to run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Rename test files from foo_test to test_foo Mechanical rename via git mv so a CMake build can glob test_*.cpp; Jamfiles, includes, docs and module list updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep the name math_unit_test.hpp It is the test framework header, not a test, so the foo_test -> test_foo rename shouldn't apply to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Only generate passing rvar special function tests Emit only run entries, keep only passing files, fix ET_OFF run-fail duplicates. Refs #1507 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Remove expected-failure autodiff special function tests Drop the compile-fail and run-fail entries and their generated files. Refs #1507 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Pass the toolset to b2 in the MSVC2022 CI jobs The clang-win jobs never told b2 the toolset, so they built with msvc and duplicated the msvc-14.3 latest job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix the prime sieve and ccmath div builds with clang-cl and libc++ clang-cl lacks __umodti3, so skip the __int128 remainder there; add the missing <system_error> and <cstdlib> includes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Use coarser interpolation grids in the slowest wavelet tests Daubechies/Fourier/wavelet-transform tests build 2^10-2^12 grids except for representative p; Whittaker-Shannon samples fewer quad-precision points; boundary BOOST_ASSERTs become CHECK_LE. Refs #1507 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Check the L2 norm of the Daubechies scaling function The check integrated phi rather than phi_sq, so it repeated the integral check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop the Boost.Serialization dependency test_archive.cpp had not compiled since 2013 and was never in the Jamfile; the two serialization examples were commented out. The facets stay covered by the nonfinite tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Run the orphaned test_math_fwd and test_real_concept_neg_bin Neither was in the Jamfile; both pass. Remove test_expm1_extra, whose entry the 2025 log1p/expm1 rewrite replaced with test_log1p_expm1_extra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix the thread count and call budget in the optimizer tests Differential evolution spawned one thread per core every generation; use 2. Random search scaled its budget by core count; use a fixed 1e5. Refs #1507 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Thin redundant grids in the next, legendre and jacobi_theta tests Brute-force float counts use the smallest ratios crossing a binade; P'_n(+-1) checks are sparse above n=200; the theta identity grid uses every other q and z. Refs #1507 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Cheaper multiprecision adaptive symplectic case and SO4 example grid Use the sixth order method for the quad-precision adaptive test, and a 3-interval grid for the six nested SO4 loops. Refs #1507 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port the quadrature tests to math_unit_test.hpp Replace the Boost.Test checks with ulp, absolute and exact checks, tightened to measured errors where the tolerance scales with epsilon, and drop the Boost.Test dependency from their Jamfile entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port the interpolator and smoothing tests to math_unit_test.hpp Also revive the circle and helix interpolation loops in test_catmull_rom, which iterated over a moved-from vector and so checked nothing, and make the b-spline evenness check compare b3(arg) with b3(-arg). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port the Eigen quadrature tests to math_unit_test.hpp The matrix-valued checks keep their tolerances; ulp checks are tightened to measured errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port the numerical differentiation test to math_unit_test.hpp The error-estimate and Bessel derivative checks keep their tolerances; the complex-step check is tightened to measured error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix the CI failures from the math_unit_test port Restore the Boost.Test-era tolerances for two real_concept checks, use a Real expected value in catmull_rom, skip real_concept_neg_bin in standalone mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Show failing test output in the Windows CI jobs On Windows b2 -d0 prints nothing for a failing test, so rerun the failed targets with -d1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Restore the old tolerance for the exp_sinh non-central t check The port tightened it to 60 ulps; mingw's long double libm needs 74. 100 eps is ~200 ulps here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix the Drone failures in the ported tests Use std::abs, which libstdc++ needs: unqualified abs(float) was int abs. Cast to Real for float64_t. Restore the Boost.Test-equivalent tolerances for erfc, NR 4.5.4 and cos_integral2 on 128-bit types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pass -mfma on Drone only when the CPU has FMA The dronerunnerkh* x86 hosts lack FMA, so print_math_info died with SIGILL before any test ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add fma for reverse-mode rvar ibeta_power_terms calls fma since the ibeta fix, which broke the rvar ibeta compile tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Judge the pFq cancellation test by the evaluation type's error The test scaled norm by epsilon<T>, but pFq sums the series, and decides whether to throw, in the promoted type, which keeps double's digits on quad long double. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Record the ibeta continued fraction's iteration bound for b < 40, a > 15 Below the mean the CF needs at most ~80 terms in double for any a up to 1e15 and beyond, so it is never more than ~2x the old sidestep and usually faster. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Give the recurrence iterators an integer starting offset With recurrence_offset(k), the Bessel iterators step through orders v + k, v + k - 1, ... each rounded once, so 1F1's A&S 13.3.6 series can use bessel_i_backwards_iterator again instead of its own loop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
) * Add CHECK_RELATIVE_ERROR and CHECK_NO_THROW to math_unit_test.hpp CHECK_RELATIVE_ERROR is Boost.Test's CHECK_CLOSE_FRACTION comparison; the error count is now shared across translation units. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port test_rationals to math_unit_test.hpp The 4 eps percentage tolerance becomes a 4 eps CHECK_RELATIVE_ERROR, and the generators emit the new macro. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port the Lambert W tests to math_unit_test.hpp CHECK_CLOSE_FRACTION becomes CHECK_RELATIVE_ERROR with the same tolerances; these files compiled Boost.Test inline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port the reverse-mode autodiff and optimizer tests to math_unit_test.hpp Includes the 159 generated special-function tests and their generator; each compiled Boost.Test inline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port the forward-mode autodiff tests and test_classify to math_unit_test.hpp They share test_autodiff.hpp. Mixed-type equality checks are cast to T, and test_classify drops the Boost.Test pch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port test_polynomial and test_fibonacci to math_unit_test.hpp Fixture test cases become fixture subclasses; test_fibonacci compiled Boost.Test inline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port test_recurrence, test_erf_limits and issue893 to math_unit_test.hpp These compiled Boost.Test inline; mixed-type equality checks are cast to the multiprecision type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Pass file and function names to math_unit_test checks as C strings Two std::string temporaries per check made math_unit_test checks slow to compile; test_rationals compiles about 3x faster. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port the Holtsmark, SaS point5, map-Airy and Landau tests to math_unit_test.hpp These compiled Boost.Test inline; percentage tolerances become CHECK_RELATIVE_ERROR fractions, and the unused pch is dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Port test_symplectic to math_unit_test.hpp It compiled Boost.Test inline; the checks map one to one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Keep BOOST_REQUIRE semantics in the ported reverse-mode tests A failed former REQUIRE check now returns from its test case, as Boost.Test did, instead of running on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Rasterize the ulps plots' data and sample them on a grid Points and curves go into embedded PNG masks; condition numbers come from finite differences on the grid, with random probes between. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Make the clipped ulps plot range symmetric With a clip, the y range is ±min(clip, worst |ulps|), so ticks and envelope are symmetric whatever the samples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Address review of the ulps plot rasterizer and grid envelope lodepng only on request (BOOST_MATH_USE_LODEPNG); OR'd subsample masks painted in draw order with content-hashed ids; distrust wide stencils. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Test whole pixels for overlap between raster masks Masks blend per pixel; the mask cap now limits masks per color, and every color gets its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Include <functional> in the color maps example It uses std::function, which it got transitively before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
gcc/clang get -ffp-contract=fast (+ -mfma on x86), MSVC /fp:contract /arch:AVX2, clang-cl fast + /arch:AVX2: ISO-mode gcc jobs fused nothing and each job contracted differently. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Improve ibeta accuracy for small parameters and near the mean Neumaier-sum the series, evaluate the continued fraction from the tail (now used for all b < 40 near the mean instead of the ibeta_a_step sidestep), compute the complement of the small-parameter series directly, and carry the first exponent term of ibeta_power_terms in two doubles; ibeta_invb(0.108, 0.6515, 0.5) goes from 23.5 to 3.5 eps. ibetac for tiny a, b with x < 0.02 is still ~20 eps out. Refs #1546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Loosen the ibeta_inva/invb spot checks to 10 eps With gcc's -ffp-contract=fast the inverse at (0.04377, 0.6669, 0.3244) is 7.6 eps out, from forward errors of a few eps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix expression-template builds and loosen ibeta spot checks to 4 eps Materialise -b and the Neumaier ?: branches as T; x86 CI measured 3.03 eps. Allow 20x for the no-Lanczos negative binomial quantile (7500 eps on s390x). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Fix the no-Lanczos beta and keep the ibeta sidestep for 128-bit Lanczos The shifted recursion in beta lost ~30 eps at 113 bits; tgamma is good to 1 eps. With a Lanczos approximation above double, three Lanczos sums cost ~10 eps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…1561) No-Lanczos ibeta/igamma use log1pmx of an exact x c - a near the mean, not pow; libeta shares ibeta's bases; Hermite prime and polygamma avoid cancellation and exp(log). Gauss-Hermite weights sum to sqrt(pi); discrete_legendre fuses one way; fixed autodiff seed; nc_t, ulps_plot, quad and MinGW test fixes; stray binaries; CI cancels stale runs. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
promote_double is now false, with the test tables keyed on it; integer_round_up is the default discrete quantile; discrete_legendre uses explicit fma, so contraction can't make it disagree with itself. Closes #1211 Closes #1203 Co-authored-by: Reimar Döffinger <reimar.doeffinger@arm.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…1567) Use long double literals instead; standalone-gcc failed on develop since the entropy test landed. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
fft<Complex>/real_fft<Complex>: mixed-radix Stockham for prime factors up to 97, else Bluestein, any complex type, in or out of place, no allocation after construction; cardinal_trigonometric and chebyshev_transform now use it, so FFTW is gone. Python bindings for fft, real_fft and the DCT-II, plus the sieve bindings. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ts with -Wextra -Wshadow -Werror (#1568) Stirling-remainder closed forms (gamma family, Fisher F), Shannon sums with a coarse trapezoid for large variances (Poisson, binomial, negative binomial, hypergeometric), quadrature for skew normal and hyperexponential; non-central ones are skipped. The headers are now free of -Wshadow and -Wextra warnings under gcc and clang, and test/compile_test enforces it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
tanh_sinh, exp_sinh, sinh_sinh, trapezoidal, gauss, gauss_kronrod, gauss_hermite, ooura_fourier_sin/cos and van_den_bos_unit_square, taking a Python callable and returning the integral with the error estimate and L1 norm the C++ reports. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
polynomial_roots: the Imbach-Moroz piecewise root finder (arXiv:2302.06244), whose sector DFTs use tools::fft; polynomial_roots_companion_matrix: the Aurentz-Mach-Vandebril-Watkins companion QR, O(n^2) and normwise backward stable. Both take any random access container of built-in or Boost.Multiprecision reals, with Python bindings. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
logcdf and its complement for beta, binomial, chi squared, Fisher F, gamma, inverse chi squared, inverse gamma, negative binomial, Poisson and Student's t now use lgamma_p/lgamma_q and libeta/libetac, so they stay finite and accurate in the tails where log(cdf) underflows. Closes #1566 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
differential_evolution, jso, random_search and (where Eigen is found) cma_es, minimizing a Python callable over a box. Worker threads take the GIL per call, and an exception from the callable cancels the run and is raised. Fix test_logcdf on 80/128-bit long double: 40-digit references, and 2048 ulps for tiny tails in wider types (ibeta/gamma_p error there). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…e_binomial to math_unit_test (#1573) Location, scale and shape as on Wikipedia, with log1p/expm1 forms continuous through the Gumbel case and moments summed from the zeta series of lgamma where their Gamma combinations cancel. The negative binomial quantile checks now scale with the quantile's condition number, which reached 548 near zero and failed windows_gcc. The nanobind distributions get their parameters as properties and a repr that rebuilds them. SYCL tests build with -fp-model=precise, dropping three fast-math workarounds. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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>
…atmap (#1575) Reference: cpp_bin_float_50 or a Python callable; ulps_plot gains threads. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Jacobi theta, Kolmogorov-Smirnov, ibeta, 2F0, laguerre, gauss_hermite and the discrete entropies share two_product, two_sum_error, difference_of_products and compensated_sum. Products whose errors are tracked now come from two_product, so contraction can't fuse them: the Kolmogorov-Smirnov pdf's worst error falls from 253 to 3.4 eps; other results are bitwise identical. The header forbids reassociation, so the compensations survive -ffast-math. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#1579) With promote_double now false, defining BOOST_MATH_PROMOTE_FLOAT_POLICY=false made the forwarding specializations repeat policy<>. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
@mborland : Yes, there were breaking changes like turning off double promotion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wednesday is the deadline for breaking changes which I believe we have this cycle, right @NAThompson? Either way this looks like it's going to be a big one so it'll be good to give ourselves extra time incase there is breakage elsewhere.