Skip to content

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented May 26, 2025

This PR adds the code of Boost.Math as of version 1.89 into the third-party directory. This PR is a support in the licensing discussion that needs to happen due to the code being under the Boost Software License as opposed to the LLVM license, according to the LLVM Developer Policy: https://llvm.org/docs/DeveloperPolicy.html#copyright-license-and-patents

The end goal of adding this code into the third-party directory is to use it as a basis for implementing the Math Special Functions, a feature that has been missing from libc++ for very long. This was previously discussed in https://reviews.llvm.org/D142806 where we got stuck on the need to get the license cleared, which I am now bringing up for discussion again after a long hiatus.

NOTE: This PR is in support of a licensing discussion with the LLVM Board to see if the proposed usage model and license is acceptable from a legal standpoint. The overall approach for implementing these functions will be the subject of a RFC to establish consensus on the technical approach if the usage model is cleared with the board.

UPDATE October 8th 2025: The RFC obtained consensus so we will be moving forward and merging this PR.

@ldionne ldionne added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label May 26, 2025
@llvmbot
Copy link
Member

llvmbot commented May 26, 2025

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

This PR adds the code of Boost.Math as of version 1.88 into the third-party directory. This PR is a support in the licensing discussion that needs to happen due to the code being under the Boost Software License as opposed to the LLVM license, according to the LLVM Developer Policy: https://llvm.org/docs/DeveloperPolicy.html#copyright-license-and-patents

The end goal of adding this code into the third-party directory is to use it as a basis for implementing the Math Special Functions, a feature that has been missing from libc++ for very long. This was previously discussed in https://reviews.llvm.org/D142806 where we got stuck on the need to get the license cleared, which I am now bringing up for discussion again after a long hiatus.


Patch is 73.64 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/141508.diff

4414 Files Affected:

  • (added) third-party/boost-math/.circleci/config.yml (+62)
  • (added) third-party/boost-math/.codecov.yml (+26)
  • (added) third-party/boost-math/.drone.star (+72)
  • (added) third-party/boost-math/.drone/after-success.sh (+3)
  • (added) third-party/boost-math/.drone/before-install.sh (+3)
  • (added) third-party/boost-math/.drone/before-script.sh (+3)
  • (added) third-party/boost-math/.drone/boost.sh (+48)
  • (added) third-party/boost-math/.drone/drone.sh (+59)
  • (added) third-party/boost-math/.gitattributes (+96)
  • (added) third-party/boost-math/.github/workflows/ci.yml (+778)
  • (added) third-party/boost-math/.github/workflows/codecov.yml (+209)
  • (added) third-party/boost-math/.gitignore (+30)
  • (added) third-party/boost-math/.travis.yml (+795)
  • (added) third-party/boost-math/CMakeLists.txt (+61)
  • (added) third-party/boost-math/LICENSE (+23)
  • (added) third-party/boost-math/README.md (+176)
  • (added) third-party/boost-math/build.jam (+48)
  • (added) third-party/boost-math/config/Jamfile.v2 (+54)
  • (added) third-party/boost-math/config/has_128bit_floatmax_t.cpp (+18)
  • (added) third-party/boost-math/config/has_fftw3.cpp (+19)
  • (added) third-party/boost-math/config/has_float128.cpp (+17)
  • (added) third-party/boost-math/config/has_gcc_visibility.cpp (+13)
  • (added) third-party/boost-math/config/has_gmp.cpp (+33)
  • (added) third-party/boost-math/config/has_gmpxx.cpp (+7)
  • (added) third-party/boost-math/config/has_intel_quad.cpp (+16)
  • (added) third-party/boost-math/config/has_long_double_support.cpp (+10)
  • (added) third-party/boost-math/config/has_mpfr.cpp (+47)
  • (added) third-party/boost-math/config/has_mpfr_class.cpp (+15)
  • (added) third-party/boost-math/config/has_mpreal.cpp (+14)
  • (added) third-party/boost-math/config/has_ntl_rr.cpp (+12)
  • (added) third-party/boost-math/config/is_ci_sanitizer_run.cpp (+13)
  • (added) third-party/boost-math/config/is_ci_standalone_run.cpp (+13)
  • (added) third-party/boost-math/config/is_cygwin_run.cpp (+13)
  • (added) third-party/boost-math/doc/Jamfile.v2 (+99)
  • (added) third-party/boost-math/doc/background/error.qbk (+73)
  • (added) third-party/boost-math/doc/background/implementation.qbk (+664)
  • (added) third-party/boost-math/doc/background/lanczos.qbk (+246)
  • (added) third-party/boost-math/doc/background/references.qbk (+115)
  • (added) third-party/boost-math/doc/background/remez.qbk (+377)
  • (added) third-party/boost-math/doc/background/special_tut.qbk (+506)
  • (added) third-party/boost-math/doc/complex/complex-tr1.qbk (+149)
  • (added) third-party/boost-math/doc/concepts/concepts.qbk (+631)
  • (added) third-party/boost-math/doc/constants/constants.qbk (+750)
  • (added) third-party/boost-math/doc/constants/pp_pi.hpp (+99)
  • (added) third-party/boost-math/doc/cstdfloat/cstdfloat.qbk (+551)
  • (added) third-party/boost-math/doc/cstdfloat/cstdfloat_header.qbk (+29)
  • (added) third-party/boost-math/doc/cstdfloat/jamfile.v2 (+109)
  • (added) third-party/boost-math/doc/differentiation/autodiff.pdf ()
  • (added) third-party/boost-math/doc/differentiation/autodiff.qbk (+313)
  • (added) third-party/boost-math/doc/differentiation/autodiff.tex (+1054)
  • (added) third-party/boost-math/doc/differentiation/lanczos_smoothing.qbk (+163)
  • (added) third-party/boost-math/doc/differentiation/numerical_differentiation.qbk (+108)
  • (added) third-party/boost-math/doc/distexplorer/Jamfile.v2 (+56)
  • (added) third-party/boost-math/doc/distexplorer/distexplorer.qbk (+105)
  • (added) third-party/boost-math/doc/distexplorer/html/index.html (+216)
  • (added) third-party/boost-math/doc/distributions/arcsine.qbk (+290)
  • (added) third-party/boost-math/doc/distributions/background.qbk (+84)
  • (added) third-party/boost-math/doc/distributions/bernoulli.qbk (+121)
  • (added) third-party/boost-math/doc/distributions/beta.qbk (+276)
  • (added) third-party/boost-math/doc/distributions/binomial.qbk (+400)
  • (added) third-party/boost-math/doc/distributions/binomial_example.qbk (+332)
  • (added) third-party/boost-math/doc/distributions/c_sharp.qbk (+20)
  • (added) third-party/boost-math/doc/distributions/cauchy.qbk (+151)
  • (added) third-party/boost-math/doc/distributions/chi_squared.qbk (+163)
  • (added) third-party/boost-math/doc/distributions/chi_squared_examples.qbk (+500)
  • (added) third-party/boost-math/doc/distributions/dist_algorithms.qbk (+78)
  • (added) third-party/boost-math/doc/distributions/dist_reference.qbk (+145)
  • (added) third-party/boost-math/doc/distributions/dist_tutorial.qbk (+497)
  • (added) third-party/boost-math/doc/distributions/distribution_construction.qbk (+17)
  • (added) third-party/boost-math/doc/distributions/empirical_cdf.qbk (+153)
  • (added) third-party/boost-math/doc/distributions/error_handling_example.qbk (+35)
  • (added) third-party/boost-math/doc/distributions/exponential.qbk (+115)
  • (added) third-party/boost-math/doc/distributions/extreme_value.qbk (+126)
  • (added) third-party/boost-math/doc/distributions/f_dist_example.qbk (+220)
  • (added) third-party/boost-math/doc/distributions/find_location_and_scale.qbk (+37)
  • (added) third-party/boost-math/doc/distributions/fisher.qbk (+192)
  • (added) third-party/boost-math/doc/distributions/gamma.qbk (+145)
  • (added) third-party/boost-math/doc/distributions/geometric.qbk (+355)
  • (added) third-party/boost-math/doc/distributions/geometric_example.qbk (+20)
  • (added) third-party/boost-math/doc/distributions/holtsmark.qbk (+118)
  • (added) third-party/boost-math/doc/distributions/hyperexponential.qbk (+506)
  • (added) third-party/boost-math/doc/distributions/hypergeometric.qbk (+256)
  • (added) third-party/boost-math/doc/distributions/inverse_chi_squared.qbk (+178)
  • (added) third-party/boost-math/doc/distributions/inverse_chi_squared_eg.qbk (+32)
  • (added) third-party/boost-math/doc/distributions/inverse_gamma.qbk (+134)
  • (added) third-party/boost-math/doc/distributions/inverse_gamma_example.qbk (+15)
  • (added) third-party/boost-math/doc/distributions/inverse_gaussian.qbk (+177)
  • (added) third-party/boost-math/doc/distributions/kolmogorov_smirnov.qbk (+129)
  • (added) third-party/boost-math/doc/distributions/landau.qbk (+131)
  • (added) third-party/boost-math/doc/distributions/laplace.qbk (+154)
  • (added) third-party/boost-math/doc/distributions/logistic.qbk (+110)
  • (added) third-party/boost-math/doc/distributions/lognormal.qbk (+121)
  • (added) third-party/boost-math/doc/distributions/mapairy.qbk (+121)
  • (added) third-party/boost-math/doc/distributions/nag_library.qbk (+60)
  • (added) third-party/boost-math/doc/distributions/nc_beta.qbk (+207)
  • (added) third-party/boost-math/doc/distributions/nc_chi_squared.qbk (+274)
  • (added) third-party/boost-math/doc/distributions/nc_chi_squared_example.qbk (+20)
  • (added) third-party/boost-math/doc/distributions/nc_f.qbk (+195)
  • (added) third-party/boost-math/doc/distributions/nc_t.qbk (+223)
  • (added) third-party/boost-math/doc/distributions/negative_binomial.qbk (+375)
  • (added) third-party/boost-math/doc/distributions/negative_binomial_example.qbk (+192)
  • (added) third-party/boost-math/doc/distributions/non_members.qbk (+434)
  • (added) third-party/boost-math/doc/distributions/normal.qbk (+123)
  • (added) third-party/boost-math/doc/distributions/normal_example.qbk (+36)
  • (added) third-party/boost-math/doc/distributions/pareto.qbk (+125)
  • (added) third-party/boost-math/doc/distributions/poisson.qbk (+110)
  • (added) third-party/boost-math/doc/distributions/rayleigh.qbk (+126)
  • (added) third-party/boost-math/doc/distributions/saspoint5.qbk (+116)
  • (added) third-party/boost-math/doc/distributions/skew_normal.qbk (+193)
  • (added) third-party/boost-math/doc/distributions/students_t.qbk (+189)
  • (added) third-party/boost-math/doc/distributions/students_t_examples.qbk (+785)
  • (added) third-party/boost-math/doc/distributions/triangular.qbk (+178)
  • (added) third-party/boost-math/doc/distributions/uniform.qbk (+133)
  • (added) third-party/boost-math/doc/distributions/weibull.qbk (+138)
  • (added) third-party/boost-math/doc/equations/acosh1.mml (+39)
  • (added) third-party/boost-math/doc/equations/acosh1.png ()
  • (added) third-party/boost-math/doc/equations/acosh2.mml (+40)
  • (added) third-party/boost-math/doc/equations/acosh2.png ()
  • (added) third-party/boost-math/doc/equations/acosh3.mml (+48)
  • (added) third-party/boost-math/doc/equations/acosh3.png ()
  • (added) third-party/boost-math/doc/equations/acosh4.mml (+65)
  • (added) third-party/boost-math/doc/equations/acosh4.png ()
  • (added) third-party/boost-math/doc/equations/airy.mml (+76)
  • (added) third-party/boost-math/doc/equations/airy.png ()
  • (added) third-party/boost-math/doc/equations/airy_ai.mml (+188)
  • (added) third-party/boost-math/doc/equations/airy_ai.png ()
  • (added) third-party/boost-math/doc/equations/airy_aip.mml (+179)
  • (added) third-party/boost-math/doc/equations/airy_aip.png ()
  • (added) third-party/boost-math/doc/equations/airy_bi.mml (+195)
  • (added) third-party/boost-math/doc/equations/airy_bi.png ()
  • (added) third-party/boost-math/doc/equations/airy_bip.mml (+195)
  • (added) third-party/boost-math/doc/equations/airy_bip.png ()
  • (added) third-party/boost-math/doc/equations/airy_zero_1.mml (+90)
  • (added) third-party/boost-math/doc/equations/airy_zero_2.mml (+36)
  • (added) third-party/boost-math/doc/equations/airy_zero_3.mml (+36)
  • (added) third-party/boost-math/doc/equations/asinh1.mml (+39)
  • (added) third-party/boost-math/doc/equations/asinh1.png ()
  • (added) third-party/boost-math/doc/equations/asinh2.mml (+51)
  • (added) third-party/boost-math/doc/equations/asinh2.png ()
  • (added) third-party/boost-math/doc/equations/asinh3.mml (+41)
  • (added) third-party/boost-math/doc/equations/asinh3.png ()
  • (added) third-party/boost-math/doc/equations/asinh4.mml (+38)
  • (added) third-party/boost-math/doc/equations/asinh4.png ()
  • (added) third-party/boost-math/doc/equations/atanh1.mml (+44)
  • (added) third-party/boost-math/doc/equations/atanh1.png ()
  • (added) third-party/boost-math/doc/equations/atanh2.mml (+40)
  • (added) third-party/boost-math/doc/equations/atanh2.png ()
  • (added) third-party/boost-math/doc/equations/atanh3.mml (+41)
  • (added) third-party/boost-math/doc/equations/atanh3.png ()
  • (added) third-party/boost-math/doc/equations/bernoulli_numbers.mml (+52)
  • (added) third-party/boost-math/doc/equations/bernoulli_numbers.png ()
  • (added) third-party/boost-math/doc/equations/bernoulli_numbers2.mml (+224)
  • (added) third-party/boost-math/doc/equations/bernoulli_numbers2.png ()
  • (added) third-party/boost-math/doc/equations/bessel1.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel1.png ()
  • (added) third-party/boost-math/doc/equations/bessel10.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel10.png ()
  • (added) third-party/boost-math/doc/equations/bessel11.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel11.png ()
  • (added) third-party/boost-math/doc/equations/bessel12.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel12.png ()
  • (added) third-party/boost-math/doc/equations/bessel13.mml (+140)
  • (added) third-party/boost-math/doc/equations/bessel13.png ()
  • (added) third-party/boost-math/doc/equations/bessel14.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel14.png ()
  • (added) third-party/boost-math/doc/equations/bessel15.mml (+114)
  • (added) third-party/boost-math/doc/equations/bessel15.png ()
  • (added) third-party/boost-math/doc/equations/bessel16.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel16.png ()
  • (added) third-party/boost-math/doc/equations/bessel17.mml (+75)
  • (added) third-party/boost-math/doc/equations/bessel18.mml (+50)
  • (added) third-party/boost-math/doc/equations/bessel2.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel2.png ()
  • (added) third-party/boost-math/doc/equations/bessel20.mml (+50)
  • (added) third-party/boost-math/doc/equations/bessel21.mml (+53)
  • (added) third-party/boost-math/doc/equations/bessel22.mml (+91)
  • (added) third-party/boost-math/doc/equations/bessel23.mml (+51)
  • (added) third-party/boost-math/doc/equations/bessel24.mml (+116)
  • (added) third-party/boost-math/doc/equations/bessel25.mml (+51)
  • (added) third-party/boost-math/doc/equations/bessel3.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel3.png ()
  • (added) third-party/boost-math/doc/equations/bessel4.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel4.png ()
  • (added) third-party/boost-math/doc/equations/bessel5.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel5.png ()
  • (added) third-party/boost-math/doc/equations/bessel6.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel6.png ()
  • (added) third-party/boost-math/doc/equations/bessel7.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel7.png ()
  • (added) third-party/boost-math/doc/equations/bessel8.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel8.png ()
  • (added) third-party/boost-math/doc/equations/bessel9.mml (+1)
  • (added) third-party/boost-math/doc/equations/bessel9.png ()
  • (added) third-party/boost-math/doc/equations/bessel_derivatives1.mml (+442)
  • (added) third-party/boost-math/doc/equations/bessel_derivatives1.png ()
  • (added) third-party/boost-math/doc/equations/bessel_derivatives2.mml (+69)
  • (added) third-party/boost-math/doc/equations/bessel_derivatives2.png ()
  • (added) third-party/boost-math/doc/equations/bessel_derivatives3.mml (+69)
  • (added) third-party/boost-math/doc/equations/bessel_derivatives3.png ()
  • (added) third-party/boost-math/doc/equations/bessel_derivatives4.mml (+370)
  • (added) third-party/boost-math/doc/equations/bessel_derivatives4.png ()
  • (added) third-party/boost-math/doc/equations/bessel_derivatives5.mml (+396)
  • (added) third-party/boost-math/doc/equations/bessel_derivatives5.png ()
  • (added) third-party/boost-math/doc/equations/bessel_y0_small_z.mml (+52)
  • (added) third-party/boost-math/doc/equations/bessel_y0_small_z.png ()
  • (added) third-party/boost-math/doc/equations/bessel_y1_small_z.mml (+70)
  • (added) third-party/boost-math/doc/equations/bessel_y1_small_z.png ()
  • (added) third-party/boost-math/doc/equations/bessel_y2_small_z.mml (+81)
  • (added) third-party/boost-math/doc/equations/bessel_y2_small_z.png ()
  • (added) third-party/boost-math/doc/equations/bessel_yn_small_z.mml (+64)
  • (added) third-party/boost-math/doc/equations/bessel_yn_small_z.png ()
  • (added) third-party/boost-math/doc/equations/bessel_yv_small_z.mml (+171)
  • (added) third-party/boost-math/doc/equations/bessel_yv_small_z.png ()
  • (added) third-party/boost-math/doc/equations/beta1.mml (+49)
  • (added) third-party/boost-math/doc/equations/beta1.png ()
  • (added) third-party/boost-math/doc/equations/beta2.mml (+106)
  • (added) third-party/boost-math/doc/equations/beta2.png ()
  • (added) third-party/boost-math/doc/equations/beta3.mml (+128)
  • (added) third-party/boost-math/doc/equations/beta3.png ()
  • (added) third-party/boost-math/doc/equations/beta4.mml (+34)
  • (added) third-party/boost-math/doc/equations/beta4.png ()
  • (added) third-party/boost-math/doc/equations/beta5.mml (+49)
  • (added) third-party/boost-math/doc/equations/beta5.png ()
  • (added) third-party/boost-math/doc/equations/beta6.mml (+48)
  • (added) third-party/boost-math/doc/equations/beta6.png ()
  • (added) third-party/boost-math/doc/equations/beta7.mml (+28)
  • (added) third-party/boost-math/doc/equations/beta7.png ()
  • (added) third-party/boost-math/doc/equations/beta8.mml (+52)
  • (added) third-party/boost-math/doc/equations/beta8.png ()
  • (added) third-party/boost-math/doc/equations/beta_dist_kurtosis.mml (+72)
  • (added) third-party/boost-math/doc/equations/beta_dist_kurtosis.png ()
  • (added) third-party/boost-math/doc/equations/binomial_ref1.mml (+212)
  • (added) third-party/boost-math/doc/equations/binomial_ref1.png ()
  • (added) third-party/boost-math/doc/equations/binomial_ref2.mml (+98)
  • (added) third-party/boost-math/doc/equations/binomial_ref2.png ()
  • (added) third-party/boost-math/doc/equations/cauchy_ref1.mml (+51)
  • (added) third-party/boost-math/doc/equations/cauchy_ref1.png ()
  • (added) third-party/boost-math/doc/equations/chf.mml (+44)
  • (added) third-party/boost-math/doc/equations/chf.png ()
  • (added) third-party/boost-math/doc/equations/chi_squ_ref1.mml (+44)
  • (added) third-party/boost-math/doc/equations/chi_squ_ref1.png ()
  • (added) third-party/boost-math/doc/equations/chi_squ_tut1.mml (+90)
  • (added) third-party/boost-math/doc/equations/chi_squ_tut1.png ()
  • (added) third-party/boost-math/doc/equations/chi_squ_tut2.mml (+24)
  • (added) third-party/boost-math/doc/equations/chi_squ_tut2.png ()
  • (added) third-party/boost-math/doc/equations/chi_squ_tut3.mml (+26)
  • (added) third-party/boost-math/doc/equations/chi_squ_tut3.png ()
  • (added) third-party/boost-math/doc/equations/complex_bessel_k_integral.mml (+51)
  • (added) third-party/boost-math/doc/equations/complex_eta_integral.mml (+70)
  • (added) third-party/boost-math/doc/equations/derivative1.mml (+61)
  • (added) third-party/boost-math/doc/equations/derivative1.png ()
  • (added) third-party/boost-math/doc/equations/derivative2.mml (+75)
  • (added) third-party/boost-math/doc/equations/derivative2.png ()
  • (added) third-party/boost-math/doc/equations/digamma1.mml (+56)
  • (added) third-party/boost-math/doc/equations/digamma1.png ()
  • (added) third-party/boost-math/doc/equations/digamma2.mml (+60)
  • (added) third-party/boost-math/doc/equations/digamma2.png ()
  • (added) third-party/boost-math/doc/equations/digamma3.mml (+94)
  • (added) third-party/boost-math/doc/equations/digamma3.png ()
  • (added) third-party/boost-math/doc/equations/digamma4.mml (+47)
  • (added) third-party/boost-math/doc/equations/digamma4.png ()
  • (added) third-party/boost-math/doc/equations/digamma5.mml (+78)
  • (added) third-party/boost-math/doc/equations/digamma5.png ()
  • (added) third-party/boost-math/doc/equations/dist_tutorial1.mml (+140)
  • (added) third-party/boost-math/doc/equations/dist_tutorial1.png ()
  • (added) third-party/boost-math/doc/equations/dist_tutorial2.mml (+55)
  • (added) third-party/boost-math/doc/equations/dist_tutorial2.png ()
  • (added) third-party/boost-math/doc/equations/dist_tutorial3.mml (+114)
  • (added) third-party/boost-math/doc/equations/dist_tutorial3.png ()
  • (added) third-party/boost-math/doc/equations/dist_tutorial4.mml (+32)
  • (added) third-party/boost-math/doc/equations/dist_tutorial4.png ()
  • (added) third-party/boost-math/doc/equations/ellint1.mml (+1)
  • (added) third-party/boost-math/doc/equations/ellint1.png ()
  • (added) third-party/boost-math/doc/equations/ellint10.mml (+1)
  • (added) third-party/boost-math/doc/equations/ellint10.png ()
  • (added) third-party/boost-math/doc/equations/ellint11.mml (+1)
  • (added) third-party/boost-math/doc/equations/ellint11.png ()
  • (added) third-party/boost-math/doc/equations/ellint12.mml (+1)
  • (added) third-party/boost-math/doc/equations/ellint12.png ()
  • (added) third-party/boost-math/doc/equations/ellint13.mml (+149)
  • (added) third-party/boost-math/doc/equations/ellint13.png ()
  • (added) third-party/boost-math/doc/equations/ellint14.mml (+1)
  • (added) third-party/boost-math/doc/equations/ellint14.png ()
  • (added) third-party/boost-math/doc/equations/ellint15.mml (+1)
  • (added) third-party/boost-math/doc/equations/ellint15.png ()
  • (added) third-party/boost-math/doc/equations/ellint16.mml (+1)
  • (added) third-party/boost-math/doc/equations/ellint16.png ()
  • (added) third-party/boost-math/doc/equations/ellint17.mml (+173)
  • (added) third-party/boost-math/doc/equations/ellint17.png ()
  • (added) third-party/boost-math/doc/equations/ellint18.mml (+53)
  • (added) third-party/boost-math/doc/equations/ellint18.png ()
  • (added) third-party/boost-math/doc/equations/ellint19.mml (+119)
  • (added) third-party/boost-math/doc/equations/ellint19.png ()
  • (added) third-party/boost-math/doc/equations/ellint2.mml (+1)
  • (added) third-party/boost-math/doc/equations/ellint2.png ()
  • (added) third-party/boost-math/doc/equations/ellint20.mml (+30)
  • (added) third-party/boost-math/doc/equations/ellint20.png ()
  • (added) third-party/boost-math/doc/equations/ellint21.mml (+175)
  • (added) third-party/boost-math/doc/equations/ellint21.png ()
diff --git a/third-party/boost-math/.circleci/config.yml b/third-party/boost-math/.circleci/config.yml
new file mode 100644
index 0000000000000..d77b8b620d0d1
--- /dev/null
+++ b/third-party/boost-math/.circleci/config.yml
@@ -0,0 +1,62 @@
+version: 2
+
+jobs:
+  inspect:
+    environment:
+      - BOOST_LIBRARY=math
+      - CXX_STANDARD=gnu++11
+    docker:
+      - image: gcc:9
+    steps:
+      - checkout
+      - run:
+          name: Setting up Environment
+          command: |
+            echo 'export BOOST="$HOME/boost-local"' >> $BASH_ENV
+            if [ $CIRCLE_BRANCH = "master" ]; then
+                echo 'export BOOST_BRANCH="master"' >> $BASH_ENV;
+            else
+                echo 'export BOOST_BRANCH="develop"' >> $BASH_ENV;
+            fi
+            echo 'export BOOST_REMOVE="$BOOST/boost/libs/$BOOST_LIBRARY"' >> $BASH_ENV
+            HOME_SED_=$(echo $HOME | sed -e 's/\//\\\//g')
+            echo 'export HOME_SED=$HOME_SED_' >> $BASH_ENV
+      - run:
+          name: install pre dependencies
+          command: |
+            apt-get update -yqq
+            apt-get install git xsltproc docbook-xsl docbook-xml -y
+      - run:
+          name: Initializing git repo for boost
+          command: |
+            echo BOOST=$BOOST BOOST_REMOVE=$BOOST_REMOVE BOOST_LIBRARY=$BOOST_LIBRARY BOOST_BRANCH=$BOOST_BRANCH PWD=$PWD
+            mkdir $BOOST
+            cd $BOOST
+            git clone --single-branch --branch $BOOST_BRANCH https://github.com/boostorg/boost.git
+            cd boost
+            git submodule update --init --merge
+            rm -rf $BOOST_REMOVE
+            mv $HOME/project $BOOST_REMOVE
+      - run:
+          name: Bootstrapping boost-build
+          command: |
+            cd $BOOST/boost && ./bootstrap.sh && ./b2 headers
+            echo "using xsltproc ;" | tee $HOME/user-config.jam
+            echo "using boostbook : /usr/share/xml/docbook/stylesheet/docbook-xsl : /usr/share/sgml/docbook/dtd/xml/4.2 ;" | tee -a $HOME/user-config.jam
+      - run:
+          name: Building inspect
+          command: |
+            cd $BOOST/boost/tools/inspect/build && ../../../b2 -j2 address-model=64 architecture=x86 toolset=gcc cxxflags="-std=gnu++14" release dist-bin
+      - run:
+          name: Building docs
+          command: |
+            cd $BOOST_REMOVE/doc && rm -rf html/boost_math && ../../../b2 -j2 address-model=64 architecture=x86 toolset=gcc cxxflags="-std=gnu++14" release
+      - run:
+          name: Running Inspect
+          command: |
+            cd $BOOST_REMOVE && ../../dist/bin/inspect -text
+workflows:
+  version: 2
+  build_and_test:
+    jobs:
+      - inspect
diff --git a/third-party/boost-math/.codecov.yml b/third-party/boost-math/.codecov.yml
new file mode 100644
index 0000000000000..751f83ac9668d
--- /dev/null
+++ b/third-party/boost-math/.codecov.yml
@@ -0,0 +1,26 @@
+# Copyright 2019 - 2021 Alexander Grund
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
+#
+# Sample codecov configuration file. Edit as required
+
+codecov:
+  max_report_age: off
+  require_ci_to_pass: yes
+  notify:
+    # Increase this if you have multiple coverage collection jobs
+    after_n_builds: 1
+    wait_for_ci: yes
+
+# Change how pull request comments look
+comment:
+  layout: "reach,diff,flags,files,footer"
+
+# Ignore specific files or folders. Glob patterns are supported.
+# See https://docs.codecov.com/docs/ignoring-paths
+ignore:
+  - extra/**/*
+  - reporting/**/*
+  - example/**/*
+  - include_private/**/*
+  - tools/**/*
diff --git a/third-party/boost-math/.drone.star b/third-party/boost-math/.drone.star
new file mode 100644
index 0000000000000..2202c601779c8
--- /dev/null
+++ b/third-party/boost-math/.drone.star
@@ -0,0 +1,72 @@
+# Use, modification, and distribution are
+# subject to the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE.txt)
+#
+# Copyright Rene Rivera 2020.
+# Copyright John Maddock 2021.
+
+# For Drone CI we use the Starlark scripting language to reduce duplication.
+# As the yaml syntax for Drone CI is rather limited.
+#
+#
+globalenv={}
+linuxglobalimage="cppalliance/droneubuntu1604:1"
+windowsglobalimage="cppalliance/dronevs2019"
+
+def main(ctx):
+
+  things_to_test = [ "special_fun", "distribution_tests", "mp", "misc", "interpolators", "quadrature", "autodiff", "long-running-tests", "float128_tests", "concepts" ]
+  gcc13_things_to_test = [ "special_fun", "distribution_tests", "mp", "misc", "interpolators", "quadrature", "autodiff", "long-running-tests", "float128_tests", "concepts", "new_floats" ]
+  sanitizer_test = [ "special_fun", "distribution_tests", "misc", "interpolators", "quadrature", "float128_tests" ]
+  gnu_5_stds = [ "gnu++14", "c++14" ]
+  gnu_6_stds = [ "gnu++14", "c++14", "gnu++17", "c++17" ]
+  clang_6_stds = [ "c++14", "c++17" ]
+  gnu_9_stds = [ "gnu++14", "c++14", "gnu++17", "c++17", "gnu++2a", "c++2a" ]
+  clang_10_stds = [ "c++14", "c++17", "c++2a" ]
+  gnu_non_native = [ "gnu++17" ]
+  gcc13_stds = [ "c++23" ]
+
+  result = []
+
+  for suite in sanitizer_test:
+    #
+    # Sanitizers:
+    #
+    result.append(linux_cxx("Ubuntu Clang-18 C++20 ASAN" + " " + suite, "clang++-18", packages="clang-18", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-18', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '<cxxflags>-fsanitize=address <linkflags>-fsanitize=address <cxxflags>-DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv))
+    result.append(linux_cxx("Ubuntu Clang-18 C++20 USAN" + " " + suite, "clang++-18", packages="clang-18", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-18', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '<cxxflags>-fsanitize=undefined <linkflags>-fsanitize=undefined <cxxflags>-DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv))
+    result.append(linux_cxx("Ubuntu Clang-18 C++20 TSAN" + " " + suite, "clang++-18", packages="clang-18", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-18', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '<cxxflags>-fsanitize=thread <linkflags>-fsanitize=thread <cxxflags>-DBOOST_CI_SANITIZER_BUILD' }, globalenv=globalenv))
+    result.append(linux_cxx("Ubuntu Clang-18 C++20 ISAN" + " " + suite, "clang++-18", packages="clang-18", privileged=True, buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-18', 'CXXSTD': 'gnu++20', 'TEST_SUITE': suite, 'OPTIONS': '<cxxflags>-fsanitize=integer <linkflags>-fsanitize=integer' }, globalenv=globalenv))
+
+  for suite in things_to_test:
+    for cxx in gnu_5_stds:
+      result.append(linux_cxx("Ubuntu g++-5 " + cxx + " " + suite, "g++-5", packages="g++-5", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-5', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+    for cxx in gnu_6_stds:
+      result.append(linux_cxx("Ubuntu g++-6 " + cxx + " " + suite, "g++-6", packages="g++-6", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-6', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+      result.append(linux_cxx("Ubuntu g++-7 " + cxx + " " + suite, "g++-7", packages="g++-7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-7', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+      result.append(linux_cxx("Ubuntu g++-8 " + cxx + " " + suite, "g++-8", packages="g++-8", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-8', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+      result.append(linux_cxx("Ubuntu g++-9 " + cxx + " " + suite, "g++-9", packages="g++-9", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-9', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+    for cxx in clang_6_stds:
+      result.append(linux_cxx("Ubuntu clang++-6 " + cxx + " " + suite, "clang++-6.0", packages="clang-6.0", llvm_os="xenial", llvm_ver="6.0", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-6.0', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+      result.append(linux_cxx("Ubuntu clang++-7 " + cxx + " " + suite, "clang++-7", packages="clang-7", llvm_os="xenial", llvm_ver="7", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-7', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+      result.append(linux_cxx("Ubuntu clang++-8 " + cxx + " " + suite, "clang++-8", packages="clang-8", llvm_os="xenial", llvm_ver="8", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-8', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+      result.append(linux_cxx("Ubuntu clang++-9 " + cxx + " " + suite, "clang++-9", packages="clang-9", llvm_os="xenial", llvm_ver="9", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-9', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+    for cxx in gnu_9_stds:
+      result.append(linux_cxx("Ubuntu g++-10 " + cxx + " " + suite, "g++-10", packages="g++-10", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-10', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+      result.append(linux_cxx("Ubuntu g++-11 " + cxx + " " + suite, "g++-11", packages="g++-11", buildtype="boost", image="cppalliance/droneubuntu2004:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-11', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+    for cxx in clang_10_stds:
+      result.append(linux_cxx("Ubuntu clang++-10 " + cxx + " " + suite, "clang++-10", packages="clang-10", llvm_os="xenial", llvm_ver="10", buildtype="boost", image="cppalliance/droneubuntu1804:1", environment={'TOOLSET': 'clang', 'COMPILER': 'clang++-10', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+    for cxx in gnu_non_native:
+      result.append(linux_cxx("Ubuntu g++ s390s " + cxx + " " + suite, "g++", packages="g++", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="s390x", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+    for cxx in gnu_non_native:
+      result.append(linux_cxx("Ubuntu g++ ARM64" + cxx + " " + suite, "g++", packages="g++", buildtype="boost", image="cppalliance/droneubuntu2204:multiarch", arch="arm64", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+    for cxx in gnu_non_native:
+      result.append(osx_cxx("M1 Clang " + cxx + " " + suite, "clang++", buildscript="drone", buildtype="boost", xcode_version="14.1", environment={'TOOLSET': 'clang', 'CXXSTD': cxx, 'TEST_SUITE': suite, 'DEFINE': 'BOOST_MATH_NO_REAL_CONCEPT_TESTS,BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS,BOOST_MATH_MULTI_ARCH_CI_RUN', }, globalenv=globalenv))
+  for suite in gcc13_things_to_test:
+    for cxx in gcc13_stds:
+      result.append(linux_cxx("Ubuntu g++-13 " + cxx + " " + suite, "g++-13", packages="g++-13", buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-13', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+      result.append(linux_cxx("Ubuntu g++-14 " + cxx + " " + suite, "g++-14", packages="g++-14", buildtype="boost", image="cppalliance/droneubuntu2404:1", environment={'TOOLSET': 'gcc', 'COMPILER': 'g++-14', 'CXXSTD': cxx, 'TEST_SUITE': suite, }, globalenv=globalenv))
+
+  return result
+
+# from https://github.com/boostorg/boost-ci
+load("@boost_ci//ci/drone/:functions.star", "linux_cxx","windows_cxx","osx_cxx","freebsd_cxx")
diff --git a/third-party/boost-math/.drone/after-success.sh b/third-party/boost-math/.drone/after-success.sh
new file mode 100755
index 0000000000000..7a693aac0b811
--- /dev/null
+++ b/third-party/boost-math/.drone/after-success.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+
diff --git a/third-party/boost-math/.drone/before-install.sh b/third-party/boost-math/.drone/before-install.sh
new file mode 100755
index 0000000000000..7a693aac0b811
--- /dev/null
+++ b/third-party/boost-math/.drone/before-install.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+
diff --git a/third-party/boost-math/.drone/before-script.sh b/third-party/boost-math/.drone/before-script.sh
new file mode 100755
index 0000000000000..7a693aac0b811
--- /dev/null
+++ b/third-party/boost-math/.drone/before-script.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+
diff --git a/third-party/boost-math/.drone/boost.sh b/third-party/boost-math/.drone/boost.sh
new file mode 100755
index 0000000000000..baa747311f719
--- /dev/null
+++ b/third-party/boost-math/.drone/boost.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+set -ex
+export TRAVIS_BUILD_DIR=$(pwd)
+export DRONE_BUILD_DIR=$(pwd)
+export TRAVIS_BRANCH=$DRONE_BRANCH
+export VCS_COMMIT_ID=$DRONE_COMMIT
+export GIT_COMMIT=$DRONE_COMMIT
+export PATH=~/.local/bin:/usr/local/bin:$PATH
+
+echo '==================================> BEFORE_INSTALL'
+
+. .drone/before-install.sh
+
+echo '==================================> INSTALL'
+
+cd ..
+if [ "$DRONE_BRANCH" == "master" ] || [[ "$DRONE_BRANCH" == */master ]]; then
+    export BOOST_BRANCH="master"
+else
+    export BOOST_BRANCH="develop"
+fi
+git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
+cd boost-root
+git submodule update --init tools/build
+git submodule update --init libs/config
+git submodule update --init libs/polygon
+git submodule update --init tools/boost_install
+git submodule update --init libs/headers
+git submodule update --init tools/boostdep
+cp -r $TRAVIS_BUILD_DIR/* libs/math
+python tools/boostdep/depinst/depinst.py math
+./bootstrap.sh
+./b2 headers
+
+echo '==================================> BEFORE_SCRIPT'
+
+. $DRONE_BUILD_DIR/.drone/before-script.sh
+
+echo '==================================> SCRIPT'
+
+echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD $OPTIONS ;" > ~/user-config.jam
+(cd libs/config/test && ../../../b2 print_config_info print_math_info toolset=$TOOLSET)
+(cd libs/math/test && ../../../b2 -j3 toolset=$TOOLSET $TEST_SUITE)
+
+echo '==================================> AFTER_SUCCESS'
+
+. $DRONE_BUILD_DIR/.drone/after-success.sh
diff --git a/third-party/boost-math/.drone/drone.sh b/third-party/boost-math/.drone/drone.sh
new file mode 100644
index 0000000000000..86dbf129f58df
--- /dev/null
+++ b/third-party/boost-math/.drone/drone.sh
@@ -0,0 +1,59 @@
+# Use, modification, and distribution are
+# subject to the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE.txt)
+#
+# Copyright Rene Rivera 2020.
+# Copyright John Maddock 2021.
+
+#!/bin/bash
+
+set -ex
+export TRAVIS_BUILD_DIR=$(pwd)
+export DRONE_BUILD_DIR=$(pwd)
+export TRAVIS_BRANCH=$DRONE_BRANCH
+export VCS_COMMIT_ID=$DRONE_COMMIT
+export GIT_COMMIT=$DRONE_COMMIT
+export PATH=~/.local/bin:/usr/local/bin:$PATH
+
+echo '==================================> BEFORE_INSTALL'
+
+. .drone/before-install.sh
+
+echo '==================================> INSTALL'
+
+cd ..
+if [ "$DRONE_BRANCH" == "master" ] || [[ "$DRONE_BRANCH" == */master ]]; then
+    export BOOST_BRANCH="master"
+else
+    export BOOST_BRANCH="develop"
+fi
+git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
+cd boost-root
+git submodule update --init tools/build
+git submodule update --init libs/config
+git submodule update --init libs/polygon
+git submodule update --init tools/boost_install
+git submodule update --init libs/headers
+git submodule update --init tools/boostdep
+cp -r $TRAVIS_BUILD_DIR/* libs/math
+python tools/boostdep/depinst/depinst.py math
+./bootstrap.sh
+./b2 headers
+
+if [[ $(uname) == "Linux" ]]; then
+    echo 0 | sudo tee /proc/sys/kernel/randomize_va_space
+fi
+
+echo '==================================> BEFORE_SCRIPT'
+
+. $DRONE_BUILD_DIR/.drone/before-script.sh
+
+echo '==================================> SCRIPT'
+
+echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD $OPTIONS ;" > ~/user-config.jam
+(cd libs/config/test && ../../../b2 config_info_travis_install toolset=$TOOLSET && ./config_info_travis)
+(cd libs/math/test && ../../../b2 toolset=$TOOLSET $TEST_SUITE define=$DEFINE)
+
+echo '==================================> AFTER_SUCCESS'
+
+. $DRONE_BUILD_DIR/.drone/after-success.sh
diff --git a/third-party/boost-math/.gitattributes b/third-party/boost-math/.gitattributes
new file mode 100644
index 0000000000000..3e84d7c704432
--- /dev/null
+++ b/third-party/boost-math/.gitattributes
@@ -0,0 +1,96 @@
+* text=auto !eol svneol=native#text/plain
+*.gitattributes text svneol=native#text/plain
+
+# Scriptish formats
+*.bat        text svneol=native#text/plain
+*.bsh        text svneol=native#text/x-beanshell
+*.cgi        text svneol=native#text/plain
+*.cmd        text svneol=native#text/plain
+*.js         text svneol=native#text/javascript
+*.php        text svneol=native#text/x-php
+*.pl         text svneol=native#text/x-perl
+*.pm         text svneol=native#text/x-perl
+*.py         text svneol=native#text/x-python
+*.sh         eol=lf svneol=LF#text/x-sh
+configure    eol=lf svneol=LF#text/x-sh
+
+# Image formats
+*.bmp        binary svneol=unset#image/bmp
+*.gif        binary svneol=unset#image/gif
+*.ico        binary svneol=unset#image/ico
+*.jpeg       binary svneol=unset#image/jpeg
+*.jpg        binary svneol=unset#image/jpeg
+*.png        binary svneol=unset#image/png
+*.tif        binary svneol=unset#image/tiff
+*.tiff       binary svneol=unset#image/tiff
+*.svg        text svneol=native#image/svg%2Bxml
+
+# Data formats
+*.pdf        binary svneol=unset#application/pdf
+*.avi        binary svneol=unset#video/avi
+*.doc        binary svneol=unset#application/msword
+*.dsp        text svneol=crlf#text/plain
+*.dsw        text svneol=crlf#text/plain
+*.eps        binary svneol=unset#application/postscript
+*.gz         binary svneol=unset#application/gzip
+*.mov        binary svneol=unset#video/quicktime
+*.mp3        binary svneol=unset#audio/mpeg
+*.ppt        binary svneol=unset#application/vnd.ms-powerpoint
+*.ps         binary svneol=unset#application/postscript
+*.psd        binary svneol=unset#application/photoshop
+*.rdf        binary svneol=unset#text/rdf
+*.rss        text svneol=unset#text/xml
+*.rtf        binary svneol=unset#text/rtf
+*.sln        text svneol=native#text/plain
+*.swf        binary svneol=unset#application/x-shockwave-flash
+*.tgz        binary svneol=unset#application/gzip
+*.vcproj     text svneol=native#text/xml
+*.vcxproj    text svneol=native#text/xml
+*.vsprops    text svneol=native#text/xml
+*.wav        binary svneol=unset#audio/wav
+*.xls        binary svneol=unset#application/vnd.ms-excel
+*.zip        binary svneol=unset#application/zip
+
+# Text formats
+.htaccess    text svneol=native#text/plain
+*.bbk        text svneol=native#text/xml
+*.cmake      text svneol=native#text/plain
+*.css        text svneol=native#text/css
+*.dtd        text svneol=native#text/xml
+*.htm        text svneol=native#text/html
+*.html       text svneol=native#text/html
+*.ini        text svneol=native#text/plain
+*.log        text svneol=native#text/plain
+*.mak        text svneol=native#text/plain
+*.qbk        text svneol=native#text/plain
+*.rst        text svneol=native#text/plain
+*.sql        text svneol=native#text/x-sql
+*.txt        text svneol=native#text/plain
+*.xhtml      text svneol=native#text/xhtml%2Bxml
+*.xml        text svneol=native#text/xml
+*.xsd        text svneol=native#text/xml
+*.xsl        text svneol=native#text/xml
+*.xslt       text svneol=native#text/xml
+*.xul        text svneol=native#text/xul
+*.yml        text svneol=native#text/plain
+boost-no-inspect text svneol=native#text/plain
+CHANGES      text svneol=native#text/plain
+COPYING      text svneol=native#text/plain
+INSTALL      text s...
[truncated]

@h-vetinari
Copy link
Contributor

More references on this topic/discussion in #99939

@h-vetinari
Copy link
Contributor

Is there any reason this couldn't be a git submodule? I don't think it makes a difference from a license perspective, but it would probably make a difference from the POV of the usage model. Apologies if this is what you meant by

The overall approach for implementing these functions will be the subject of a RFC to establish consensus on the technical approach if the usage model is cleared with the board.

@ldionne
Copy link
Member Author

ldionne commented May 29, 2025

Is there any reason this couldn't be a git submodule? I don't think it makes a difference from a license perspective, but it would probably make a difference from the POV of the usage model. Apologies if this is what you meant by

The overall approach for implementing these functions will be the subject of a RFC to establish consensus on the technical approach if the usage model is cleared with the board.

I'm open to any approach. We've typically been making copies for third-party modules but IDK if this is a conscious choice or just the way it was done. This can definitely be discussed as part of the technical discussion subsequent to the license approval.

@ldionne
Copy link
Member Author

ldionne commented Jul 22, 2025

This PR adds the code of Boost.Math as of version 1.88 into the
third-party directory. This PR is a support in the licensing
discussion that needs to happen due to the code being under the
Boost Software License as opposed to the LLVM license, according
to the LLVM Developer Policy: https://llvm.org/docs/DeveloperPolicy.html#copyright-license-and-patents

The end goal of adding this code into the third-party directory is
to use it as a basis for implementing the Math Special Functions, a
feature that has been missing from libc++ for very long. This was
previously discussed in https://reviews.llvm.org/D142806 where we
got stuck on the need to get the license cleared, which I am now
bringing up for discussion again after a long hiatus.
@ldionne ldionne force-pushed the review/add-boost-math-third-party branch from d2e2ade to 52ac4c6 Compare October 8, 2025 12:23
@ldionne ldionne changed the title [third-party] Add a snapshot of Boost.Math 1.88 standalone [third-party] Add a snapshot of Boost.Math 1.89 standalone Oct 8, 2025
@@ -0,0 +1,10 @@
# Third-party LLVM dependencies
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Endilll @AaronBallman What do you think about this README for third-party dependencies?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second paragraph leaves an impression that libc++ specifically got some kind of permission from Boost to use their library, while it seems that we've just looked at Boost license and came to conclusion that libc++ usage is fine.

Otherwise SGTM

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded!

@nikic
Copy link
Contributor

nikic commented Oct 8, 2025

@tstellar Are we going to need an option to build against a system-provided Boost.Math instead of the vendored one? (Though that's not really for this PR but the libcxx integration.)

@ldionne
Copy link
Member Author

ldionne commented Oct 8, 2025

@tstellar Are we going to need an option to build against a system-provided Boost.Math instead of the vendored one? (Though that's not really for this PR but the libcxx integration.)

I think we shouldn't. The way we've envisioned this is that Boost.Math becomes a part of libc++ itself just as if we had copy-pasted the sources. We might need to apply some changes to Boost.Math to integrate it, etc.

It's also possible that libc++ would only work with a specific version of Boost.Math, so then you'd have to match the exact version on your system. All in all, I don't think it's impossible, but it seems to me that making it possible to build against a system-provided Boost goes against the philosophy of the integration we discussed in the RFC.

If that's requested, I'd like to understand the rationale for that need.

@tstellar
Copy link
Collaborator

tstellar commented Oct 8, 2025

@ldionne Do you think you will ever update the bundled version of boost in third-party/ or is it always going to be based off of 1.89?

@ldionne
Copy link
Member Author

ldionne commented Oct 8, 2025

It's likely that we'll want to update it from time to time, but that will depend on what the integration is like. If the integration requires a lot of manual work, we might end up keeping it the same for the foreseeable future. If not, then I guess we'd update it whenever we get the chance.

@nikic
Copy link
Contributor

nikic commented Oct 9, 2025

@tstellar Are we going to need an option to build against a system-provided Boost.Math instead of the vendored one? (Though that's not really for this PR but the libcxx integration.)

I think we shouldn't. The way we've envisioned this is that Boost.Math becomes a part of libc++ itself just as if we had copy-pasted the sources. We might need to apply some changes to Boost.Math to integrate it, etc.

It's also possible that libc++ would only work with a specific version of Boost.Math, so then you'd have to match the exact version on your system. All in all, I don't think it's impossible, but it seems to me that making it possible to build against a system-provided Boost goes against the philosophy of the integration we discussed in the RFC.

If that's requested, I'd like to understand the rationale for that need.

We have a general policy to build against system packages instead of bundled sources (see https://docs.fedoraproject.org/en-US/packaging-guidelines/#bundling). Though given that Boost.Math is a header-only dependency, I think building against the bundled version is probably fine. And if modification to the library will be needed (e.g. to avoid symbol clashes in static archives) then there wouldn't be a choice anyway...

@ldionne
Copy link
Member Author

ldionne commented Oct 14, 2025

Are we comfortable with merging this patch in its current state? I believe I addressed all comments and we have agreement on the integration method (i.e. not a submodule, subsetting the sources, etc).

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

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants