@lakutata/math 0.0.0-stage → 3.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1728) hide show
  1. package/LICENSE +23 -0
  2. package/README.md +954 -2
  3. package/README.zh-CN.md +578 -0
  4. package/THIRD_PARTY_NOTICES.md +553 -0
  5. package/binding.gyp +89 -0
  6. package/dist/cjs/exceptions/MathArgumentException.d.ts +11 -0
  7. package/dist/cjs/exceptions/MathArgumentException.js +18 -0
  8. package/dist/cjs/exceptions/MathCancelledException.d.ts +10 -0
  9. package/dist/cjs/exceptions/MathCancelledException.js +17 -0
  10. package/dist/cjs/exceptions/MathDefinitionException.d.ts +11 -0
  11. package/dist/cjs/exceptions/MathDefinitionException.js +18 -0
  12. package/dist/cjs/exceptions/MathDivisionByZeroException.d.ts +10 -0
  13. package/dist/cjs/exceptions/MathDivisionByZeroException.js +17 -0
  14. package/dist/cjs/exceptions/MathDomainException.d.ts +11 -0
  15. package/dist/cjs/exceptions/MathDomainException.js +18 -0
  16. package/dist/cjs/exceptions/MathException.d.ts +19 -0
  17. package/dist/cjs/exceptions/MathException.js +22 -0
  18. package/dist/cjs/exceptions/MathNotSupportedException.d.ts +11 -0
  19. package/dist/cjs/exceptions/MathNotSupportedException.js +18 -0
  20. package/dist/cjs/exceptions/MathSyntaxException.d.ts +11 -0
  21. package/dist/cjs/exceptions/MathSyntaxException.js +18 -0
  22. package/dist/cjs/exceptions/MathTimeoutException.d.ts +10 -0
  23. package/dist/cjs/exceptions/MathTimeoutException.js +17 -0
  24. package/dist/cjs/exceptions/MathUnitException.d.ts +11 -0
  25. package/dist/cjs/exceptions/MathUnitException.js +18 -0
  26. package/dist/cjs/exceptions/MathUnknownFunctionException.d.ts +12 -0
  27. package/dist/cjs/exceptions/MathUnknownFunctionException.js +19 -0
  28. package/dist/cjs/exports/Math.d.ts +28 -0
  29. package/dist/cjs/exports/Math.js +84 -0
  30. package/dist/cjs/lib/Addon.d.ts +5 -0
  31. package/dist/cjs/lib/Addon.js +9 -0
  32. package/dist/cjs/lib/Context.d.ts +90 -0
  33. package/dist/cjs/lib/Context.js +134 -0
  34. package/dist/cjs/lib/Decimal.d.ts +276 -0
  35. package/dist/cjs/lib/Decimal.js +402 -0
  36. package/dist/cjs/lib/Defaults.d.ts +273 -0
  37. package/dist/cjs/lib/Defaults.js +308 -0
  38. package/dist/cjs/lib/Distribution.d.ts +177 -0
  39. package/dist/cjs/lib/Distribution.js +195 -0
  40. package/dist/cjs/lib/Expression.d.ts +791 -0
  41. package/dist/cjs/lib/Expression.js +991 -0
  42. package/dist/cjs/lib/ExpressionMatrix.d.ts +284 -0
  43. package/dist/cjs/lib/ExpressionMatrix.js +412 -0
  44. package/dist/cjs/lib/LinearAlgebra.d.ts +613 -0
  45. package/dist/cjs/lib/LinearAlgebra.js +712 -0
  46. package/dist/cjs/lib/MathScope.d.ts +268 -0
  47. package/dist/cjs/lib/MathScope.js +316 -0
  48. package/dist/cjs/lib/MathSet.d.ts +139 -0
  49. package/dist/cjs/lib/MathSet.js +376 -0
  50. package/dist/cjs/lib/Matrix.d.ts +212 -0
  51. package/dist/cjs/lib/Matrix.js +393 -0
  52. package/dist/cjs/lib/Native.d.ts +80 -0
  53. package/dist/cjs/lib/Native.js +61 -0
  54. package/dist/cjs/lib/NumberTheory.d.ts +356 -0
  55. package/dist/cjs/lib/NumberTheory.js +524 -0
  56. package/dist/cjs/lib/Numeric.d.ts +363 -0
  57. package/dist/cjs/lib/Numeric.js +243 -0
  58. package/dist/cjs/lib/Polynomials.d.ts +140 -0
  59. package/dist/cjs/lib/Polynomials.js +167 -0
  60. package/dist/cjs/lib/SparseMatrix.d.ts +125 -0
  61. package/dist/cjs/lib/SparseMatrix.js +341 -0
  62. package/dist/cjs/lib/Statistics.d.ts +366 -0
  63. package/dist/cjs/lib/Statistics.js +380 -0
  64. package/dist/cjs/lib/Unit.d.ts +342 -0
  65. package/dist/cjs/lib/Unit.js +1027 -0
  66. package/dist/cjs/lib/UnitTable.d.ts +39 -0
  67. package/dist/cjs/lib/UnitTable.js +634 -0
  68. package/dist/cjs/package.json +1 -0
  69. package/dist/esm/exceptions/MathArgumentException.js +14 -0
  70. package/dist/esm/exceptions/MathCancelledException.js +13 -0
  71. package/dist/esm/exceptions/MathDefinitionException.js +14 -0
  72. package/dist/esm/exceptions/MathDivisionByZeroException.js +13 -0
  73. package/dist/esm/exceptions/MathDomainException.js +14 -0
  74. package/dist/esm/exceptions/MathException.js +18 -0
  75. package/dist/esm/exceptions/MathNotSupportedException.js +14 -0
  76. package/dist/esm/exceptions/MathSyntaxException.js +14 -0
  77. package/dist/esm/exceptions/MathTimeoutException.js +13 -0
  78. package/dist/esm/exceptions/MathUnitException.js +14 -0
  79. package/dist/esm/exceptions/MathUnknownFunctionException.js +15 -0
  80. package/dist/esm/exports/Math.js +26 -0
  81. package/dist/esm/lib/Addon.js +10 -0
  82. package/dist/esm/lib/Context.js +128 -0
  83. package/dist/esm/lib/Decimal.js +397 -0
  84. package/dist/esm/lib/Defaults.js +290 -0
  85. package/dist/esm/lib/Distribution.js +190 -0
  86. package/dist/esm/lib/Expression.js +979 -0
  87. package/dist/esm/lib/ExpressionMatrix.js +407 -0
  88. package/dist/esm/lib/LinearAlgebra.js +708 -0
  89. package/dist/esm/lib/MathScope.js +311 -0
  90. package/dist/esm/lib/MathSet.js +370 -0
  91. package/dist/esm/lib/Matrix.js +382 -0
  92. package/dist/esm/lib/Native.js +56 -0
  93. package/dist/esm/lib/NumberTheory.js +520 -0
  94. package/dist/esm/lib/Numeric.js +239 -0
  95. package/dist/esm/lib/Polynomials.js +163 -0
  96. package/dist/esm/lib/SparseMatrix.js +332 -0
  97. package/dist/esm/lib/Statistics.js +376 -0
  98. package/dist/esm/lib/Unit.js +1018 -0
  99. package/dist/esm/lib/UnitTable.js +631 -0
  100. package/dist/types/exceptions/MathArgumentException.d.ts +11 -0
  101. package/dist/types/exceptions/MathCancelledException.d.ts +10 -0
  102. package/dist/types/exceptions/MathDefinitionException.d.ts +11 -0
  103. package/dist/types/exceptions/MathDivisionByZeroException.d.ts +10 -0
  104. package/dist/types/exceptions/MathDomainException.d.ts +11 -0
  105. package/dist/types/exceptions/MathException.d.ts +19 -0
  106. package/dist/types/exceptions/MathNotSupportedException.d.ts +11 -0
  107. package/dist/types/exceptions/MathSyntaxException.d.ts +11 -0
  108. package/dist/types/exceptions/MathTimeoutException.d.ts +10 -0
  109. package/dist/types/exceptions/MathUnitException.d.ts +11 -0
  110. package/dist/types/exceptions/MathUnknownFunctionException.d.ts +12 -0
  111. package/dist/types/exports/Math.d.ts +28 -0
  112. package/dist/types/lib/Addon.d.ts +5 -0
  113. package/dist/types/lib/Context.d.ts +90 -0
  114. package/dist/types/lib/Decimal.d.ts +276 -0
  115. package/dist/types/lib/Defaults.d.ts +273 -0
  116. package/dist/types/lib/Distribution.d.ts +177 -0
  117. package/dist/types/lib/Expression.d.ts +791 -0
  118. package/dist/types/lib/ExpressionMatrix.d.ts +284 -0
  119. package/dist/types/lib/LinearAlgebra.d.ts +613 -0
  120. package/dist/types/lib/MathScope.d.ts +268 -0
  121. package/dist/types/lib/MathSet.d.ts +139 -0
  122. package/dist/types/lib/Matrix.d.ts +212 -0
  123. package/dist/types/lib/Native.d.ts +80 -0
  124. package/dist/types/lib/NumberTheory.d.ts +356 -0
  125. package/dist/types/lib/Numeric.d.ts +363 -0
  126. package/dist/types/lib/Polynomials.d.ts +140 -0
  127. package/dist/types/lib/SparseMatrix.d.ts +125 -0
  128. package/dist/types/lib/Statistics.d.ts +366 -0
  129. package/dist/types/lib/Unit.d.ts +342 -0
  130. package/dist/types/lib/UnitTable.d.ts +39 -0
  131. package/native/addon.cpp +1374 -0
  132. package/native/async/Pool.cpp +133 -0
  133. package/native/async/Pool.h +59 -0
  134. package/native/config/boost_math_policy.h +26 -0
  135. package/native/config/mpdecimal/mpdecimal.h +809 -0
  136. package/native/config/symengine/symengine_config.h +44 -0
  137. package/native/config/symengine/symengine_export.h +19 -0
  138. package/native/core/Errors.cpp +77 -0
  139. package/native/core/Errors.h +72 -0
  140. package/native/core/Handle.cpp +109 -0
  141. package/native/core/Handle.h +72 -0
  142. package/native/core/Scope.cpp +122 -0
  143. package/native/core/Scope.h +36 -0
  144. package/native/functions/Functions.cpp +468 -0
  145. package/native/functions/Functions.h +115 -0
  146. package/native/functions/Gosper.cpp +429 -0
  147. package/native/functions/Gosper.h +20 -0
  148. package/native/functions/SpecialIntegrals.cpp +329 -0
  149. package/native/functions/SpecialIntegrals.h +53 -0
  150. package/native/functions/Summation.cpp +645 -0
  151. package/native/functions/Summation.h +42 -0
  152. package/native/integrals/Integrals.cpp +1428 -0
  153. package/native/integrals/Integrals.h +32 -0
  154. package/native/limits/Gruntz.cpp +1332 -0
  155. package/native/limits/Gruntz.h +24 -0
  156. package/native/linalg/Decompositions.cpp +159 -0
  157. package/native/linalg/Functions.cpp +199 -0
  158. package/native/linalg/Linalg.cpp +123 -0
  159. package/native/linalg/Linalg.h +67 -0
  160. package/native/linalg/LinalgSupport.h +69 -0
  161. package/native/linalg/Sparse.cpp +172 -0
  162. package/native/matrix/Matrices.cpp +766 -0
  163. package/native/matrix/Matrices.h +74 -0
  164. package/native/ntheory/NumberTheory.cpp +754 -0
  165. package/native/ntheory/NumberTheory.h +56 -0
  166. package/native/numeric/Compiled.cpp +93 -0
  167. package/native/numeric/Compiled.h +49 -0
  168. package/native/numeric/Integrate.cpp +718 -0
  169. package/native/numeric/Numeric.h +95 -0
  170. package/native/numeric/ODE.cpp +542 -0
  171. package/native/numeric/Roots.cpp +402 -0
  172. package/native/ops/Decimal.cpp +776 -0
  173. package/native/ops/Decimal.h +182 -0
  174. package/native/ops/DecimalComplex.cpp +738 -0
  175. package/native/ops/DecimalEvaluator.h +79 -0
  176. package/native/ops/DecimalFunctions.cpp +439 -0
  177. package/native/ops/DecimalOperations.cpp +236 -0
  178. package/native/ops/DecimalSpecial.cpp +1028 -0
  179. package/native/ops/DecimalSupport.h +109 -0
  180. package/native/ops/Operations.cpp +969 -0
  181. package/native/ops/Operations.h +120 -0
  182. package/native/ops/Piecewise.cpp +195 -0
  183. package/native/ops/Piecewise.h +40 -0
  184. package/native/parser/Parser.cpp +853 -0
  185. package/native/parser/Parser.h +56 -0
  186. package/native/poly/Convert.cpp +210 -0
  187. package/native/poly/Convert.h +40 -0
  188. package/native/poly/Dense.cpp +1008 -0
  189. package/native/poly/Dense.h +136 -0
  190. package/native/poly/Euclid.cpp +446 -0
  191. package/native/poly/Euclid.h +44 -0
  192. package/native/poly/Factor.cpp +919 -0
  193. package/native/poly/Factor.h +36 -0
  194. package/native/poly/Galois.cpp +439 -0
  195. package/native/poly/Galois.h +86 -0
  196. package/native/poly/Inequalities.cpp +227 -0
  197. package/native/poly/Inequalities.h +21 -0
  198. package/native/poly/Poly.cpp +338 -0
  199. package/native/poly/Poly.h +46 -0
  200. package/native/poly/Rational.cpp +403 -0
  201. package/native/poly/Rational.h +33 -0
  202. package/native/poly/RealRoots.cpp +136 -0
  203. package/native/poly/RealRoots.h +35 -0
  204. package/native/printer/Printer.cpp +973 -0
  205. package/native/printer/Printer.h +23 -0
  206. package/native/simplify/Simplify.cpp +921 -0
  207. package/native/simplify/Simplify.h +21 -0
  208. package/native/stats/Distributions.cpp +392 -0
  209. package/native/stats/Distributions.h +33 -0
  210. package/native/stats/Statistics.cpp +255 -0
  211. package/native/stats/Statistics.h +25 -0
  212. package/package.json +85 -4
  213. package/scripts/sources.mjs +35 -0
  214. package/vendor/PATCHES.md +169 -0
  215. package/vendor/boost/config/README.md +43 -0
  216. package/vendor/boost/config/include/boost/config/abi/borland_prefix.hpp +27 -0
  217. package/vendor/boost/config/include/boost/config/abi/borland_suffix.hpp +12 -0
  218. package/vendor/boost/config/include/boost/config/abi/msvc_prefix.hpp +22 -0
  219. package/vendor/boost/config/include/boost/config/abi/msvc_suffix.hpp +8 -0
  220. package/vendor/boost/config/include/boost/config/abi_prefix.hpp +25 -0
  221. package/vendor/boost/config/include/boost/config/abi_suffix.hpp +25 -0
  222. package/vendor/boost/config/include/boost/config/assert_cxx03.hpp +211 -0
  223. package/vendor/boost/config/include/boost/config/assert_cxx11.hpp +212 -0
  224. package/vendor/boost/config/include/boost/config/assert_cxx14.hpp +47 -0
  225. package/vendor/boost/config/include/boost/config/assert_cxx17.hpp +65 -0
  226. package/vendor/boost/config/include/boost/config/assert_cxx20.hpp +59 -0
  227. package/vendor/boost/config/include/boost/config/assert_cxx23.hpp +41 -0
  228. package/vendor/boost/config/include/boost/config/assert_cxx98.hpp +23 -0
  229. package/vendor/boost/config/include/boost/config/auto_link.hpp +530 -0
  230. package/vendor/boost/config/include/boost/config/compiler/borland.hpp +342 -0
  231. package/vendor/boost/config/include/boost/config/compiler/clang.hpp +370 -0
  232. package/vendor/boost/config/include/boost/config/compiler/clang_version.hpp +98 -0
  233. package/vendor/boost/config/include/boost/config/compiler/codegear.hpp +389 -0
  234. package/vendor/boost/config/include/boost/config/compiler/comeau.hpp +59 -0
  235. package/vendor/boost/config/include/boost/config/compiler/common_edg.hpp +185 -0
  236. package/vendor/boost/config/include/boost/config/compiler/compaq_cxx.hpp +19 -0
  237. package/vendor/boost/config/include/boost/config/compiler/cray.hpp +446 -0
  238. package/vendor/boost/config/include/boost/config/compiler/diab.hpp +26 -0
  239. package/vendor/boost/config/include/boost/config/compiler/digitalmars.hpp +146 -0
  240. package/vendor/boost/config/include/boost/config/compiler/gcc.hpp +386 -0
  241. package/vendor/boost/config/include/boost/config/compiler/gcc_xml.hpp +115 -0
  242. package/vendor/boost/config/include/boost/config/compiler/greenhills.hpp +28 -0
  243. package/vendor/boost/config/include/boost/config/compiler/hp_acc.hpp +153 -0
  244. package/vendor/boost/config/include/boost/config/compiler/intel.hpp +577 -0
  245. package/vendor/boost/config/include/boost/config/compiler/kai.hpp +33 -0
  246. package/vendor/boost/config/include/boost/config/compiler/metrowerks.hpp +201 -0
  247. package/vendor/boost/config/include/boost/config/compiler/mpw.hpp +143 -0
  248. package/vendor/boost/config/include/boost/config/compiler/nvcc.hpp +64 -0
  249. package/vendor/boost/config/include/boost/config/compiler/pathscale.hpp +141 -0
  250. package/vendor/boost/config/include/boost/config/compiler/pgi.hpp +23 -0
  251. package/vendor/boost/config/include/boost/config/compiler/sgi_mipspro.hpp +29 -0
  252. package/vendor/boost/config/include/boost/config/compiler/sunpro_cc.hpp +225 -0
  253. package/vendor/boost/config/include/boost/config/compiler/vacpp.hpp +189 -0
  254. package/vendor/boost/config/include/boost/config/compiler/visualc.hpp +400 -0
  255. package/vendor/boost/config/include/boost/config/compiler/xlcpp.hpp +303 -0
  256. package/vendor/boost/config/include/boost/config/compiler/xlcpp_zos.hpp +174 -0
  257. package/vendor/boost/config/include/boost/config/detail/cxx_composite.hpp +218 -0
  258. package/vendor/boost/config/include/boost/config/detail/posix_features.hpp +95 -0
  259. package/vendor/boost/config/include/boost/config/detail/select_compiler_config.hpp +157 -0
  260. package/vendor/boost/config/include/boost/config/detail/select_platform_config.hpp +147 -0
  261. package/vendor/boost/config/include/boost/config/detail/select_stdlib_config.hpp +121 -0
  262. package/vendor/boost/config/include/boost/config/detail/suffix.hpp +1334 -0
  263. package/vendor/boost/config/include/boost/config/header_deprecated.hpp +26 -0
  264. package/vendor/boost/config/include/boost/config/helper_macros.hpp +37 -0
  265. package/vendor/boost/config/include/boost/config/no_tr1/cmath.hpp +28 -0
  266. package/vendor/boost/config/include/boost/config/no_tr1/complex.hpp +28 -0
  267. package/vendor/boost/config/include/boost/config/no_tr1/functional.hpp +28 -0
  268. package/vendor/boost/config/include/boost/config/no_tr1/memory.hpp +28 -0
  269. package/vendor/boost/config/include/boost/config/no_tr1/utility.hpp +28 -0
  270. package/vendor/boost/config/include/boost/config/platform/aix.hpp +33 -0
  271. package/vendor/boost/config/include/boost/config/platform/amigaos.hpp +15 -0
  272. package/vendor/boost/config/include/boost/config/platform/beos.hpp +26 -0
  273. package/vendor/boost/config/include/boost/config/platform/bsd.hpp +83 -0
  274. package/vendor/boost/config/include/boost/config/platform/cloudabi.hpp +18 -0
  275. package/vendor/boost/config/include/boost/config/platform/cray.hpp +18 -0
  276. package/vendor/boost/config/include/boost/config/platform/cygwin.hpp +71 -0
  277. package/vendor/boost/config/include/boost/config/platform/haiku.hpp +31 -0
  278. package/vendor/boost/config/include/boost/config/platform/hpux.hpp +87 -0
  279. package/vendor/boost/config/include/boost/config/platform/irix.hpp +31 -0
  280. package/vendor/boost/config/include/boost/config/platform/linux.hpp +106 -0
  281. package/vendor/boost/config/include/boost/config/platform/macos.hpp +87 -0
  282. package/vendor/boost/config/include/boost/config/platform/qnxnto.hpp +31 -0
  283. package/vendor/boost/config/include/boost/config/platform/solaris.hpp +31 -0
  284. package/vendor/boost/config/include/boost/config/platform/symbian.hpp +97 -0
  285. package/vendor/boost/config/include/boost/config/platform/vms.hpp +25 -0
  286. package/vendor/boost/config/include/boost/config/platform/vxworks.hpp +422 -0
  287. package/vendor/boost/config/include/boost/config/platform/wasm.hpp +23 -0
  288. package/vendor/boost/config/include/boost/config/platform/win32.hpp +90 -0
  289. package/vendor/boost/config/include/boost/config/platform/zos.hpp +32 -0
  290. package/vendor/boost/config/include/boost/config/pragma_message.hpp +31 -0
  291. package/vendor/boost/config/include/boost/config/requires_threads.hpp +92 -0
  292. package/vendor/boost/config/include/boost/config/stdlib/dinkumware.hpp +324 -0
  293. package/vendor/boost/config/include/boost/config/stdlib/libcomo.hpp +93 -0
  294. package/vendor/boost/config/include/boost/config/stdlib/libcpp.hpp +185 -0
  295. package/vendor/boost/config/include/boost/config/stdlib/libstdcpp3.hpp +482 -0
  296. package/vendor/boost/config/include/boost/config/stdlib/modena.hpp +79 -0
  297. package/vendor/boost/config/include/boost/config/stdlib/msl.hpp +98 -0
  298. package/vendor/boost/config/include/boost/config/stdlib/roguewave.hpp +208 -0
  299. package/vendor/boost/config/include/boost/config/stdlib/sgi.hpp +168 -0
  300. package/vendor/boost/config/include/boost/config/stdlib/stlport.hpp +258 -0
  301. package/vendor/boost/config/include/boost/config/stdlib/vacpp.hpp +74 -0
  302. package/vendor/boost/config/include/boost/config/stdlib/xlcpp_zos.hpp +61 -0
  303. package/vendor/boost/config/include/boost/config/user.hpp +133 -0
  304. package/vendor/boost/config/include/boost/config/warning_disable.hpp +47 -0
  305. package/vendor/boost/config/include/boost/config/workaround.hpp +310 -0
  306. package/vendor/boost/config/include/boost/config.hpp +67 -0
  307. package/vendor/boost/config/include/boost/cstdint.hpp +556 -0
  308. package/vendor/boost/config/include/boost/cxx11_char_types.hpp +70 -0
  309. package/vendor/boost/config/include/boost/detail/workaround.hpp +10 -0
  310. package/vendor/boost/config/include/boost/limits.hpp +146 -0
  311. package/vendor/boost/config/include/boost/static_assert.hpp +179 -0
  312. package/vendor/boost/config/include/boost/version.hpp +32 -0
  313. package/vendor/boost/math/LICENSE +23 -0
  314. package/vendor/boost/math/README.md +184 -0
  315. package/vendor/boost/math/include/boost/cstdfloat.hpp +58 -0
  316. package/vendor/boost/math/include/boost/math/bindings/detail/big_digamma.hpp +297 -0
  317. package/vendor/boost/math/include/boost/math/bindings/detail/big_lanczos.hpp +777 -0
  318. package/vendor/boost/math/include/boost/math/bindings/mpfr.hpp +974 -0
  319. package/vendor/boost/math/include/boost/math/bindings/mpreal.hpp +921 -0
  320. package/vendor/boost/math/include/boost/math/bindings/rr.hpp +876 -0
  321. package/vendor/boost/math/include/boost/math/ccmath/abs.hpp +89 -0
  322. package/vendor/boost/math/include/boost/math/ccmath/ccmath.hpp +45 -0
  323. package/vendor/boost/math/include/boost/math/ccmath/ceil.hpp +78 -0
  324. package/vendor/boost/math/include/boost/math/ccmath/copysign.hpp +81 -0
  325. package/vendor/boost/math/include/boost/math/ccmath/detail/config.hpp +52 -0
  326. package/vendor/boost/math/include/boost/math/ccmath/detail/swap.hpp +21 -0
  327. package/vendor/boost/math/include/boost/math/ccmath/div.hpp +86 -0
  328. package/vendor/boost/math/include/boost/math/ccmath/fabs.hpp +41 -0
  329. package/vendor/boost/math/include/boost/math/ccmath/fdim.hpp +93 -0
  330. package/vendor/boost/math/include/boost/math/ccmath/floor.hpp +131 -0
  331. package/vendor/boost/math/include/boost/math/ccmath/fma.hpp +130 -0
  332. package/vendor/boost/math/include/boost/math/ccmath/fmax.hpp +89 -0
  333. package/vendor/boost/math/include/boost/math/ccmath/fmin.hpp +89 -0
  334. package/vendor/boost/math/include/boost/math/ccmath/fmod.hpp +114 -0
  335. package/vendor/boost/math/include/boost/math/ccmath/fpclassify.hpp +48 -0
  336. package/vendor/boost/math/include/boost/math/ccmath/frexp.hpp +101 -0
  337. package/vendor/boost/math/include/boost/math/ccmath/hypot.hpp +116 -0
  338. package/vendor/boost/math/include/boost/math/ccmath/ilogb.hpp +60 -0
  339. package/vendor/boost/math/include/boost/math/ccmath/isfinite.hpp +53 -0
  340. package/vendor/boost/math/include/boost/math/ccmath/isgreater.hpp +42 -0
  341. package/vendor/boost/math/include/boost/math/ccmath/isgreaterequal.hpp +42 -0
  342. package/vendor/boost/math/include/boost/math/ccmath/isinf.hpp +61 -0
  343. package/vendor/boost/math/include/boost/math/ccmath/isless.hpp +42 -0
  344. package/vendor/boost/math/include/boost/math/ccmath/islessequal.hpp +42 -0
  345. package/vendor/boost/math/include/boost/math/ccmath/isnan.hpp +42 -0
  346. package/vendor/boost/math/include/boost/math/ccmath/isnormal.hpp +47 -0
  347. package/vendor/boost/math/include/boost/math/ccmath/isunordered.hpp +35 -0
  348. package/vendor/boost/math/include/boost/math/ccmath/ldexp.hpp +81 -0
  349. package/vendor/boost/math/include/boost/math/ccmath/logb.hpp +86 -0
  350. package/vendor/boost/math/include/boost/math/ccmath/modf.hpp +79 -0
  351. package/vendor/boost/math/include/boost/math/ccmath/next.hpp +458 -0
  352. package/vendor/boost/math/include/boost/math/ccmath/remainder.hpp +106 -0
  353. package/vendor/boost/math/include/boost/math/ccmath/round.hpp +179 -0
  354. package/vendor/boost/math/include/boost/math/ccmath/scalbln.hpp +60 -0
  355. package/vendor/boost/math/include/boost/math/ccmath/scalbn.hpp +81 -0
  356. package/vendor/boost/math/include/boost/math/ccmath/signbit.hpp +218 -0
  357. package/vendor/boost/math/include/boost/math/ccmath/sqrt.hpp +80 -0
  358. package/vendor/boost/math/include/boost/math/ccmath/trunc.hpp +70 -0
  359. package/vendor/boost/math/include/boost/math/common_factor.hpp +23 -0
  360. package/vendor/boost/math/include/boost/math/common_factor_ct.hpp +34 -0
  361. package/vendor/boost/math/include/boost/math/common_factor_rt.hpp +30 -0
  362. package/vendor/boost/math/include/boost/math/complex/acos.hpp +245 -0
  363. package/vendor/boost/math/include/boost/math/complex/acosh.hpp +34 -0
  364. package/vendor/boost/math/include/boost/math/complex/asin.hpp +252 -0
  365. package/vendor/boost/math/include/boost/math/complex/asinh.hpp +32 -0
  366. package/vendor/boost/math/include/boost/math/complex/atan.hpp +36 -0
  367. package/vendor/boost/math/include/boost/math/complex/atanh.hpp +214 -0
  368. package/vendor/boost/math/include/boost/math/complex/details.hpp +68 -0
  369. package/vendor/boost/math/include/boost/math/complex/fabs.hpp +23 -0
  370. package/vendor/boost/math/include/boost/math/complex.hpp +32 -0
  371. package/vendor/boost/math/include/boost/math/concepts/distributions.hpp +497 -0
  372. package/vendor/boost/math/include/boost/math/concepts/real_concept.hpp +400 -0
  373. package/vendor/boost/math/include/boost/math/concepts/real_type_concept.hpp +119 -0
  374. package/vendor/boost/math/include/boost/math/concepts/std_real_concept.hpp +427 -0
  375. package/vendor/boost/math/include/boost/math/constants/calculate_constants.hpp +1117 -0
  376. package/vendor/boost/math/include/boost/math/constants/constants.hpp +360 -0
  377. package/vendor/boost/math/include/boost/math/constants/info.hpp +169 -0
  378. package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_cmath.hpp +1012 -0
  379. package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_complex.hpp +38 -0
  380. package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_complex_std.hpp +813 -0
  381. package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_iostream.hpp +822 -0
  382. package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_limits.hpp +87 -0
  383. package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_types.hpp +441 -0
  384. package/vendor/boost/math/include/boost/math/differentiation/autodiff.hpp +2061 -0
  385. package/vendor/boost/math/include/boost/math/differentiation/autodiff_cpp11.hpp +387 -0
  386. package/vendor/boost/math/include/boost/math/differentiation/autodiff_reverse.hpp +811 -0
  387. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_basic_operator_expressions.hpp +276 -0
  388. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_basic_ops_et.hpp +160 -0
  389. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_basic_ops_no_et.hpp +154 -0
  390. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_comparison_operator_overloads.hpp +167 -0
  391. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_erf_overloads.hpp +234 -0
  392. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_expression_template_base.hpp +258 -0
  393. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_helper_functions.hpp +18 -0
  394. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_memory_management.hpp +462 -0
  395. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_stl_et.hpp +275 -0
  396. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_stl_expressions.hpp +852 -0
  397. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_stl_no_et.hpp +266 -0
  398. package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_utilities.hpp +51 -0
  399. package/vendor/boost/math/include/boost/math/differentiation/finite_difference.hpp +266 -0
  400. package/vendor/boost/math/include/boost/math/differentiation/lanczos_smoothing.hpp +591 -0
  401. package/vendor/boost/math/include/boost/math/distributions/arcsine.hpp +593 -0
  402. package/vendor/boost/math/include/boost/math/distributions/bernoulli.hpp +349 -0
  403. package/vendor/boost/math/include/boost/math/distributions/beta.hpp +584 -0
  404. package/vendor/boost/math/include/boost/math/distributions/binomial.hpp +729 -0
  405. package/vendor/boost/math/include/boost/math/distributions/cauchy.hpp +379 -0
  406. package/vendor/boost/math/include/boost/math/distributions/chi_squared.hpp +345 -0
  407. package/vendor/boost/math/include/boost/math/distributions/complement.hpp +198 -0
  408. package/vendor/boost/math/include/boost/math/distributions/detail/common_error_handling.hpp +228 -0
  409. package/vendor/boost/math/include/boost/math/distributions/detail/derived_accessors.hpp +190 -0
  410. package/vendor/boost/math/include/boost/math/distributions/detail/generic_mode.hpp +145 -0
  411. package/vendor/boost/math/include/boost/math/distributions/detail/generic_quantile.hpp +100 -0
  412. package/vendor/boost/math/include/boost/math/distributions/detail/hypergeometric_cdf.hpp +101 -0
  413. package/vendor/boost/math/include/boost/math/distributions/detail/hypergeometric_pdf.hpp +490 -0
  414. package/vendor/boost/math/include/boost/math/distributions/detail/hypergeometric_quantile.hpp +245 -0
  415. package/vendor/boost/math/include/boost/math/distributions/detail/inv_discrete_quantile.hpp +583 -0
  416. package/vendor/boost/math/include/boost/math/distributions/empirical_cumulative_distribution_function.hpp +73 -0
  417. package/vendor/boost/math/include/boost/math/distributions/exponential.hpp +352 -0
  418. package/vendor/boost/math/include/boost/math/distributions/extreme_value.hpp +388 -0
  419. package/vendor/boost/math/include/boost/math/distributions/find_location.hpp +141 -0
  420. package/vendor/boost/math/include/boost/math/distributions/find_scale.hpp +200 -0
  421. package/vendor/boost/math/include/boost/math/distributions/fisher_f.hpp +393 -0
  422. package/vendor/boost/math/include/boost/math/distributions/fwd.hpp +171 -0
  423. package/vendor/boost/math/include/boost/math/distributions/gamma.hpp +396 -0
  424. package/vendor/boost/math/include/boost/math/distributions/geometric.hpp +571 -0
  425. package/vendor/boost/math/include/boost/math/distributions/holtsmark.hpp +2518 -0
  426. package/vendor/boost/math/include/boost/math/distributions/hyperexponential.hpp +641 -0
  427. package/vendor/boost/math/include/boost/math/distributions/hypergeometric.hpp +313 -0
  428. package/vendor/boost/math/include/boost/math/distributions/inverse_chi_squared.hpp +398 -0
  429. package/vendor/boost/math/include/boost/math/distributions/inverse_gamma.hpp +504 -0
  430. package/vendor/boost/math/include/boost/math/distributions/inverse_gaussian.hpp +566 -0
  431. package/vendor/boost/math/include/boost/math/distributions/kolmogorov_smirnov.hpp +511 -0
  432. package/vendor/boost/math/include/boost/math/distributions/landau.hpp +4642 -0
  433. package/vendor/boost/math/include/boost/math/distributions/laplace.hpp +494 -0
  434. package/vendor/boost/math/include/boost/math/distributions/logistic.hpp +377 -0
  435. package/vendor/boost/math/include/boost/math/distributions/lognormal.hpp +361 -0
  436. package/vendor/boost/math/include/boost/math/distributions/mapairy.hpp +4220 -0
  437. package/vendor/boost/math/include/boost/math/distributions/negative_binomial.hpp +609 -0
  438. package/vendor/boost/math/include/boost/math/distributions/non_central_beta.hpp +981 -0
  439. package/vendor/boost/math/include/boost/math/distributions/non_central_chi_squared.hpp +998 -0
  440. package/vendor/boost/math/include/boost/math/distributions/non_central_f.hpp +712 -0
  441. package/vendor/boost/math/include/boost/math/distributions/non_central_t.hpp +1324 -0
  442. package/vendor/boost/math/include/boost/math/distributions/normal.hpp +368 -0
  443. package/vendor/boost/math/include/boost/math/distributions/pareto.hpp +508 -0
  444. package/vendor/boost/math/include/boost/math/distributions/poisson.hpp +563 -0
  445. package/vendor/boost/math/include/boost/math/distributions/rayleigh.hpp +381 -0
  446. package/vendor/boost/math/include/boost/math/distributions/saspoint5.hpp +2796 -0
  447. package/vendor/boost/math/include/boost/math/distributions/skew_normal.hpp +760 -0
  448. package/vendor/boost/math/include/boost/math/distributions/students_t.hpp +721 -0
  449. package/vendor/boost/math/include/boost/math/distributions/triangular.hpp +548 -0
  450. package/vendor/boost/math/include/boost/math/distributions/uniform.hpp +398 -0
  451. package/vendor/boost/math/include/boost/math/distributions/weibull.hpp +487 -0
  452. package/vendor/boost/math/include/boost/math/distributions.hpp +58 -0
  453. package/vendor/boost/math/include/boost/math/filters/daubechies.hpp +99 -0
  454. package/vendor/boost/math/include/boost/math/interpolators/barycentric_rational.hpp +99 -0
  455. package/vendor/boost/math/include/boost/math/interpolators/bezier_polynomial.hpp +60 -0
  456. package/vendor/boost/math/include/boost/math/interpolators/bilinear_uniform.hpp +54 -0
  457. package/vendor/boost/math/include/boost/math/interpolators/cardinal_cubic_b_spline.hpp +87 -0
  458. package/vendor/boost/math/include/boost/math/interpolators/cardinal_quadratic_b_spline.hpp +57 -0
  459. package/vendor/boost/math/include/boost/math/interpolators/cardinal_quintic_b_spline.hpp +62 -0
  460. package/vendor/boost/math/include/boost/math/interpolators/cardinal_trigonometric.hpp +58 -0
  461. package/vendor/boost/math/include/boost/math/interpolators/catmull_rom.hpp +310 -0
  462. package/vendor/boost/math/include/boost/math/interpolators/cubic_b_spline.hpp +90 -0
  463. package/vendor/boost/math/include/boost/math/interpolators/cubic_hermite.hpp +142 -0
  464. package/vendor/boost/math/include/boost/math/interpolators/detail/barycentric_rational_detail.hpp +215 -0
  465. package/vendor/boost/math/include/boost/math/interpolators/detail/bezier_polynomial_detail.hpp +167 -0
  466. package/vendor/boost/math/include/boost/math/interpolators/detail/bilinear_uniform_detail.hpp +137 -0
  467. package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_cubic_b_spline_detail.hpp +331 -0
  468. package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_quadratic_b_spline_detail.hpp +208 -0
  469. package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_quintic_b_spline_detail.hpp +241 -0
  470. package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_trigonometric_detail.hpp +684 -0
  471. package/vendor/boost/math/include/boost/math/interpolators/detail/cubic_b_spline_detail.hpp +330 -0
  472. package/vendor/boost/math/include/boost/math/interpolators/detail/cubic_hermite_detail.hpp +439 -0
  473. package/vendor/boost/math/include/boost/math/interpolators/detail/quintic_hermite_detail.hpp +586 -0
  474. package/vendor/boost/math/include/boost/math/interpolators/detail/septic_hermite_detail.hpp +653 -0
  475. package/vendor/boost/math/include/boost/math/interpolators/detail/vector_barycentric_rational_detail.hpp +196 -0
  476. package/vendor/boost/math/include/boost/math/interpolators/detail/whittaker_shannon_detail.hpp +128 -0
  477. package/vendor/boost/math/include/boost/math/interpolators/makima.hpp +178 -0
  478. package/vendor/boost/math/include/boost/math/interpolators/pchip.hpp +136 -0
  479. package/vendor/boost/math/include/boost/math/interpolators/quintic_hermite.hpp +143 -0
  480. package/vendor/boost/math/include/boost/math/interpolators/septic_hermite.hpp +147 -0
  481. package/vendor/boost/math/include/boost/math/interpolators/vector_barycentric_rational.hpp +82 -0
  482. package/vendor/boost/math/include/boost/math/interpolators/whittaker_shannon.hpp +47 -0
  483. package/vendor/boost/math/include/boost/math/octonion.hpp +4254 -0
  484. package/vendor/boost/math/include/boost/math/optimization/cma_es.hpp +392 -0
  485. package/vendor/boost/math/include/boost/math/optimization/detail/common.hpp +200 -0
  486. package/vendor/boost/math/include/boost/math/optimization/detail/differentiable_opt_utilties.hpp +157 -0
  487. package/vendor/boost/math/include/boost/math/optimization/detail/gradient_opt_base.hpp +92 -0
  488. package/vendor/boost/math/include/boost/math/optimization/detail/line_search_policies.hpp +206 -0
  489. package/vendor/boost/math/include/boost/math/optimization/detail/rdiff_optimization_policies.hpp +134 -0
  490. package/vendor/boost/math/include/boost/math/optimization/differential_evolution.hpp +236 -0
  491. package/vendor/boost/math/include/boost/math/optimization/gradient_descent.hpp +202 -0
  492. package/vendor/boost/math/include/boost/math/optimization/gradient_optimizers.hpp +18 -0
  493. package/vendor/boost/math/include/boost/math/optimization/jso.hpp +465 -0
  494. package/vendor/boost/math/include/boost/math/optimization/lbfgs.hpp +382 -0
  495. package/vendor/boost/math/include/boost/math/optimization/minimizer.hpp +336 -0
  496. package/vendor/boost/math/include/boost/math/optimization/nesterov.hpp +208 -0
  497. package/vendor/boost/math/include/boost/math/optimization/random_search.hpp +145 -0
  498. package/vendor/boost/math/include/boost/math/policies/error_handling.hpp +1062 -0
  499. package/vendor/boost/math/include/boost/math/policies/policy.hpp +1034 -0
  500. package/vendor/boost/math/include/boost/math/quadrature/detail/exp_sinh_detail.hpp +2002 -0
  501. package/vendor/boost/math/include/boost/math/quadrature/detail/ooura_fourier_integrals_detail.hpp +692 -0
  502. package/vendor/boost/math/include/boost/math/quadrature/detail/sinh_sinh_detail.hpp +1353 -0
  503. package/vendor/boost/math/include/boost/math/quadrature/detail/tanh_sinh_detail.hpp +879 -0
  504. package/vendor/boost/math/include/boost/math/quadrature/exp_sinh.hpp +180 -0
  505. package/vendor/boost/math/include/boost/math/quadrature/gauss.hpp +904 -0
  506. package/vendor/boost/math/include/boost/math/quadrature/gauss_kronrod.hpp +1317 -0
  507. package/vendor/boost/math/include/boost/math/quadrature/naive_monte_carlo.hpp +469 -0
  508. package/vendor/boost/math/include/boost/math/quadrature/ooura_fourier_integrals.hpp +68 -0
  509. package/vendor/boost/math/include/boost/math/quadrature/sinh_sinh.hpp +72 -0
  510. package/vendor/boost/math/include/boost/math/quadrature/tanh_sinh.hpp +289 -0
  511. package/vendor/boost/math/include/boost/math/quadrature/trapezoidal.hpp +125 -0
  512. package/vendor/boost/math/include/boost/math/quadrature/wavelet_transforms.hpp +47 -0
  513. package/vendor/boost/math/include/boost/math/quaternion.hpp +1190 -0
  514. package/vendor/boost/math/include/boost/math/special_functions/acosh.hpp +102 -0
  515. package/vendor/boost/math/include/boost/math/special_functions/airy.hpp +475 -0
  516. package/vendor/boost/math/include/boost/math/special_functions/asinh.hpp +110 -0
  517. package/vendor/boost/math/include/boost/math/special_functions/atanh.hpp +116 -0
  518. package/vendor/boost/math/include/boost/math/special_functions/bernoulli.hpp +149 -0
  519. package/vendor/boost/math/include/boost/math/special_functions/bessel.hpp +795 -0
  520. package/vendor/boost/math/include/boost/math/special_functions/bessel_iterators.hpp +187 -0
  521. package/vendor/boost/math/include/boost/math/special_functions/bessel_prime.hpp +343 -0
  522. package/vendor/boost/math/include/boost/math/special_functions/beta.hpp +1870 -0
  523. package/vendor/boost/math/include/boost/math/special_functions/binomial.hpp +87 -0
  524. package/vendor/boost/math/include/boost/math/special_functions/cardinal_b_spline.hpp +218 -0
  525. package/vendor/boost/math/include/boost/math/special_functions/cbrt.hpp +215 -0
  526. package/vendor/boost/math/include/boost/math/special_functions/chebyshev.hpp +314 -0
  527. package/vendor/boost/math/include/boost/math/special_functions/chebyshev_transform.hpp +237 -0
  528. package/vendor/boost/math/include/boost/math/special_functions/cos_pi.hpp +128 -0
  529. package/vendor/boost/math/include/boost/math/special_functions/daubechies_scaling.hpp +491 -0
  530. package/vendor/boost/math/include/boost/math/special_functions/daubechies_wavelet.hpp +266 -0
  531. package/vendor/boost/math/include/boost/math/special_functions/detail/airy_ai_bi_zero.hpp +222 -0
  532. package/vendor/boost/math/include/boost/math/special_functions/detail/bernoulli_details.hpp +629 -0
  533. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_derivatives_linear.hpp +107 -0
  534. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_i0.hpp +550 -0
  535. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_i1.hpp +556 -0
  536. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_ik.hpp +447 -0
  537. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_j0.hpp +192 -0
  538. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_j1.hpp +179 -0
  539. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jn.hpp +127 -0
  540. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy.hpp +603 -0
  541. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_asym.hpp +230 -0
  542. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_derivatives_asym.hpp +141 -0
  543. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_derivatives_series.hpp +219 -0
  544. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_series.hpp +267 -0
  545. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_zero.hpp +643 -0
  546. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_k0.hpp +485 -0
  547. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_k1.hpp +526 -0
  548. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_kn.hpp +91 -0
  549. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_y0.hpp +205 -0
  550. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_y1.hpp +183 -0
  551. package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_yn.hpp +113 -0
  552. package/vendor/boost/math/include/boost/math/special_functions/detail/daubechies_scaling_integer_grid.hpp +244 -0
  553. package/vendor/boost/math/include/boost/math/special_functions/detail/erf_inv.hpp +559 -0
  554. package/vendor/boost/math/include/boost/math/special_functions/detail/fp_traits.hpp +562 -0
  555. package/vendor/boost/math/include/boost/math/special_functions/detail/gamma_inva.hpp +241 -0
  556. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_0F1_bessel.hpp +46 -0
  557. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_addition_theorems_on_z.hpp +293 -0
  558. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_bessel.hpp +768 -0
  559. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_by_ratios.hpp +678 -0
  560. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_cf.hpp +50 -0
  561. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_large_a.hpp +35 -0
  562. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_large_abz.hpp +492 -0
  563. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_negative_b_regions.hpp +521 -0
  564. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_recurrence.hpp +522 -0
  565. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_scaled_series.hpp +60 -0
  566. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_small_a_negative_b_by_ratio.hpp +70 -0
  567. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_asym.hpp +179 -0
  568. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_cf.hpp +228 -0
  569. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_pFq_checked_series.hpp +687 -0
  570. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_pade.hpp +131 -0
  571. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_rational.hpp +167 -0
  572. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_separated_series.hpp +50 -0
  573. package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_series.hpp +434 -0
  574. package/vendor/boost/math/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp +331 -0
  575. package/vendor/boost/math/include/boost/math/special_functions/detail/ibeta_inverse.hpp +1122 -0
  576. package/vendor/boost/math/include/boost/math/special_functions/detail/iconv.hpp +43 -0
  577. package/vendor/boost/math/include/boost/math/special_functions/detail/igamma_inverse.hpp +587 -0
  578. package/vendor/boost/math/include/boost/math/special_functions/detail/igamma_large.hpp +823 -0
  579. package/vendor/boost/math/include/boost/math/special_functions/detail/lambert_w_lookup_table.ipp +162 -0
  580. package/vendor/boost/math/include/boost/math/special_functions/detail/lanczos_sse2.hpp +238 -0
  581. package/vendor/boost/math/include/boost/math/special_functions/detail/lgamma_small.hpp +569 -0
  582. package/vendor/boost/math/include/boost/math/special_functions/detail/polygamma.hpp +538 -0
  583. package/vendor/boost/math/include/boost/math/special_functions/detail/round_fwd.hpp +87 -0
  584. package/vendor/boost/math/include/boost/math/special_functions/detail/t_distribution_inv.hpp +567 -0
  585. package/vendor/boost/math/include/boost/math/special_functions/detail/unchecked_bernoulli.hpp +1305 -0
  586. package/vendor/boost/math/include/boost/math/special_functions/detail/unchecked_factorial.hpp +1727 -0
  587. package/vendor/boost/math/include/boost/math/special_functions/digamma.hpp +631 -0
  588. package/vendor/boost/math/include/boost/math/special_functions/ellint_1.hpp +815 -0
  589. package/vendor/boost/math/include/boost/math/special_functions/ellint_2.hpp +756 -0
  590. package/vendor/boost/math/include/boost/math/special_functions/ellint_3.hpp +374 -0
  591. package/vendor/boost/math/include/boost/math/special_functions/ellint_d.hpp +183 -0
  592. package/vendor/boost/math/include/boost/math/special_functions/ellint_rc.hpp +112 -0
  593. package/vendor/boost/math/include/boost/math/special_functions/ellint_rd.hpp +207 -0
  594. package/vendor/boost/math/include/boost/math/special_functions/ellint_rf.hpp +169 -0
  595. package/vendor/boost/math/include/boost/math/special_functions/ellint_rg.hpp +130 -0
  596. package/vendor/boost/math/include/boost/math/special_functions/ellint_rj.hpp +299 -0
  597. package/vendor/boost/math/include/boost/math/special_functions/erf.hpp +1334 -0
  598. package/vendor/boost/math/include/boost/math/special_functions/expint.hpp +1614 -0
  599. package/vendor/boost/math/include/boost/math/special_functions/expm1.hpp +416 -0
  600. package/vendor/boost/math/include/boost/math/special_functions/factorials.hpp +276 -0
  601. package/vendor/boost/math/include/boost/math/special_functions/fibonacci.hpp +92 -0
  602. package/vendor/boost/math/include/boost/math/special_functions/fourier_transform_daubechies.hpp +248 -0
  603. package/vendor/boost/math/include/boost/math/special_functions/fpclassify.hpp +797 -0
  604. package/vendor/boost/math/include/boost/math/special_functions/gamma.hpp +2628 -0
  605. package/vendor/boost/math/include/boost/math/special_functions/gegenbauer.hpp +84 -0
  606. package/vendor/boost/math/include/boost/math/special_functions/hankel.hpp +186 -0
  607. package/vendor/boost/math/include/boost/math/special_functions/hermite.hpp +79 -0
  608. package/vendor/boost/math/include/boost/math/special_functions/heuman_lambda.hpp +97 -0
  609. package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_0F1.hpp +116 -0
  610. package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_1F0.hpp +69 -0
  611. package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_1F1.hpp +822 -0
  612. package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_2F0.hpp +163 -0
  613. package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_pFq.hpp +205 -0
  614. package/vendor/boost/math/include/boost/math/special_functions/hypot.hpp +148 -0
  615. package/vendor/boost/math/include/boost/math/special_functions/jacobi.hpp +69 -0
  616. package/vendor/boost/math/include/boost/math/special_functions/jacobi_elliptic.hpp +319 -0
  617. package/vendor/boost/math/include/boost/math/special_functions/jacobi_theta.hpp +802 -0
  618. package/vendor/boost/math/include/boost/math/special_functions/jacobi_zeta.hpp +83 -0
  619. package/vendor/boost/math/include/boost/math/special_functions/laguerre.hpp +139 -0
  620. package/vendor/boost/math/include/boost/math/special_functions/lambert_w.hpp +2171 -0
  621. package/vendor/boost/math/include/boost/math/special_functions/lanczos.hpp +2760 -0
  622. package/vendor/boost/math/include/boost/math/special_functions/legendre.hpp +380 -0
  623. package/vendor/boost/math/include/boost/math/special_functions/legendre_stieltjes.hpp +234 -0
  624. package/vendor/boost/math/include/boost/math/special_functions/log1p.hpp +417 -0
  625. package/vendor/boost/math/include/boost/math/special_functions/logaddexp.hpp +41 -0
  626. package/vendor/boost/math/include/boost/math/special_functions/logistic_sigmoid.hpp +46 -0
  627. package/vendor/boost/math/include/boost/math/special_functions/logit.hpp +56 -0
  628. package/vendor/boost/math/include/boost/math/special_functions/logsumexp.hpp +60 -0
  629. package/vendor/boost/math/include/boost/math/special_functions/math_fwd.hpp +1927 -0
  630. package/vendor/boost/math/include/boost/math/special_functions/modf.hpp +74 -0
  631. package/vendor/boost/math/include/boost/math/special_functions/next.hpp +886 -0
  632. package/vendor/boost/math/include/boost/math/special_functions/nonfinite_num_facets.hpp +588 -0
  633. package/vendor/boost/math/include/boost/math/special_functions/owens_t.hpp +1067 -0
  634. package/vendor/boost/math/include/boost/math/special_functions/polygamma.hpp +83 -0
  635. package/vendor/boost/math/include/boost/math/special_functions/pow.hpp +144 -0
  636. package/vendor/boost/math/include/boost/math/special_functions/powm1.hpp +101 -0
  637. package/vendor/boost/math/include/boost/math/special_functions/prime.hpp +2433 -0
  638. package/vendor/boost/math/include/boost/math/special_functions/relative_difference.hpp +134 -0
  639. package/vendor/boost/math/include/boost/math/special_functions/round.hpp +353 -0
  640. package/vendor/boost/math/include/boost/math/special_functions/rsqrt.hpp +52 -0
  641. package/vendor/boost/math/include/boost/math/special_functions/sign.hpp +241 -0
  642. package/vendor/boost/math/include/boost/math/special_functions/sin_pi.hpp +135 -0
  643. package/vendor/boost/math/include/boost/math/special_functions/sinc.hpp +123 -0
  644. package/vendor/boost/math/include/boost/math/special_functions/sinhc.hpp +142 -0
  645. package/vendor/boost/math/include/boost/math/special_functions/spherical_harmonic.hpp +205 -0
  646. package/vendor/boost/math/include/boost/math/special_functions/sqrt1pm1.hpp +49 -0
  647. package/vendor/boost/math/include/boost/math/special_functions/trigamma.hpp +448 -0
  648. package/vendor/boost/math/include/boost/math/special_functions/trunc.hpp +385 -0
  649. package/vendor/boost/math/include/boost/math/special_functions/ulp.hpp +102 -0
  650. package/vendor/boost/math/include/boost/math/special_functions/zeta.hpp +1081 -0
  651. package/vendor/boost/math/include/boost/math/special_functions.hpp +86 -0
  652. package/vendor/boost/math/include/boost/math/statistics/anderson_darling.hpp +112 -0
  653. package/vendor/boost/math/include/boost/math/statistics/bivariate_statistics.hpp +470 -0
  654. package/vendor/boost/math/include/boost/math/statistics/chatterjee_correlation.hpp +159 -0
  655. package/vendor/boost/math/include/boost/math/statistics/detail/rank.hpp +140 -0
  656. package/vendor/boost/math/include/boost/math/statistics/detail/single_pass.hpp +401 -0
  657. package/vendor/boost/math/include/boost/math/statistics/linear_regression.hpp +133 -0
  658. package/vendor/boost/math/include/boost/math/statistics/ljung_box.hpp +70 -0
  659. package/vendor/boost/math/include/boost/math/statistics/runs_test.hpp +121 -0
  660. package/vendor/boost/math/include/boost/math/statistics/signal_statistics.hpp +350 -0
  661. package/vendor/boost/math/include/boost/math/statistics/t_test.hpp +275 -0
  662. package/vendor/boost/math/include/boost/math/statistics/univariate_statistics.hpp +1184 -0
  663. package/vendor/boost/math/include/boost/math/statistics/z_test.hpp +161 -0
  664. package/vendor/boost/math/include/boost/math/tools/agm.hpp +47 -0
  665. package/vendor/boost/math/include/boost/math/tools/array.hpp +41 -0
  666. package/vendor/boost/math/include/boost/math/tools/assert.hpp +49 -0
  667. package/vendor/boost/math/include/boost/math/tools/atomic.hpp +50 -0
  668. package/vendor/boost/math/include/boost/math/tools/big_constant.hpp +110 -0
  669. package/vendor/boost/math/include/boost/math/tools/bivariate_statistics.hpp +96 -0
  670. package/vendor/boost/math/include/boost/math/tools/centered_continued_fraction.hpp +173 -0
  671. package/vendor/boost/math/include/boost/math/tools/cohen_acceleration.hpp +51 -0
  672. package/vendor/boost/math/include/boost/math/tools/color_maps.hpp +1943 -0
  673. package/vendor/boost/math/include/boost/math/tools/complex.hpp +115 -0
  674. package/vendor/boost/math/include/boost/math/tools/concepts.hpp +24 -0
  675. package/vendor/boost/math/include/boost/math/tools/condition_numbers.hpp +144 -0
  676. package/vendor/boost/math/include/boost/math/tools/config.hpp +856 -0
  677. package/vendor/boost/math/include/boost/math/tools/convert_from_string.hpp +85 -0
  678. package/vendor/boost/math/include/boost/math/tools/cstdint.hpp +107 -0
  679. package/vendor/boost/math/include/boost/math/tools/cubic_roots.hpp +198 -0
  680. package/vendor/boost/math/include/boost/math/tools/cxx03_warn.hpp +95 -0
  681. package/vendor/boost/math/include/boost/math/tools/detail/is_const_iterable.hpp +38 -0
  682. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_10.hpp +84 -0
  683. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_11.hpp +90 -0
  684. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_12.hpp +96 -0
  685. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_13.hpp +102 -0
  686. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_14.hpp +108 -0
  687. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_15.hpp +114 -0
  688. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_16.hpp +120 -0
  689. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_17.hpp +126 -0
  690. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_18.hpp +132 -0
  691. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_19.hpp +138 -0
  692. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_2.hpp +36 -0
  693. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_20.hpp +144 -0
  694. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_3.hpp +42 -0
  695. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_4.hpp +48 -0
  696. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_5.hpp +54 -0
  697. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_6.hpp +60 -0
  698. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_7.hpp +66 -0
  699. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_8.hpp +72 -0
  700. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_9.hpp +78 -0
  701. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_10.hpp +90 -0
  702. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_11.hpp +97 -0
  703. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_12.hpp +104 -0
  704. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_13.hpp +111 -0
  705. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_14.hpp +118 -0
  706. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_15.hpp +125 -0
  707. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_16.hpp +132 -0
  708. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_17.hpp +139 -0
  709. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_18.hpp +146 -0
  710. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_19.hpp +153 -0
  711. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_2.hpp +48 -0
  712. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_20.hpp +160 -0
  713. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_3.hpp +48 -0
  714. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_4.hpp +48 -0
  715. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_5.hpp +55 -0
  716. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_6.hpp +62 -0
  717. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_7.hpp +69 -0
  718. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_8.hpp +76 -0
  719. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_9.hpp +83 -0
  720. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_10.hpp +156 -0
  721. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_11.hpp +181 -0
  722. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_12.hpp +208 -0
  723. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_13.hpp +237 -0
  724. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_14.hpp +268 -0
  725. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_15.hpp +301 -0
  726. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_16.hpp +336 -0
  727. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_17.hpp +373 -0
  728. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_18.hpp +412 -0
  729. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_19.hpp +453 -0
  730. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_2.hpp +48 -0
  731. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_20.hpp +496 -0
  732. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_3.hpp +48 -0
  733. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_4.hpp +48 -0
  734. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_5.hpp +61 -0
  735. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_6.hpp +76 -0
  736. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_7.hpp +93 -0
  737. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_8.hpp +112 -0
  738. package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_9.hpp +133 -0
  739. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_10.hpp +138 -0
  740. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_11.hpp +150 -0
  741. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_12.hpp +162 -0
  742. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_13.hpp +174 -0
  743. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_14.hpp +186 -0
  744. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_15.hpp +198 -0
  745. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_16.hpp +210 -0
  746. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_17.hpp +222 -0
  747. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_18.hpp +234 -0
  748. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_19.hpp +246 -0
  749. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_2.hpp +42 -0
  750. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_20.hpp +258 -0
  751. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_3.hpp +54 -0
  752. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_4.hpp +66 -0
  753. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_5.hpp +78 -0
  754. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_6.hpp +90 -0
  755. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_7.hpp +102 -0
  756. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_8.hpp +114 -0
  757. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_9.hpp +126 -0
  758. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_10.hpp +144 -0
  759. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_11.hpp +160 -0
  760. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_12.hpp +176 -0
  761. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_13.hpp +192 -0
  762. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_14.hpp +208 -0
  763. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_15.hpp +224 -0
  764. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_16.hpp +240 -0
  765. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_17.hpp +256 -0
  766. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_18.hpp +272 -0
  767. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_19.hpp +288 -0
  768. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_2.hpp +48 -0
  769. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_20.hpp +304 -0
  770. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_3.hpp +48 -0
  771. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_4.hpp +48 -0
  772. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_5.hpp +64 -0
  773. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_6.hpp +80 -0
  774. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_7.hpp +96 -0
  775. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_8.hpp +112 -0
  776. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_9.hpp +128 -0
  777. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_10.hpp +396 -0
  778. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_11.hpp +482 -0
  779. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_12.hpp +576 -0
  780. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_13.hpp +678 -0
  781. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_14.hpp +788 -0
  782. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_15.hpp +906 -0
  783. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_16.hpp +1032 -0
  784. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_17.hpp +1166 -0
  785. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_18.hpp +1308 -0
  786. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_19.hpp +1458 -0
  787. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_2.hpp +48 -0
  788. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_20.hpp +1616 -0
  789. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_3.hpp +48 -0
  790. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_4.hpp +48 -0
  791. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_5.hpp +86 -0
  792. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_6.hpp +132 -0
  793. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_7.hpp +186 -0
  794. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_8.hpp +248 -0
  795. package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_9.hpp +318 -0
  796. package/vendor/boost/math/include/boost/math/tools/engel_expansion.hpp +124 -0
  797. package/vendor/boost/math/include/boost/math/tools/estrin.hpp +72 -0
  798. package/vendor/boost/math/include/boost/math/tools/fraction.hpp +354 -0
  799. package/vendor/boost/math/include/boost/math/tools/header_deprecated.hpp +27 -0
  800. package/vendor/boost/math/include/boost/math/tools/is_constant_evaluated.hpp +51 -0
  801. package/vendor/boost/math/include/boost/math/tools/is_detected.hpp +56 -0
  802. package/vendor/boost/math/include/boost/math/tools/is_standalone.hpp +18 -0
  803. package/vendor/boost/math/include/boost/math/tools/luroth_expansion.hpp +147 -0
  804. package/vendor/boost/math/include/boost/math/tools/minima.hpp +164 -0
  805. package/vendor/boost/math/include/boost/math/tools/mp.hpp +423 -0
  806. package/vendor/boost/math/include/boost/math/tools/norms.hpp +638 -0
  807. package/vendor/boost/math/include/boost/math/tools/nothrow.hpp +27 -0
  808. package/vendor/boost/math/include/boost/math/tools/numeric_limits.hpp +888 -0
  809. package/vendor/boost/math/include/boost/math/tools/numerical_differentiation.hpp +12 -0
  810. package/vendor/boost/math/include/boost/math/tools/polynomial.hpp +862 -0
  811. package/vendor/boost/math/include/boost/math/tools/polynomial_gcd.hpp +268 -0
  812. package/vendor/boost/math/include/boost/math/tools/precision.hpp +418 -0
  813. package/vendor/boost/math/include/boost/math/tools/promotion.hpp +135 -0
  814. package/vendor/boost/math/include/boost/math/tools/quartic_roots.hpp +157 -0
  815. package/vendor/boost/math/include/boost/math/tools/random_vector.hpp +101 -0
  816. package/vendor/boost/math/include/boost/math/tools/rational.hpp +346 -0
  817. package/vendor/boost/math/include/boost/math/tools/real_cast.hpp +31 -0
  818. package/vendor/boost/math/include/boost/math/tools/recurrence.hpp +330 -0
  819. package/vendor/boost/math/include/boost/math/tools/roots.hpp +1072 -0
  820. package/vendor/boost/math/include/boost/math/tools/series.hpp +221 -0
  821. package/vendor/boost/math/include/boost/math/tools/signal_statistics.hpp +353 -0
  822. package/vendor/boost/math/include/boost/math/tools/simple_continued_fraction.hpp +177 -0
  823. package/vendor/boost/math/include/boost/math/tools/stats.hpp +87 -0
  824. package/vendor/boost/math/include/boost/math/tools/test_value.hpp +143 -0
  825. package/vendor/boost/math/include/boost/math/tools/throw_exception.hpp +43 -0
  826. package/vendor/boost/math/include/boost/math/tools/toms748_solve.hpp +636 -0
  827. package/vendor/boost/math/include/boost/math/tools/traits.hpp +140 -0
  828. package/vendor/boost/math/include/boost/math/tools/tuple.hpp +88 -0
  829. package/vendor/boost/math/include/boost/math/tools/type_traits.hpp +489 -0
  830. package/vendor/boost/math/include/boost/math/tools/ulps_plot.hpp +598 -0
  831. package/vendor/boost/math/include/boost/math/tools/univariate_statistics.hpp +437 -0
  832. package/vendor/boost/math/include/boost/math/tools/user.hpp +105 -0
  833. package/vendor/boost/math/include/boost/math/tools/utility.hpp +69 -0
  834. package/vendor/boost/math/include/boost/math/tools/workaround.hpp +42 -0
  835. package/vendor/boost/math/include/boost/math/tr1.hpp +1121 -0
  836. package/vendor/boost/math/include/boost/math/tr1_c_macros.ipp +810 -0
  837. package/vendor/boost/math/include/boost/math_fwd.hpp +42 -0
  838. package/vendor/boost/multiprecision/LICENSE +23 -0
  839. package/vendor/boost/multiprecision/README.md +168 -0
  840. package/vendor/boost/multiprecision/include/boost/config/abi/borland_prefix.hpp +27 -0
  841. package/vendor/boost/multiprecision/include/boost/config/abi/borland_suffix.hpp +12 -0
  842. package/vendor/boost/multiprecision/include/boost/config/abi/msvc_prefix.hpp +22 -0
  843. package/vendor/boost/multiprecision/include/boost/config/abi/msvc_suffix.hpp +8 -0
  844. package/vendor/boost/multiprecision/include/boost/config/abi_prefix.hpp +25 -0
  845. package/vendor/boost/multiprecision/include/boost/config/abi_suffix.hpp +25 -0
  846. package/vendor/boost/multiprecision/include/boost/config/assert_cxx03.hpp +211 -0
  847. package/vendor/boost/multiprecision/include/boost/config/assert_cxx11.hpp +212 -0
  848. package/vendor/boost/multiprecision/include/boost/config/assert_cxx14.hpp +47 -0
  849. package/vendor/boost/multiprecision/include/boost/config/assert_cxx17.hpp +65 -0
  850. package/vendor/boost/multiprecision/include/boost/config/assert_cxx20.hpp +59 -0
  851. package/vendor/boost/multiprecision/include/boost/config/assert_cxx23.hpp +41 -0
  852. package/vendor/boost/multiprecision/include/boost/config/assert_cxx98.hpp +23 -0
  853. package/vendor/boost/multiprecision/include/boost/config/auto_link.hpp +530 -0
  854. package/vendor/boost/multiprecision/include/boost/config/compiler/borland.hpp +342 -0
  855. package/vendor/boost/multiprecision/include/boost/config/compiler/clang.hpp +370 -0
  856. package/vendor/boost/multiprecision/include/boost/config/compiler/clang_version.hpp +98 -0
  857. package/vendor/boost/multiprecision/include/boost/config/compiler/codegear.hpp +389 -0
  858. package/vendor/boost/multiprecision/include/boost/config/compiler/comeau.hpp +59 -0
  859. package/vendor/boost/multiprecision/include/boost/config/compiler/common_edg.hpp +185 -0
  860. package/vendor/boost/multiprecision/include/boost/config/compiler/compaq_cxx.hpp +19 -0
  861. package/vendor/boost/multiprecision/include/boost/config/compiler/cray.hpp +446 -0
  862. package/vendor/boost/multiprecision/include/boost/config/compiler/diab.hpp +26 -0
  863. package/vendor/boost/multiprecision/include/boost/config/compiler/digitalmars.hpp +146 -0
  864. package/vendor/boost/multiprecision/include/boost/config/compiler/gcc.hpp +386 -0
  865. package/vendor/boost/multiprecision/include/boost/config/compiler/gcc_xml.hpp +115 -0
  866. package/vendor/boost/multiprecision/include/boost/config/compiler/greenhills.hpp +28 -0
  867. package/vendor/boost/multiprecision/include/boost/config/compiler/hp_acc.hpp +153 -0
  868. package/vendor/boost/multiprecision/include/boost/config/compiler/intel.hpp +577 -0
  869. package/vendor/boost/multiprecision/include/boost/config/compiler/kai.hpp +33 -0
  870. package/vendor/boost/multiprecision/include/boost/config/compiler/metrowerks.hpp +201 -0
  871. package/vendor/boost/multiprecision/include/boost/config/compiler/mpw.hpp +143 -0
  872. package/vendor/boost/multiprecision/include/boost/config/compiler/nvcc.hpp +64 -0
  873. package/vendor/boost/multiprecision/include/boost/config/compiler/pathscale.hpp +141 -0
  874. package/vendor/boost/multiprecision/include/boost/config/compiler/pgi.hpp +23 -0
  875. package/vendor/boost/multiprecision/include/boost/config/compiler/sgi_mipspro.hpp +29 -0
  876. package/vendor/boost/multiprecision/include/boost/config/compiler/sunpro_cc.hpp +225 -0
  877. package/vendor/boost/multiprecision/include/boost/config/compiler/vacpp.hpp +189 -0
  878. package/vendor/boost/multiprecision/include/boost/config/compiler/visualc.hpp +400 -0
  879. package/vendor/boost/multiprecision/include/boost/config/compiler/xlcpp.hpp +303 -0
  880. package/vendor/boost/multiprecision/include/boost/config/compiler/xlcpp_zos.hpp +174 -0
  881. package/vendor/boost/multiprecision/include/boost/config/detail/cxx_composite.hpp +218 -0
  882. package/vendor/boost/multiprecision/include/boost/config/detail/posix_features.hpp +95 -0
  883. package/vendor/boost/multiprecision/include/boost/config/detail/select_compiler_config.hpp +157 -0
  884. package/vendor/boost/multiprecision/include/boost/config/detail/select_platform_config.hpp +147 -0
  885. package/vendor/boost/multiprecision/include/boost/config/detail/select_stdlib_config.hpp +121 -0
  886. package/vendor/boost/multiprecision/include/boost/config/detail/suffix.hpp +1334 -0
  887. package/vendor/boost/multiprecision/include/boost/config/header_deprecated.hpp +26 -0
  888. package/vendor/boost/multiprecision/include/boost/config/helper_macros.hpp +37 -0
  889. package/vendor/boost/multiprecision/include/boost/config/no_tr1/cmath.hpp +28 -0
  890. package/vendor/boost/multiprecision/include/boost/config/no_tr1/complex.hpp +28 -0
  891. package/vendor/boost/multiprecision/include/boost/config/no_tr1/functional.hpp +28 -0
  892. package/vendor/boost/multiprecision/include/boost/config/no_tr1/memory.hpp +28 -0
  893. package/vendor/boost/multiprecision/include/boost/config/no_tr1/utility.hpp +28 -0
  894. package/vendor/boost/multiprecision/include/boost/config/platform/aix.hpp +33 -0
  895. package/vendor/boost/multiprecision/include/boost/config/platform/amigaos.hpp +15 -0
  896. package/vendor/boost/multiprecision/include/boost/config/platform/beos.hpp +26 -0
  897. package/vendor/boost/multiprecision/include/boost/config/platform/bsd.hpp +83 -0
  898. package/vendor/boost/multiprecision/include/boost/config/platform/cloudabi.hpp +18 -0
  899. package/vendor/boost/multiprecision/include/boost/config/platform/cray.hpp +18 -0
  900. package/vendor/boost/multiprecision/include/boost/config/platform/cygwin.hpp +71 -0
  901. package/vendor/boost/multiprecision/include/boost/config/platform/haiku.hpp +31 -0
  902. package/vendor/boost/multiprecision/include/boost/config/platform/hpux.hpp +87 -0
  903. package/vendor/boost/multiprecision/include/boost/config/platform/irix.hpp +31 -0
  904. package/vendor/boost/multiprecision/include/boost/config/platform/linux.hpp +106 -0
  905. package/vendor/boost/multiprecision/include/boost/config/platform/macos.hpp +87 -0
  906. package/vendor/boost/multiprecision/include/boost/config/platform/qnxnto.hpp +31 -0
  907. package/vendor/boost/multiprecision/include/boost/config/platform/solaris.hpp +31 -0
  908. package/vendor/boost/multiprecision/include/boost/config/platform/symbian.hpp +97 -0
  909. package/vendor/boost/multiprecision/include/boost/config/platform/vms.hpp +25 -0
  910. package/vendor/boost/multiprecision/include/boost/config/platform/vxworks.hpp +422 -0
  911. package/vendor/boost/multiprecision/include/boost/config/platform/wasm.hpp +23 -0
  912. package/vendor/boost/multiprecision/include/boost/config/platform/win32.hpp +90 -0
  913. package/vendor/boost/multiprecision/include/boost/config/platform/zos.hpp +32 -0
  914. package/vendor/boost/multiprecision/include/boost/config/pragma_message.hpp +31 -0
  915. package/vendor/boost/multiprecision/include/boost/config/requires_threads.hpp +92 -0
  916. package/vendor/boost/multiprecision/include/boost/config/stdlib/dinkumware.hpp +324 -0
  917. package/vendor/boost/multiprecision/include/boost/config/stdlib/libcomo.hpp +93 -0
  918. package/vendor/boost/multiprecision/include/boost/config/stdlib/libcpp.hpp +185 -0
  919. package/vendor/boost/multiprecision/include/boost/config/stdlib/libstdcpp3.hpp +482 -0
  920. package/vendor/boost/multiprecision/include/boost/config/stdlib/modena.hpp +79 -0
  921. package/vendor/boost/multiprecision/include/boost/config/stdlib/msl.hpp +98 -0
  922. package/vendor/boost/multiprecision/include/boost/config/stdlib/roguewave.hpp +208 -0
  923. package/vendor/boost/multiprecision/include/boost/config/stdlib/sgi.hpp +168 -0
  924. package/vendor/boost/multiprecision/include/boost/config/stdlib/stlport.hpp +258 -0
  925. package/vendor/boost/multiprecision/include/boost/config/stdlib/vacpp.hpp +74 -0
  926. package/vendor/boost/multiprecision/include/boost/config/stdlib/xlcpp_zos.hpp +61 -0
  927. package/vendor/boost/multiprecision/include/boost/config/user.hpp +133 -0
  928. package/vendor/boost/multiprecision/include/boost/config/warning_disable.hpp +47 -0
  929. package/vendor/boost/multiprecision/include/boost/config/workaround.hpp +310 -0
  930. package/vendor/boost/multiprecision/include/boost/config.hpp +67 -0
  931. package/vendor/boost/multiprecision/include/boost/cstdint.hpp +556 -0
  932. package/vendor/boost/multiprecision/include/boost/cxx11_char_types.hpp +70 -0
  933. package/vendor/boost/multiprecision/include/boost/detail/workaround.hpp +10 -0
  934. package/vendor/boost/multiprecision/include/boost/limits.hpp +146 -0
  935. package/vendor/boost/multiprecision/include/boost/multiprecision/complex128.hpp +24 -0
  936. package/vendor/boost/multiprecision/include/boost/multiprecision/complex_adaptor.hpp +1049 -0
  937. package/vendor/boost/multiprecision/include/boost/multiprecision/concepts/mp_number_archetypes.hpp +257 -0
  938. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_bin_float/io.hpp +700 -0
  939. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_bin_float/transcendental.hpp +157 -0
  940. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_bin_float.hpp +2374 -0
  941. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_complex.hpp +12 -0
  942. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_dec_float.hpp +3807 -0
  943. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail.hpp +177 -0
  944. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath.hpp +25 -0
  945. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_fabs.hpp +27 -0
  946. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_floor.hpp +116 -0
  947. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_fma.hpp +65 -0
  948. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_fpclassify.hpp +52 -0
  949. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_frexp.hpp +93 -0
  950. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_isinf.hpp +24 -0
  951. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_isnan.hpp +21 -0
  952. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_ldexp.hpp +71 -0
  953. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_limits.hpp +218 -0
  954. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_log.hpp +172 -0
  955. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_sqrt.hpp +57 -0
  956. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_constants.hpp +80 -0
  957. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_double_fp.hpp +2690 -0
  958. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/add.hpp +368 -0
  959. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/add_unsigned.hpp +387 -0
  960. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/bitwise.hpp +896 -0
  961. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/checked.hpp +178 -0
  962. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/comparison.hpp +374 -0
  963. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/cpp_int_config.hpp +161 -0
  964. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/divide.hpp +703 -0
  965. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/import_export.hpp +248 -0
  966. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp +138 -0
  967. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/limits.hpp +292 -0
  968. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/literals.hpp +296 -0
  969. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/misc.hpp +1462 -0
  970. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/multiply.hpp +848 -0
  971. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/serialize.hpp +209 -0
  972. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/value_pack.hpp +42 -0
  973. package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int.hpp +2360 -0
  974. package/vendor/boost/multiprecision/include/boost/multiprecision/debug_adaptor.hpp +760 -0
  975. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/assert.hpp +29 -0
  976. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/atomic.hpp +62 -0
  977. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/bitscan.hpp +317 -0
  978. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/check_cpp11_config.hpp +64 -0
  979. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/constexpr.hpp +88 -0
  980. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/default_ops.hpp +4077 -0
  981. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/digits.hpp +49 -0
  982. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/dynamic_array.hpp +44 -0
  983. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/empty_value.hpp +87 -0
  984. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/endian.hpp +35 -0
  985. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/et_ops.hpp +1831 -0
  986. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/float128_functions.hpp +95 -0
  987. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/float_string_cvt.hpp +333 -0
  988. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/fpclassify.hpp +101 -0
  989. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/constants.hpp +289 -0
  990. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/pow.hpp +941 -0
  991. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/trig.hpp +1064 -0
  992. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/trunc.hpp +82 -0
  993. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/generic_interconvert.hpp +687 -0
  994. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/hash.hpp +56 -0
  995. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/integer_ops.hpp +474 -0
  996. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/itos.hpp +39 -0
  997. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/min_max.hpp +106 -0
  998. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/no_et_ops.hpp +661 -0
  999. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/no_exceptions_support.hpp +55 -0
  1000. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/number_base.hpp +1656 -0
  1001. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/number_compare.hpp +848 -0
  1002. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/precision.hpp +313 -0
  1003. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/rebind.hpp +19 -0
  1004. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/standalone_config.hpp +165 -0
  1005. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/static_array.hpp +42 -0
  1006. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/string_helpers.hpp +48 -0
  1007. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/tables.hpp +80 -0
  1008. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/ublas_interop.hpp +75 -0
  1009. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/uniform_int_distribution.hpp +212 -0
  1010. package/vendor/boost/multiprecision/include/boost/multiprecision/detail/utype_helper.hpp +374 -0
  1011. package/vendor/boost/multiprecision/include/boost/multiprecision/eigen.hpp +248 -0
  1012. package/vendor/boost/multiprecision/include/boost/multiprecision/float128.hpp +960 -0
  1013. package/vendor/boost/multiprecision/include/boost/multiprecision/fwd.hpp +268 -0
  1014. package/vendor/boost/multiprecision/include/boost/multiprecision/gmp.hpp +4100 -0
  1015. package/vendor/boost/multiprecision/include/boost/multiprecision/integer.hpp +363 -0
  1016. package/vendor/boost/multiprecision/include/boost/multiprecision/logged_adaptor.hpp +834 -0
  1017. package/vendor/boost/multiprecision/include/boost/multiprecision/miller_rabin.hpp +221 -0
  1018. package/vendor/boost/multiprecision/include/boost/multiprecision/mpc.hpp +1721 -0
  1019. package/vendor/boost/multiprecision/include/boost/multiprecision/mpfi.hpp +2579 -0
  1020. package/vendor/boost/multiprecision/include/boost/multiprecision/mpfr.hpp +3668 -0
  1021. package/vendor/boost/multiprecision/include/boost/multiprecision/number.hpp +2491 -0
  1022. package/vendor/boost/multiprecision/include/boost/multiprecision/random.hpp +23 -0
  1023. package/vendor/boost/multiprecision/include/boost/multiprecision/rational_adaptor.hpp +1289 -0
  1024. package/vendor/boost/multiprecision/include/boost/multiprecision/tommath.hpp +1044 -0
  1025. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/explicit_conversion.hpp +67 -0
  1026. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/extract_exponent_type.hpp +28 -0
  1027. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_backend.hpp +91 -0
  1028. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_byte_container.hpp +51 -0
  1029. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_complex.hpp +22 -0
  1030. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_convertible_arithmetic.hpp +51 -0
  1031. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_restricted_conversion.hpp +47 -0
  1032. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_variable_precision.hpp +25 -0
  1033. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/max_digits10.hpp +79 -0
  1034. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/std_integer_traits.hpp +95 -0
  1035. package/vendor/boost/multiprecision/include/boost/multiprecision/traits/transcendental_reduction_type.hpp +21 -0
  1036. package/vendor/boost/multiprecision/include/boost/static_assert.hpp +179 -0
  1037. package/vendor/boost/multiprecision/include/boost/version.hpp +32 -0
  1038. package/vendor/eigen/COPYING.APACHE +203 -0
  1039. package/vendor/eigen/COPYING.BSD +26 -0
  1040. package/vendor/eigen/COPYING.MPL2 +373 -0
  1041. package/vendor/eigen/COPYING.README +6 -0
  1042. package/vendor/eigen/Eigen/AccelerateSupport +52 -0
  1043. package/vendor/eigen/Eigen/Cholesky +43 -0
  1044. package/vendor/eigen/Eigen/CholmodSupport +48 -0
  1045. package/vendor/eigen/Eigen/Core +451 -0
  1046. package/vendor/eigen/Eigen/Dense +7 -0
  1047. package/vendor/eigen/Eigen/Eigen +2 -0
  1048. package/vendor/eigen/Eigen/Eigenvalues +63 -0
  1049. package/vendor/eigen/Eigen/Geometry +59 -0
  1050. package/vendor/eigen/Eigen/Householder +31 -0
  1051. package/vendor/eigen/Eigen/IterativeLinearSolvers +52 -0
  1052. package/vendor/eigen/Eigen/Jacobi +33 -0
  1053. package/vendor/eigen/Eigen/KLUSupport +43 -0
  1054. package/vendor/eigen/Eigen/LU +46 -0
  1055. package/vendor/eigen/Eigen/MetisSupport +35 -0
  1056. package/vendor/eigen/Eigen/OrderingMethods +73 -0
  1057. package/vendor/eigen/Eigen/PaStiXSupport +51 -0
  1058. package/vendor/eigen/Eigen/PardisoSupport +38 -0
  1059. package/vendor/eigen/Eigen/QR +48 -0
  1060. package/vendor/eigen/Eigen/QtAlignedMalloc +32 -0
  1061. package/vendor/eigen/Eigen/SPQRSupport +41 -0
  1062. package/vendor/eigen/Eigen/SVD +56 -0
  1063. package/vendor/eigen/Eigen/Sparse +33 -0
  1064. package/vendor/eigen/Eigen/SparseCholesky +40 -0
  1065. package/vendor/eigen/Eigen/SparseCore +70 -0
  1066. package/vendor/eigen/Eigen/SparseLU +50 -0
  1067. package/vendor/eigen/Eigen/SparseQR +38 -0
  1068. package/vendor/eigen/Eigen/StdDeque +30 -0
  1069. package/vendor/eigen/Eigen/StdList +29 -0
  1070. package/vendor/eigen/Eigen/StdVector +30 -0
  1071. package/vendor/eigen/Eigen/SuperLUSupport +70 -0
  1072. package/vendor/eigen/Eigen/ThreadPool +80 -0
  1073. package/vendor/eigen/Eigen/UmfPackSupport +42 -0
  1074. package/vendor/eigen/Eigen/Version +14 -0
  1075. package/vendor/eigen/Eigen/src/AccelerateSupport/AccelerateSupport.h +423 -0
  1076. package/vendor/eigen/Eigen/src/AccelerateSupport/InternalHeaderCheck.h +3 -0
  1077. package/vendor/eigen/Eigen/src/Cholesky/InternalHeaderCheck.h +3 -0
  1078. package/vendor/eigen/Eigen/src/Cholesky/LDLT.h +649 -0
  1079. package/vendor/eigen/Eigen/src/Cholesky/LLT.h +514 -0
  1080. package/vendor/eigen/Eigen/src/Cholesky/LLT_LAPACKE.h +124 -0
  1081. package/vendor/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +738 -0
  1082. package/vendor/eigen/Eigen/src/CholmodSupport/InternalHeaderCheck.h +3 -0
  1083. package/vendor/eigen/Eigen/src/Core/ArithmeticSequence.h +239 -0
  1084. package/vendor/eigen/Eigen/src/Core/Array.h +376 -0
  1085. package/vendor/eigen/Eigen/src/Core/ArrayBase.h +213 -0
  1086. package/vendor/eigen/Eigen/src/Core/ArrayWrapper.h +165 -0
  1087. package/vendor/eigen/Eigen/src/Core/Assign.h +80 -0
  1088. package/vendor/eigen/Eigen/src/Core/AssignEvaluator.h +1057 -0
  1089. package/vendor/eigen/Eigen/src/Core/Assign_MKL.h +183 -0
  1090. package/vendor/eigen/Eigen/src/Core/BandMatrix.h +338 -0
  1091. package/vendor/eigen/Eigen/src/Core/Block.h +429 -0
  1092. package/vendor/eigen/Eigen/src/Core/CommaInitializer.h +149 -0
  1093. package/vendor/eigen/Eigen/src/Core/ConditionEstimator.h +173 -0
  1094. package/vendor/eigen/Eigen/src/Core/CoreEvaluators.h +2018 -0
  1095. package/vendor/eigen/Eigen/src/Core/CoreIterators.h +141 -0
  1096. package/vendor/eigen/Eigen/src/Core/CwiseBinaryOp.h +166 -0
  1097. package/vendor/eigen/Eigen/src/Core/CwiseNullaryOp.h +975 -0
  1098. package/vendor/eigen/Eigen/src/Core/CwiseTernaryOp.h +171 -0
  1099. package/vendor/eigen/Eigen/src/Core/CwiseUnaryOp.h +91 -0
  1100. package/vendor/eigen/Eigen/src/Core/CwiseUnaryView.h +167 -0
  1101. package/vendor/eigen/Eigen/src/Core/DenseBase.h +673 -0
  1102. package/vendor/eigen/Eigen/src/Core/DenseCoeffsBase.h +568 -0
  1103. package/vendor/eigen/Eigen/src/Core/DenseStorage.h +573 -0
  1104. package/vendor/eigen/Eigen/src/Core/DeviceWrapper.h +153 -0
  1105. package/vendor/eigen/Eigen/src/Core/Diagonal.h +219 -0
  1106. package/vendor/eigen/Eigen/src/Core/DiagonalMatrix.h +420 -0
  1107. package/vendor/eigen/Eigen/src/Core/DiagonalProduct.h +30 -0
  1108. package/vendor/eigen/Eigen/src/Core/Dot.h +268 -0
  1109. package/vendor/eigen/Eigen/src/Core/EigenBase.h +149 -0
  1110. package/vendor/eigen/Eigen/src/Core/Fill.h +138 -0
  1111. package/vendor/eigen/Eigen/src/Core/FindCoeff.h +464 -0
  1112. package/vendor/eigen/Eigen/src/Core/ForceAlignedAccess.h +127 -0
  1113. package/vendor/eigen/Eigen/src/Core/Fuzzy.h +132 -0
  1114. package/vendor/eigen/Eigen/src/Core/GeneralProduct.h +519 -0
  1115. package/vendor/eigen/Eigen/src/Core/GenericPacketMath.h +1702 -0
  1116. package/vendor/eigen/Eigen/src/Core/GlobalFunctions.h +230 -0
  1117. package/vendor/eigen/Eigen/src/Core/IO.h +233 -0
  1118. package/vendor/eigen/Eigen/src/Core/IndexedView.h +321 -0
  1119. package/vendor/eigen/Eigen/src/Core/InnerProduct.h +260 -0
  1120. package/vendor/eigen/Eigen/src/Core/InternalHeaderCheck.h +3 -0
  1121. package/vendor/eigen/Eigen/src/Core/Inverse.h +108 -0
  1122. package/vendor/eigen/Eigen/src/Core/Map.h +153 -0
  1123. package/vendor/eigen/Eigen/src/Core/MapBase.h +283 -0
  1124. package/vendor/eigen/Eigen/src/Core/MathFunctions.h +2103 -0
  1125. package/vendor/eigen/Eigen/src/Core/MathFunctionsImpl.h +263 -0
  1126. package/vendor/eigen/Eigen/src/Core/Matrix.h +534 -0
  1127. package/vendor/eigen/Eigen/src/Core/MatrixBase.h +545 -0
  1128. package/vendor/eigen/Eigen/src/Core/NestByValue.h +91 -0
  1129. package/vendor/eigen/Eigen/src/Core/NoAlias.h +102 -0
  1130. package/vendor/eigen/Eigen/src/Core/NumTraits.h +335 -0
  1131. package/vendor/eigen/Eigen/src/Core/PartialReduxEvaluator.h +253 -0
  1132. package/vendor/eigen/Eigen/src/Core/PermutationMatrix.h +555 -0
  1133. package/vendor/eigen/Eigen/src/Core/PlainObjectBase.h +1014 -0
  1134. package/vendor/eigen/Eigen/src/Core/Product.h +307 -0
  1135. package/vendor/eigen/Eigen/src/Core/ProductEvaluators.h +1287 -0
  1136. package/vendor/eigen/Eigen/src/Core/Random.h +207 -0
  1137. package/vendor/eigen/Eigen/src/Core/RandomImpl.h +262 -0
  1138. package/vendor/eigen/Eigen/src/Core/RealView.h +250 -0
  1139. package/vendor/eigen/Eigen/src/Core/Redux.h +535 -0
  1140. package/vendor/eigen/Eigen/src/Core/Ref.h +383 -0
  1141. package/vendor/eigen/Eigen/src/Core/Replicate.h +130 -0
  1142. package/vendor/eigen/Eigen/src/Core/Reshaped.h +398 -0
  1143. package/vendor/eigen/Eigen/src/Core/ReturnByValue.h +111 -0
  1144. package/vendor/eigen/Eigen/src/Core/Reverse.h +202 -0
  1145. package/vendor/eigen/Eigen/src/Core/Select.h +92 -0
  1146. package/vendor/eigen/Eigen/src/Core/SelfAdjointView.h +329 -0
  1147. package/vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h +50 -0
  1148. package/vendor/eigen/Eigen/src/Core/SkewSymmetricMatrix3.h +382 -0
  1149. package/vendor/eigen/Eigen/src/Core/Solve.h +174 -0
  1150. package/vendor/eigen/Eigen/src/Core/SolveTriangular.h +237 -0
  1151. package/vendor/eigen/Eigen/src/Core/SolverBase.h +167 -0
  1152. package/vendor/eigen/Eigen/src/Core/StableNorm.h +217 -0
  1153. package/vendor/eigen/Eigen/src/Core/StlIterators.h +619 -0
  1154. package/vendor/eigen/Eigen/src/Core/Stride.h +114 -0
  1155. package/vendor/eigen/Eigen/src/Core/Swap.h +99 -0
  1156. package/vendor/eigen/Eigen/src/Core/Transpose.h +427 -0
  1157. package/vendor/eigen/Eigen/src/Core/Transpositions.h +323 -0
  1158. package/vendor/eigen/Eigen/src/Core/TriangularMatrix.h +900 -0
  1159. package/vendor/eigen/Eigen/src/Core/VectorBlock.h +83 -0
  1160. package/vendor/eigen/Eigen/src/Core/VectorwiseOp.h +733 -0
  1161. package/vendor/eigen/Eigen/src/Core/Visitor.h +537 -0
  1162. package/vendor/eigen/Eigen/src/Core/arch/AVX/Complex.h +565 -0
  1163. package/vendor/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +130 -0
  1164. package/vendor/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +3081 -0
  1165. package/vendor/eigen/Eigen/src/Core/arch/AVX/Reductions.h +353 -0
  1166. package/vendor/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +308 -0
  1167. package/vendor/eigen/Eigen/src/Core/arch/AVX512/Complex.h +472 -0
  1168. package/vendor/eigen/Eigen/src/Core/arch/AVX512/GemmKernel.h +1245 -0
  1169. package/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +141 -0
  1170. package/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctionsFP16.h +75 -0
  1171. package/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +3146 -0
  1172. package/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMathFP16.h +1413 -0
  1173. package/vendor/eigen/Eigen/src/Core/arch/AVX512/Reductions.h +297 -0
  1174. package/vendor/eigen/Eigen/src/Core/arch/AVX512/TrsmKernel.h +1167 -0
  1175. package/vendor/eigen/Eigen/src/Core/arch/AVX512/TrsmUnrolls.inc +1219 -0
  1176. package/vendor/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +277 -0
  1177. package/vendor/eigen/Eigen/src/Core/arch/AVX512/TypeCastingFP16.h +130 -0
  1178. package/vendor/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +653 -0
  1179. package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +81 -0
  1180. package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +3686 -0
  1181. package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +205 -0
  1182. package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +901 -0
  1183. package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMAbfloat16.h +742 -0
  1184. package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.inc +2818 -0
  1185. package/vendor/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +3729 -0
  1186. package/vendor/eigen/Eigen/src/Core/arch/AltiVec/TypeCasting.h +153 -0
  1187. package/vendor/eigen/Eigen/src/Core/arch/Default/BFloat16.h +866 -0
  1188. package/vendor/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +128 -0
  1189. package/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +2634 -0
  1190. package/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +227 -0
  1191. package/vendor/eigen/Eigen/src/Core/arch/Default/Half.h +1091 -0
  1192. package/vendor/eigen/Eigen/src/Core/arch/Default/Settings.h +47 -0
  1193. package/vendor/eigen/Eigen/src/Core/arch/GPU/Complex.h +244 -0
  1194. package/vendor/eigen/Eigen/src/Core/arch/GPU/MathFunctions.h +104 -0
  1195. package/vendor/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +1712 -0
  1196. package/vendor/eigen/Eigen/src/Core/arch/GPU/Tuple.h +268 -0
  1197. package/vendor/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +77 -0
  1198. package/vendor/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
  1199. package/vendor/eigen/Eigen/src/Core/arch/HVX/PacketMath.h +1088 -0
  1200. package/vendor/eigen/Eigen/src/Core/arch/LSX/Complex.h +520 -0
  1201. package/vendor/eigen/Eigen/src/Core/arch/LSX/GeneralBlockPanelKernel.h +23 -0
  1202. package/vendor/eigen/Eigen/src/Core/arch/LSX/MathFunctions.h +43 -0
  1203. package/vendor/eigen/Eigen/src/Core/arch/LSX/PacketMath.h +2866 -0
  1204. package/vendor/eigen/Eigen/src/Core/arch/LSX/TypeCasting.h +526 -0
  1205. package/vendor/eigen/Eigen/src/Core/arch/MSA/Complex.h +620 -0
  1206. package/vendor/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +379 -0
  1207. package/vendor/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +1237 -0
  1208. package/vendor/eigen/Eigen/src/Core/arch/NEON/Complex.h +732 -0
  1209. package/vendor/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +243 -0
  1210. package/vendor/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +68 -0
  1211. package/vendor/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +6096 -0
  1212. package/vendor/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +1642 -0
  1213. package/vendor/eigen/Eigen/src/Core/arch/NEON/UnaryFunctors.h +57 -0
  1214. package/vendor/eigen/Eigen/src/Core/arch/SSE/Complex.h +503 -0
  1215. package/vendor/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +88 -0
  1216. package/vendor/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +2384 -0
  1217. package/vendor/eigen/Eigen/src/Core/arch/SSE/Reductions.h +324 -0
  1218. package/vendor/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +230 -0
  1219. package/vendor/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +48 -0
  1220. package/vendor/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +674 -0
  1221. package/vendor/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +52 -0
  1222. package/vendor/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +227 -0
  1223. package/vendor/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +303 -0
  1224. package/vendor/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +576 -0
  1225. package/vendor/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +83 -0
  1226. package/vendor/eigen/Eigen/src/Core/arch/ZVector/Complex.h +570 -0
  1227. package/vendor/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +244 -0
  1228. package/vendor/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +1413 -0
  1229. package/vendor/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +174 -0
  1230. package/vendor/eigen/Eigen/src/Core/functors/BinaryFunctors.h +747 -0
  1231. package/vendor/eigen/Eigen/src/Core/functors/NullaryFunctors.h +274 -0
  1232. package/vendor/eigen/Eigen/src/Core/functors/StlFunctors.h +149 -0
  1233. package/vendor/eigen/Eigen/src/Core/functors/TernaryFunctors.h +52 -0
  1234. package/vendor/eigen/Eigen/src/Core/functors/UnaryFunctors.h +1420 -0
  1235. package/vendor/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +3153 -0
  1236. package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +459 -0
  1237. package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +330 -0
  1238. package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +148 -0
  1239. package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +205 -0
  1240. package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +473 -0
  1241. package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +139 -0
  1242. package/vendor/eigen/Eigen/src/Core/products/Parallelizer.h +282 -0
  1243. package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +483 -0
  1244. package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +277 -0
  1245. package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +253 -0
  1246. package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +115 -0
  1247. package/vendor/eigen/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
  1248. package/vendor/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +95 -0
  1249. package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +397 -0
  1250. package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +325 -0
  1251. package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixVector.h +347 -0
  1252. package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +275 -0
  1253. package/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +388 -0
  1254. package/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +166 -0
  1255. package/vendor/eigen/Eigen/src/Core/products/TriangularSolverVector.h +122 -0
  1256. package/vendor/eigen/Eigen/src/Core/util/Assert.h +158 -0
  1257. package/vendor/eigen/Eigen/src/Core/util/BlasUtil.h +622 -0
  1258. package/vendor/eigen/Eigen/src/Core/util/ConfigureVectorization.h +543 -0
  1259. package/vendor/eigen/Eigen/src/Core/util/Constants.h +598 -0
  1260. package/vendor/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +146 -0
  1261. package/vendor/eigen/Eigen/src/Core/util/EmulateArray.h +270 -0
  1262. package/vendor/eigen/Eigen/src/Core/util/ForwardDeclarations.h +524 -0
  1263. package/vendor/eigen/Eigen/src/Core/util/GpuHipCudaDefines.inc +101 -0
  1264. package/vendor/eigen/Eigen/src/Core/util/GpuHipCudaUndefines.inc +45 -0
  1265. package/vendor/eigen/Eigen/src/Core/util/IndexedViewHelper.h +487 -0
  1266. package/vendor/eigen/Eigen/src/Core/util/IntegralConstant.h +279 -0
  1267. package/vendor/eigen/Eigen/src/Core/util/MKL_support.h +139 -0
  1268. package/vendor/eigen/Eigen/src/Core/util/Macros.h +1346 -0
  1269. package/vendor/eigen/Eigen/src/Core/util/MaxSizeVector.h +139 -0
  1270. package/vendor/eigen/Eigen/src/Core/util/Memory.h +1385 -0
  1271. package/vendor/eigen/Eigen/src/Core/util/Meta.h +760 -0
  1272. package/vendor/eigen/Eigen/src/Core/util/MoreMeta.h +638 -0
  1273. package/vendor/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +44 -0
  1274. package/vendor/eigen/Eigen/src/Core/util/ReshapedHelper.h +51 -0
  1275. package/vendor/eigen/Eigen/src/Core/util/Serializer.h +209 -0
  1276. package/vendor/eigen/Eigen/src/Core/util/StaticAssert.h +105 -0
  1277. package/vendor/eigen/Eigen/src/Core/util/SymbolicIndex.h +445 -0
  1278. package/vendor/eigen/Eigen/src/Core/util/XprHelper.h +1093 -0
  1279. package/vendor/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +315 -0
  1280. package/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +442 -0
  1281. package/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +95 -0
  1282. package/vendor/eigen/Eigen/src/Eigenvalues/EigenSolver.h +579 -0
  1283. package/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +402 -0
  1284. package/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +212 -0
  1285. package/vendor/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +356 -0
  1286. package/vendor/eigen/Eigen/src/Eigenvalues/InternalHeaderCheck.h +3 -0
  1287. package/vendor/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +142 -0
  1288. package/vendor/eigen/Eigen/src/Eigenvalues/RealQZ.h +587 -0
  1289. package/vendor/eigen/Eigen/src/Eigenvalues/RealSchur.h +519 -0
  1290. package/vendor/eigen/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +83 -0
  1291. package/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +850 -0
  1292. package/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +90 -0
  1293. package/vendor/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +529 -0
  1294. package/vendor/eigen/Eigen/src/Geometry/AlignedBox.h +485 -0
  1295. package/vendor/eigen/Eigen/src/Geometry/AngleAxis.h +245 -0
  1296. package/vendor/eigen/Eigen/src/Geometry/EulerAngles.h +203 -0
  1297. package/vendor/eigen/Eigen/src/Geometry/Homogeneous.h +453 -0
  1298. package/vendor/eigen/Eigen/src/Geometry/Hyperplane.h +273 -0
  1299. package/vendor/eigen/Eigen/src/Geometry/InternalHeaderCheck.h +3 -0
  1300. package/vendor/eigen/Eigen/src/Geometry/OrthoMethods.h +257 -0
  1301. package/vendor/eigen/Eigen/src/Geometry/ParametrizedLine.h +232 -0
  1302. package/vendor/eigen/Eigen/src/Geometry/Quaternion.h +930 -0
  1303. package/vendor/eigen/Eigen/src/Geometry/Rotation2D.h +201 -0
  1304. package/vendor/eigen/Eigen/src/Geometry/RotationBase.h +209 -0
  1305. package/vendor/eigen/Eigen/src/Geometry/Scaling.h +195 -0
  1306. package/vendor/eigen/Eigen/src/Geometry/Transform.h +1485 -0
  1307. package/vendor/eigen/Eigen/src/Geometry/Translation.h +204 -0
  1308. package/vendor/eigen/Eigen/src/Geometry/Umeyama.h +161 -0
  1309. package/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +154 -0
  1310. package/vendor/eigen/Eigen/src/Householder/BlockHouseholder.h +115 -0
  1311. package/vendor/eigen/Eigen/src/Householder/Householder.h +154 -0
  1312. package/vendor/eigen/Eigen/src/Householder/HouseholderSequence.h +504 -0
  1313. package/vendor/eigen/Eigen/src/Householder/InternalHeaderCheck.h +3 -0
  1314. package/vendor/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +213 -0
  1315. package/vendor/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +220 -0
  1316. package/vendor/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +217 -0
  1317. package/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +402 -0
  1318. package/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +449 -0
  1319. package/vendor/eigen/Eigen/src/IterativeLinearSolvers/InternalHeaderCheck.h +3 -0
  1320. package/vendor/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +395 -0
  1321. package/vendor/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +193 -0
  1322. package/vendor/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +111 -0
  1323. package/vendor/eigen/Eigen/src/Jacobi/InternalHeaderCheck.h +3 -0
  1324. package/vendor/eigen/Eigen/src/Jacobi/Jacobi.h +427 -0
  1325. package/vendor/eigen/Eigen/src/KLUSupport/InternalHeaderCheck.h +3 -0
  1326. package/vendor/eigen/Eigen/src/KLUSupport/KLUSupport.h +339 -0
  1327. package/vendor/eigen/Eigen/src/LU/Determinant.h +98 -0
  1328. package/vendor/eigen/Eigen/src/LU/FullPivLU.h +826 -0
  1329. package/vendor/eigen/Eigen/src/LU/InternalHeaderCheck.h +3 -0
  1330. package/vendor/eigen/Eigen/src/LU/InverseImpl.h +353 -0
  1331. package/vendor/eigen/Eigen/src/LU/PartialPivLU.h +586 -0
  1332. package/vendor/eigen/Eigen/src/LU/PartialPivLU_LAPACKE.h +97 -0
  1333. package/vendor/eigen/Eigen/src/LU/arch/InverseSize4.h +353 -0
  1334. package/vendor/eigen/Eigen/src/MetisSupport/InternalHeaderCheck.h +3 -0
  1335. package/vendor/eigen/Eigen/src/MetisSupport/MetisSupport.h +125 -0
  1336. package/vendor/eigen/Eigen/src/OrderingMethods/Amd.h +413 -0
  1337. package/vendor/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +1690 -0
  1338. package/vendor/eigen/Eigen/src/OrderingMethods/InternalHeaderCheck.h +3 -0
  1339. package/vendor/eigen/Eigen/src/OrderingMethods/Ordering.h +146 -0
  1340. package/vendor/eigen/Eigen/src/PaStiXSupport/InternalHeaderCheck.h +3 -0
  1341. package/vendor/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +632 -0
  1342. package/vendor/eigen/Eigen/src/PardisoSupport/InternalHeaderCheck.h +3 -0
  1343. package/vendor/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +500 -0
  1344. package/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
  1345. package/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +161 -0
  1346. package/vendor/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +648 -0
  1347. package/vendor/eigen/Eigen/src/QR/FullPivHouseholderQR.h +733 -0
  1348. package/vendor/eigen/Eigen/src/QR/HouseholderQR.h +543 -0
  1349. package/vendor/eigen/Eigen/src/QR/HouseholderQR_LAPACKE.h +77 -0
  1350. package/vendor/eigen/Eigen/src/QR/InternalHeaderCheck.h +3 -0
  1351. package/vendor/eigen/Eigen/src/SPQRSupport/InternalHeaderCheck.h +3 -0
  1352. package/vendor/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +315 -0
  1353. package/vendor/eigen/Eigen/src/SVD/BDCSVD.h +1470 -0
  1354. package/vendor/eigen/Eigen/src/SVD/BDCSVD_LAPACKE.h +174 -0
  1355. package/vendor/eigen/Eigen/src/SVD/InternalHeaderCheck.h +3 -0
  1356. package/vendor/eigen/Eigen/src/SVD/JacobiSVD.h +846 -0
  1357. package/vendor/eigen/Eigen/src/SVD/JacobiSVD_LAPACKE.h +127 -0
  1358. package/vendor/eigen/Eigen/src/SVD/SVDBase.h +436 -0
  1359. package/vendor/eigen/Eigen/src/SVD/UpperBidiagonalization.h +379 -0
  1360. package/vendor/eigen/Eigen/src/SparseCholesky/InternalHeaderCheck.h +3 -0
  1361. package/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +868 -0
  1362. package/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +388 -0
  1363. package/vendor/eigen/Eigen/src/SparseCore/AmbiVector.h +329 -0
  1364. package/vendor/eigen/Eigen/src/SparseCore/CompressedStorage.h +206 -0
  1365. package/vendor/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +308 -0
  1366. package/vendor/eigen/Eigen/src/SparseCore/InternalHeaderCheck.h +3 -0
  1367. package/vendor/eigen/Eigen/src/SparseCore/SparseAssign.h +279 -0
  1368. package/vendor/eigen/Eigen/src/SparseCore/SparseBlock.h +534 -0
  1369. package/vendor/eigen/Eigen/src/SparseCore/SparseColEtree.h +194 -0
  1370. package/vendor/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +592 -0
  1371. package/vendor/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +938 -0
  1372. package/vendor/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +142 -0
  1373. package/vendor/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +314 -0
  1374. package/vendor/eigen/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
  1375. package/vendor/eigen/Eigen/src/SparseCore/SparseDot.h +100 -0
  1376. package/vendor/eigen/Eigen/src/SparseCore/SparseFuzzy.h +31 -0
  1377. package/vendor/eigen/Eigen/src/SparseCore/SparseMap.h +295 -0
  1378. package/vendor/eigen/Eigen/src/SparseCore/SparseMatrix.h +1876 -0
  1379. package/vendor/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +451 -0
  1380. package/vendor/eigen/Eigen/src/SparseCore/SparsePermutation.h +249 -0
  1381. package/vendor/eigen/Eigen/src/SparseCore/SparseProduct.h +178 -0
  1382. package/vendor/eigen/Eigen/src/SparseCore/SparseRedux.h +47 -0
  1383. package/vendor/eigen/Eigen/src/SparseCore/SparseRef.h +370 -0
  1384. package/vendor/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +613 -0
  1385. package/vendor/eigen/Eigen/src/SparseCore/SparseSolverBase.h +115 -0
  1386. package/vendor/eigen/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +184 -0
  1387. package/vendor/eigen/Eigen/src/SparseCore/SparseTranspose.h +83 -0
  1388. package/vendor/eigen/Eigen/src/SparseCore/SparseTriangularView.h +177 -0
  1389. package/vendor/eigen/Eigen/src/SparseCore/SparseUtil.h +209 -0
  1390. package/vendor/eigen/Eigen/src/SparseCore/SparseVector.h +532 -0
  1391. package/vendor/eigen/Eigen/src/SparseCore/SparseView.h +225 -0
  1392. package/vendor/eigen/Eigen/src/SparseCore/TriangularSolver.h +274 -0
  1393. package/vendor/eigen/Eigen/src/SparseLU/InternalHeaderCheck.h +3 -0
  1394. package/vendor/eigen/Eigen/src/SparseLU/SparseLU.h +969 -0
  1395. package/vendor/eigen/Eigen/src/SparseLU/SparseLUImpl.h +79 -0
  1396. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +210 -0
  1397. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_Structs.h +113 -0
  1398. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +319 -0
  1399. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_Utils.h +75 -0
  1400. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_bmod.h +177 -0
  1401. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +168 -0
  1402. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +106 -0
  1403. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +114 -0
  1404. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +133 -0
  1405. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +215 -0
  1406. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_dfs.h +235 -0
  1407. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_pivotL.h +136 -0
  1408. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_pruneL.h +130 -0
  1409. package/vendor/eigen/Eigen/src/SparseLU/SparseLU_relax_snode.h +81 -0
  1410. package/vendor/eigen/Eigen/src/SparseQR/InternalHeaderCheck.h +3 -0
  1411. package/vendor/eigen/Eigen/src/SparseQR/SparseQR.h +706 -0
  1412. package/vendor/eigen/Eigen/src/StlSupport/StdDeque.h +51 -0
  1413. package/vendor/eigen/Eigen/src/StlSupport/StdList.h +50 -0
  1414. package/vendor/eigen/Eigen/src/StlSupport/StdVector.h +51 -0
  1415. package/vendor/eigen/Eigen/src/StlSupport/details.h +82 -0
  1416. package/vendor/eigen/Eigen/src/SuperLUSupport/InternalHeaderCheck.h +3 -0
  1417. package/vendor/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +929 -0
  1418. package/vendor/eigen/Eigen/src/ThreadPool/Barrier.h +70 -0
  1419. package/vendor/eigen/Eigen/src/ThreadPool/CoreThreadPoolDevice.h +336 -0
  1420. package/vendor/eigen/Eigen/src/ThreadPool/EventCount.h +241 -0
  1421. package/vendor/eigen/Eigen/src/ThreadPool/ForkJoin.h +140 -0
  1422. package/vendor/eigen/Eigen/src/ThreadPool/InternalHeaderCheck.h +4 -0
  1423. package/vendor/eigen/Eigen/src/ThreadPool/NonBlockingThreadPool.h +587 -0
  1424. package/vendor/eigen/Eigen/src/ThreadPool/RunQueue.h +230 -0
  1425. package/vendor/eigen/Eigen/src/ThreadPool/ThreadCancel.h +21 -0
  1426. package/vendor/eigen/Eigen/src/ThreadPool/ThreadEnvironment.h +43 -0
  1427. package/vendor/eigen/Eigen/src/ThreadPool/ThreadLocal.h +289 -0
  1428. package/vendor/eigen/Eigen/src/ThreadPool/ThreadPoolInterface.h +50 -0
  1429. package/vendor/eigen/Eigen/src/ThreadPool/ThreadYield.h +16 -0
  1430. package/vendor/eigen/Eigen/src/UmfPackSupport/InternalHeaderCheck.h +3 -0
  1431. package/vendor/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +606 -0
  1432. package/vendor/eigen/Eigen/src/misc/Image.h +80 -0
  1433. package/vendor/eigen/Eigen/src/misc/InternalHeaderCheck.h +3 -0
  1434. package/vendor/eigen/Eigen/src/misc/Kernel.h +77 -0
  1435. package/vendor/eigen/Eigen/src/misc/RealSvd2x2.h +53 -0
  1436. package/vendor/eigen/Eigen/src/misc/blas.h +97 -0
  1437. package/vendor/eigen/Eigen/src/misc/lapacke.h +10085 -0
  1438. package/vendor/eigen/Eigen/src/misc/lapacke_helpers.h +163 -0
  1439. package/vendor/eigen/Eigen/src/misc/lapacke_mangling.h +16 -0
  1440. package/vendor/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.inc +344 -0
  1441. package/vendor/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.inc +544 -0
  1442. package/vendor/eigen/Eigen/src/plugins/BlockMethods.inc +1370 -0
  1443. package/vendor/eigen/Eigen/src/plugins/CommonCwiseBinaryOps.inc +116 -0
  1444. package/vendor/eigen/Eigen/src/plugins/CommonCwiseUnaryOps.inc +167 -0
  1445. package/vendor/eigen/Eigen/src/plugins/IndexedViewMethods.inc +192 -0
  1446. package/vendor/eigen/Eigen/src/plugins/InternalHeaderCheck.inc +3 -0
  1447. package/vendor/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.inc +331 -0
  1448. package/vendor/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.inc +118 -0
  1449. package/vendor/eigen/Eigen/src/plugins/ReshapedMethods.inc +133 -0
  1450. package/vendor/eigen/README.md +5 -0
  1451. package/vendor/mpdecimal/COPYRIGHT.txt +23 -0
  1452. package/vendor/mpdecimal/README.txt +53 -0
  1453. package/vendor/mpdecimal/libmpdec/.objs/README.txt +8 -0
  1454. package/vendor/mpdecimal/libmpdec/.objs/symbols32.exp +343 -0
  1455. package/vendor/mpdecimal/libmpdec/.objs/symbols64.exp +347 -0
  1456. package/vendor/mpdecimal/libmpdec/.pc/libmpdec.pc.in +11 -0
  1457. package/vendor/mpdecimal/libmpdec/.profile/train.sh +35 -0
  1458. package/vendor/mpdecimal/libmpdec/README.txt +84 -0
  1459. package/vendor/mpdecimal/libmpdec/basearith.c +649 -0
  1460. package/vendor/mpdecimal/libmpdec/basearith.h +217 -0
  1461. package/vendor/mpdecimal/libmpdec/bits.h +188 -0
  1462. package/vendor/mpdecimal/libmpdec/constants.c +129 -0
  1463. package/vendor/mpdecimal/libmpdec/constants.h +88 -0
  1464. package/vendor/mpdecimal/libmpdec/context.c +285 -0
  1465. package/vendor/mpdecimal/libmpdec/convolute.c +172 -0
  1466. package/vendor/mpdecimal/libmpdec/convolute.h +48 -0
  1467. package/vendor/mpdecimal/libmpdec/crt.c +178 -0
  1468. package/vendor/mpdecimal/libmpdec/crt.h +45 -0
  1469. package/vendor/mpdecimal/libmpdec/difradix2.c +171 -0
  1470. package/vendor/mpdecimal/libmpdec/difradix2.h +46 -0
  1471. package/vendor/mpdecimal/libmpdec/fnt.c +77 -0
  1472. package/vendor/mpdecimal/libmpdec/fnt.h +46 -0
  1473. package/vendor/mpdecimal/libmpdec/fourstep.c +242 -0
  1474. package/vendor/mpdecimal/libmpdec/fourstep.h +46 -0
  1475. package/vendor/mpdecimal/libmpdec/io.c +1610 -0
  1476. package/vendor/mpdecimal/libmpdec/io.h +61 -0
  1477. package/vendor/mpdecimal/libmpdec/mpalloc.c +347 -0
  1478. package/vendor/mpdecimal/libmpdec/mpalloc.h +53 -0
  1479. package/vendor/mpdecimal/libmpdec/mpdecimal.c +9155 -0
  1480. package/vendor/mpdecimal/libmpdec/mpdecimal.h.in +804 -0
  1481. package/vendor/mpdecimal/libmpdec/mpsignal.c +966 -0
  1482. package/vendor/mpdecimal/libmpdec/numbertheory.c +129 -0
  1483. package/vendor/mpdecimal/libmpdec/numbertheory.h +75 -0
  1484. package/vendor/mpdecimal/libmpdec/sixstep.c +212 -0
  1485. package/vendor/mpdecimal/libmpdec/sixstep.h +46 -0
  1486. package/vendor/mpdecimal/libmpdec/transpose.c +275 -0
  1487. package/vendor/mpdecimal/libmpdec/transpose.h +60 -0
  1488. package/vendor/mpdecimal/libmpdec/typearith.h +661 -0
  1489. package/vendor/mpdecimal/libmpdec/umodarith.h +645 -0
  1490. package/vendor/symengine/AUTHORS +101 -0
  1491. package/vendor/symengine/LICENSE +254 -0
  1492. package/vendor/symengine/README.md +199 -0
  1493. package/vendor/symengine/symengine/add.cpp +508 -0
  1494. package/vendor/symengine/symengine/add.h +187 -0
  1495. package/vendor/symengine/symengine/as_real_imag.cpp +289 -0
  1496. package/vendor/symengine/symengine/assumptions.cpp +202 -0
  1497. package/vendor/symengine/symengine/assumptions.h +47 -0
  1498. package/vendor/symengine/symengine/basic-inl.h +152 -0
  1499. package/vendor/symengine/symengine/basic-methods.inc +9 -0
  1500. package/vendor/symengine/symengine/basic.cpp +110 -0
  1501. package/vendor/symengine/symengine/basic.h +356 -0
  1502. package/vendor/symengine/symengine/complex.cpp +198 -0
  1503. package/vendor/symengine/symengine/complex.h +396 -0
  1504. package/vendor/symengine/symengine/complex_double.cpp +72 -0
  1505. package/vendor/symengine/symengine/complex_double.h +570 -0
  1506. package/vendor/symengine/symengine/complex_mpc.h +406 -0
  1507. package/vendor/symengine/symengine/constants.cpp +130 -0
  1508. package/vendor/symengine/symengine/constants.h +81 -0
  1509. package/vendor/symengine/symengine/cse.cpp +556 -0
  1510. package/vendor/symengine/symengine/cwrapper.h +949 -0
  1511. package/vendor/symengine/symengine/dense_matrix.cpp +2100 -0
  1512. package/vendor/symengine/symengine/derivative.cpp +841 -0
  1513. package/vendor/symengine/symengine/derivative.h +137 -0
  1514. package/vendor/symengine/symengine/dict.cpp +125 -0
  1515. package/vendor/symengine/symengine/dict.h +333 -0
  1516. package/vendor/symengine/symengine/diophantine.cpp +139 -0
  1517. package/vendor/symengine/symengine/diophantine.h +20 -0
  1518. package/vendor/symengine/symengine/eval.cpp +109 -0
  1519. package/vendor/symengine/symengine/eval.h +40 -0
  1520. package/vendor/symengine/symengine/eval_arb.h +31 -0
  1521. package/vendor/symengine/symengine/eval_double.cpp +959 -0
  1522. package/vendor/symengine/symengine/eval_double.h +28 -0
  1523. package/vendor/symengine/symengine/eval_mpc.h +29 -0
  1524. package/vendor/symengine/symengine/eval_mpfr.h +26 -0
  1525. package/vendor/symengine/symengine/expand.cpp +379 -0
  1526. package/vendor/symengine/symengine/expression.cpp +24 -0
  1527. package/vendor/symengine/symengine/expression.h +375 -0
  1528. package/vendor/symengine/symengine/fields.cpp +861 -0
  1529. package/vendor/symengine/symengine/fields.h +647 -0
  1530. package/vendor/symengine/symengine/finitediff.cpp +70 -0
  1531. package/vendor/symengine/symengine/finitediff.h +21 -0
  1532. package/vendor/symengine/symengine/flint_wrapper.h +1010 -0
  1533. package/vendor/symengine/symengine/functions.cpp +3913 -0
  1534. package/vendor/symengine/symengine/functions.h +1321 -0
  1535. package/vendor/symengine/symengine/infinity.cpp +537 -0
  1536. package/vendor/symengine/symengine/infinity.h +118 -0
  1537. package/vendor/symengine/symengine/integer.cpp +153 -0
  1538. package/vendor/symengine/symengine/integer.h +227 -0
  1539. package/vendor/symengine/symengine/interruption.cpp +9 -0
  1540. package/vendor/symengine/symengine/interruption.h +19 -0
  1541. package/vendor/symengine/symengine/lambda_double.h +918 -0
  1542. package/vendor/symengine/symengine/limits.h +35 -0
  1543. package/vendor/symengine/symengine/llvm_double.h +201 -0
  1544. package/vendor/symengine/symengine/logic.cpp +812 -0
  1545. package/vendor/symengine/symengine/logic.h +281 -0
  1546. package/vendor/symengine/symengine/matrices/conjugate_matrix.cpp +139 -0
  1547. package/vendor/symengine/symengine/matrices/conjugate_matrix.h +39 -0
  1548. package/vendor/symengine/symengine/matrices/diagonal_matrix.cpp +79 -0
  1549. package/vendor/symengine/symengine/matrices/diagonal_matrix.h +52 -0
  1550. package/vendor/symengine/symengine/matrices/hadamard_product.cpp +151 -0
  1551. package/vendor/symengine/symengine/matrices/hadamard_product.h +42 -0
  1552. package/vendor/symengine/symengine/matrices/identity_matrix.cpp +63 -0
  1553. package/vendor/symengine/symengine/matrices/identity_matrix.h +40 -0
  1554. package/vendor/symengine/symengine/matrices/immutable_dense_matrix.cpp +143 -0
  1555. package/vendor/symengine/symengine/matrices/immutable_dense_matrix.h +65 -0
  1556. package/vendor/symengine/symengine/matrices/is_diagonal.cpp +115 -0
  1557. package/vendor/symengine/symengine/matrices/is_lower.cpp +110 -0
  1558. package/vendor/symengine/symengine/matrices/is_real.cpp +78 -0
  1559. package/vendor/symengine/symengine/matrices/is_square.cpp +85 -0
  1560. package/vendor/symengine/symengine/matrices/is_symmetric.cpp +112 -0
  1561. package/vendor/symengine/symengine/matrices/is_toeplitz.cpp +104 -0
  1562. package/vendor/symengine/symengine/matrices/is_upper.cpp +108 -0
  1563. package/vendor/symengine/symengine/matrices/is_zero.cpp +81 -0
  1564. package/vendor/symengine/symengine/matrices/matrix_add.cpp +176 -0
  1565. package/vendor/symengine/symengine/matrices/matrix_add.h +42 -0
  1566. package/vendor/symengine/symengine/matrices/matrix_expr.h +19 -0
  1567. package/vendor/symengine/symengine/matrices/matrix_mul.cpp +258 -0
  1568. package/vendor/symengine/symengine/matrices/matrix_mul.h +55 -0
  1569. package/vendor/symengine/symengine/matrices/matrix_symbol.cpp +34 -0
  1570. package/vendor/symengine/symengine/matrices/matrix_symbol.h +41 -0
  1571. package/vendor/symengine/symengine/matrices/size.cpp +121 -0
  1572. package/vendor/symengine/symengine/matrices/size.h +15 -0
  1573. package/vendor/symengine/symengine/matrices/trace.cpp +112 -0
  1574. package/vendor/symengine/symengine/matrices/trace.h +31 -0
  1575. package/vendor/symengine/symengine/matrices/transpose.cpp +126 -0
  1576. package/vendor/symengine/symengine/matrices/transpose.h +39 -0
  1577. package/vendor/symengine/symengine/matrices/zero_matrix.cpp +94 -0
  1578. package/vendor/symengine/symengine/matrices/zero_matrix.h +47 -0
  1579. package/vendor/symengine/symengine/matrix.cpp +33 -0
  1580. package/vendor/symengine/symengine/matrix.h +675 -0
  1581. package/vendor/symengine/symengine/matrix_expressions.h +51 -0
  1582. package/vendor/symengine/symengine/monomials.cpp +33 -0
  1583. package/vendor/symengine/symengine/monomials.h +20 -0
  1584. package/vendor/symengine/symengine/mp_boost.cpp +635 -0
  1585. package/vendor/symengine/symengine/mp_class.h +1286 -0
  1586. package/vendor/symengine/symengine/mp_wrapper.h +510 -0
  1587. package/vendor/symengine/symengine/mul.cpp +629 -0
  1588. package/vendor/symengine/symengine/mul.h +146 -0
  1589. package/vendor/symengine/symengine/nan.cpp +234 -0
  1590. package/vendor/symengine/symengine/nan.h +82 -0
  1591. package/vendor/symengine/symengine/ntheory.cpp +1700 -0
  1592. package/vendor/symengine/symengine/ntheory.h +213 -0
  1593. package/vendor/symengine/symengine/ntheory_funcs.cpp +189 -0
  1594. package/vendor/symengine/symengine/ntheory_funcs.h +78 -0
  1595. package/vendor/symengine/symengine/number.cpp +36 -0
  1596. package/vendor/symengine/symengine/number.h +256 -0
  1597. package/vendor/symengine/symengine/numer_denom.cpp +149 -0
  1598. package/vendor/symengine/symengine/parser/parser.cpp +367 -0
  1599. package/vendor/symengine/symengine/parser/parser.h +56 -0
  1600. package/vendor/symengine/symengine/parser/parser.tab.cc +1495 -0
  1601. package/vendor/symengine/symengine/parser/parser.tab.hh +1410 -0
  1602. package/vendor/symengine/symengine/parser/parser_old.cpp +688 -0
  1603. package/vendor/symengine/symengine/parser/tokenizer.cpp +435 -0
  1604. package/vendor/symengine/symengine/parser/tokenizer.h +35 -0
  1605. package/vendor/symengine/symengine/parser.h +25 -0
  1606. package/vendor/symengine/symengine/polys/basic_conversions.cpp +178 -0
  1607. package/vendor/symengine/symengine/polys/basic_conversions.h +575 -0
  1608. package/vendor/symengine/symengine/polys/cancel.h +39 -0
  1609. package/vendor/symengine/symengine/polys/msymenginepoly.cpp +130 -0
  1610. package/vendor/symengine/symengine/polys/msymenginepoly.h +536 -0
  1611. package/vendor/symengine/symengine/polys/uexprpoly.cpp +90 -0
  1612. package/vendor/symengine/symengine/polys/uexprpoly.h +205 -0
  1613. package/vendor/symengine/symengine/polys/uintpoly.cpp +62 -0
  1614. package/vendor/symengine/symengine/polys/uintpoly.h +134 -0
  1615. package/vendor/symengine/symengine/polys/uintpoly_flint.h +228 -0
  1616. package/vendor/symengine/symengine/polys/uintpoly_piranha.h +373 -0
  1617. package/vendor/symengine/symengine/polys/upolybase.h +769 -0
  1618. package/vendor/symengine/symengine/polys/uratpoly.cpp +59 -0
  1619. package/vendor/symengine/symengine/polys/uratpoly.h +58 -0
  1620. package/vendor/symengine/symengine/polys/usymenginepoly.h +139 -0
  1621. package/vendor/symengine/symengine/pow.cpp +303 -0
  1622. package/vendor/symengine/symengine/pow.h +76 -0
  1623. package/vendor/symengine/symengine/prime_sieve.cpp +143 -0
  1624. package/vendor/symengine/symengine/prime_sieve.h +64 -0
  1625. package/vendor/symengine/symengine/printers/codegen.cpp +716 -0
  1626. package/vendor/symengine/symengine/printers/codegen.h +168 -0
  1627. package/vendor/symengine/symengine/printers/latex.cpp +630 -0
  1628. package/vendor/symengine/symengine/printers/latex.h +76 -0
  1629. package/vendor/symengine/symengine/printers/mathml.cpp +358 -0
  1630. package/vendor/symengine/symengine/printers/mathml.h +62 -0
  1631. package/vendor/symengine/symengine/printers/stringbox.cpp +276 -0
  1632. package/vendor/symengine/symengine/printers/stringbox.h +60 -0
  1633. package/vendor/symengine/symengine/printers/strprinter.cpp +1212 -0
  1634. package/vendor/symengine/symengine/printers/strprinter.h +217 -0
  1635. package/vendor/symengine/symengine/printers/unicode.cpp +730 -0
  1636. package/vendor/symengine/symengine/printers/unicode.h +84 -0
  1637. package/vendor/symengine/symengine/printers.h +46 -0
  1638. package/vendor/symengine/symengine/rational.cpp +365 -0
  1639. package/vendor/symengine/symengine/rational.h +341 -0
  1640. package/vendor/symengine/symengine/real_double.cpp +388 -0
  1641. package/vendor/symengine/symengine/real_double.h +492 -0
  1642. package/vendor/symengine/symengine/real_mpfr.h +379 -0
  1643. package/vendor/symengine/symengine/refine.cpp +213 -0
  1644. package/vendor/symengine/symengine/refine.h +43 -0
  1645. package/vendor/symengine/symengine/rewrite.cpp +235 -0
  1646. package/vendor/symengine/symengine/rings.cpp +107 -0
  1647. package/vendor/symengine/symengine/rings.h +24 -0
  1648. package/vendor/symengine/symengine/serialize-cereal.h +964 -0
  1649. package/vendor/symengine/symengine/series.cpp +85 -0
  1650. package/vendor/symengine/symengine/series.h +727 -0
  1651. package/vendor/symengine/symengine/series_flint.h +214 -0
  1652. package/vendor/symengine/symengine/series_generic.cpp +247 -0
  1653. package/vendor/symengine/symengine/series_generic.h +86 -0
  1654. package/vendor/symengine/symengine/series_piranha.h +95 -0
  1655. package/vendor/symengine/symengine/series_visitor.h +357 -0
  1656. package/vendor/symengine/symengine/set_funcs.cpp +296 -0
  1657. package/vendor/symengine/symengine/sets.cpp +1854 -0
  1658. package/vendor/symengine/symengine/sets.h +696 -0
  1659. package/vendor/symengine/symengine/simplify.cpp +62 -0
  1660. package/vendor/symengine/symengine/simplify.h +34 -0
  1661. package/vendor/symengine/symengine/solve.cpp +665 -0
  1662. package/vendor/symengine/symengine/solve.h +117 -0
  1663. package/vendor/symengine/symengine/sparse_matrix.cpp +776 -0
  1664. package/vendor/symengine/symengine/special_boost.cpp +85 -0
  1665. package/vendor/symengine/symengine/special_double.h +570 -0
  1666. package/vendor/symengine/symengine/subs.h +579 -0
  1667. package/vendor/symengine/symengine/symbol.cpp +88 -0
  1668. package/vendor/symengine/symengine/symbol.h +116 -0
  1669. package/vendor/symengine/symengine/symengine_assert.h +50 -0
  1670. package/vendor/symengine/symengine/symengine_casts.h +139 -0
  1671. package/vendor/symengine/symengine/symengine_exception.h +101 -0
  1672. package/vendor/symengine/symengine/symengine_rcp.cpp +21 -0
  1673. package/vendor/symengine/symengine/symengine_rcp.h +384 -0
  1674. package/vendor/symengine/symengine/test_visitors.cpp +1083 -0
  1675. package/vendor/symengine/symengine/test_visitors.h +466 -0
  1676. package/vendor/symengine/symengine/tribool.h +85 -0
  1677. package/vendor/symengine/symengine/tuple.cpp +47 -0
  1678. package/vendor/symengine/symengine/tuple.h +32 -0
  1679. package/vendor/symengine/symengine/type_codes.inc +139 -0
  1680. package/vendor/symengine/symengine/utilities/cereal/LICENSE +24 -0
  1681. package/vendor/symengine/symengine/utilities/cereal/include/cereal/access.hpp +351 -0
  1682. package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/adapters.hpp +163 -0
  1683. package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/binary.hpp +169 -0
  1684. package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/json.hpp +1024 -0
  1685. package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/portable_binary.hpp +334 -0
  1686. package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/xml.hpp +956 -0
  1687. package/vendor/symengine/symengine/utilities/cereal/include/cereal/cereal.hpp +1120 -0
  1688. package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/helpers.hpp +422 -0
  1689. package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/polymorphic_impl.hpp +825 -0
  1690. package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/polymorphic_impl_fwd.hpp +65 -0
  1691. package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/static_object.hpp +128 -0
  1692. package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/traits.hpp +1411 -0
  1693. package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/util.hpp +84 -0
  1694. package/vendor/symengine/symengine/utilities/cereal/include/cereal/macros.hpp +156 -0
  1695. package/vendor/symengine/symengine/utilities/cereal/include/cereal/specialize.hpp +139 -0
  1696. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/array.hpp +79 -0
  1697. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/atomic.hpp +55 -0
  1698. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/base_class.hpp +203 -0
  1699. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/bitset.hpp +176 -0
  1700. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/boost_variant.hpp +164 -0
  1701. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/chrono.hpp +72 -0
  1702. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/common.hpp +129 -0
  1703. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/complex.hpp +56 -0
  1704. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/concepts/pair_associative_container.hpp +73 -0
  1705. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/deque.hpp +62 -0
  1706. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/forward_list.hpp +68 -0
  1707. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/functional.hpp +43 -0
  1708. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/list.hpp +62 -0
  1709. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/map.hpp +36 -0
  1710. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/memory.hpp +425 -0
  1711. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/optional.hpp +65 -0
  1712. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/polymorphic.hpp +483 -0
  1713. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/queue.hpp +132 -0
  1714. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/set.hpp +103 -0
  1715. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/stack.hpp +76 -0
  1716. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/string.hpp +61 -0
  1717. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/tuple.hpp +123 -0
  1718. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/unordered_map.hpp +36 -0
  1719. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/unordered_set.hpp +99 -0
  1720. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/utility.hpp +47 -0
  1721. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/valarray.hpp +89 -0
  1722. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/variant.hpp +108 -0
  1723. package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/vector.hpp +112 -0
  1724. package/vendor/symengine/symengine/utilities/cereal/include/cereal/version.hpp +52 -0
  1725. package/vendor/symengine/symengine/utilities/fast_float/include/fast_float/fast_float.h +3720 -0
  1726. package/vendor/symengine/symengine/utilities/stream_fmt.h +25 -0
  1727. package/vendor/symengine/symengine/visitor.cpp +348 -0
  1728. package/vendor/symengine/symengine/visitor.h +425 -0
@@ -0,0 +1,2628 @@
1
+ // Copyright John Maddock 2006-7, 2013-20.
2
+ // Copyright Paul A. Bristow 2007, 2013-14.
3
+ // Copyright Nikhar Agrawal 2013-14
4
+ // Copyright Christopher Kormanyos 2013-14, 2020, 2024
5
+ // Copyright Matt Borland 2024.
6
+ // Use, modification and distribution are subject to the
7
+ // Boost Software License, Version 1.0. (See accompanying file
8
+ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
+
10
+ #ifndef BOOST_MATH_SF_GAMMA_HPP
11
+ #define BOOST_MATH_SF_GAMMA_HPP
12
+
13
+ #ifdef _MSC_VER
14
+ #pragma once
15
+ #endif
16
+
17
+ #include <boost/math/tools/config.hpp>
18
+ #include <boost/math/tools/series.hpp>
19
+ #include <boost/math/tools/fraction.hpp>
20
+ #include <boost/math/tools/precision.hpp>
21
+ #include <boost/math/tools/promotion.hpp>
22
+ #include <boost/math/tools/type_traits.hpp>
23
+ #include <boost/math/tools/numeric_limits.hpp>
24
+ #include <boost/math/tools/cstdint.hpp>
25
+ #include <boost/math/tools/assert.hpp>
26
+ #include <boost/math/policies/error_handling.hpp>
27
+ #include <boost/math/constants/constants.hpp>
28
+ #include <boost/math/special_functions/math_fwd.hpp>
29
+ #include <boost/math/special_functions/log1p.hpp>
30
+ #include <boost/math/special_functions/trunc.hpp>
31
+ #include <boost/math/special_functions/powm1.hpp>
32
+ #include <boost/math/special_functions/sqrt1pm1.hpp>
33
+ #include <boost/math/special_functions/lanczos.hpp>
34
+ #include <boost/math/special_functions/fpclassify.hpp>
35
+ #include <boost/math/special_functions/detail/igamma_large.hpp>
36
+ #include <boost/math/special_functions/detail/unchecked_factorial.hpp>
37
+ #include <boost/math/special_functions/detail/lgamma_small.hpp>
38
+
39
+ // Only needed for types larger than double
40
+ #ifndef BOOST_MATH_HAS_GPU_SUPPORT
41
+ #include <boost/math/special_functions/bernoulli.hpp>
42
+ #include <boost/math/special_functions/polygamma.hpp>
43
+ #endif
44
+
45
+ #ifdef _MSC_VER
46
+ # pragma warning(push)
47
+ # pragma warning(disable: 4702) // unreachable code (return after domain_error throw).
48
+ # pragma warning(disable: 4127) // conditional expression is constant.
49
+ # pragma warning(disable: 4100) // unreferenced formal parameter.
50
+ # pragma warning(disable: 6326) // potential comparison of a constant with another constant
51
+ // Several variables made comments,
52
+ // but some difficulty as whether referenced on not may depend on macro values.
53
+ // So to be safe, 4100 warnings suppressed.
54
+ // TODO - revisit this?
55
+ #endif
56
+
57
+ namespace boost{ namespace math{
58
+
59
+ namespace detail{
60
+
61
+ template <class T>
62
+ BOOST_MATH_GPU_ENABLED inline bool is_odd(T v, const boost::math::true_type&)
63
+ {
64
+ int i = static_cast<int>(v);
65
+ return i&1;
66
+ }
67
+ template <class T>
68
+ BOOST_MATH_GPU_ENABLED inline bool is_odd(T v, const boost::math::false_type&)
69
+ {
70
+ // Oh dear can't cast T to int!
71
+ BOOST_MATH_STD_USING
72
+ T modulus = v - 2 * floor(v/2);
73
+ return static_cast<bool>(modulus != 0);
74
+ }
75
+ template <class T>
76
+ BOOST_MATH_GPU_ENABLED inline bool is_odd(T v)
77
+ {
78
+ return is_odd(v, ::boost::math::is_convertible<T, int>());
79
+ }
80
+
81
+ template <class T>
82
+ BOOST_MATH_GPU_ENABLED T sinpx(T z)
83
+ {
84
+ // Ad hoc function calculates x * sin(pi * x),
85
+ // taking extra care near when x is near a whole number.
86
+ BOOST_MATH_STD_USING
87
+ int sign = 1;
88
+ if(z < 0)
89
+ {
90
+ z = -z;
91
+ }
92
+ T fl = floor(z);
93
+ T dist; // LCOV_EXCL_LINE
94
+ if(is_odd(fl))
95
+ {
96
+ fl += 1;
97
+ dist = fl - z;
98
+ sign = -sign;
99
+ }
100
+ else
101
+ {
102
+ dist = z - fl;
103
+ }
104
+ BOOST_MATH_ASSERT(fl >= 0);
105
+ if(dist > T(0.5))
106
+ dist = 1 - dist;
107
+ T result = sin(dist*boost::math::constants::pi<T>());
108
+ return sign*z*result;
109
+ } // template <class T> T sinpx(T z)
110
+ //
111
+ // tgamma(z), with Lanczos support:
112
+ //
113
+ template <class T, class Policy, class Lanczos>
114
+ BOOST_MATH_GPU_ENABLED T gamma_imp_final(T z, const Policy& pol, const Lanczos& l)
115
+ {
116
+ BOOST_MATH_STD_USING
117
+
118
+ (void)l; // Suppresses unused variable warning when BOOST_MATH_INSTRUMENT is not defined
119
+
120
+ T result = 1;
121
+
122
+ #ifdef BOOST_MATH_INSTRUMENT
123
+ static bool b = false;
124
+ if(!b)
125
+ {
126
+ std::cout << "tgamma_imp called with " << typeid(z).name() << " " << typeid(l).name() << std::endl;
127
+ b = true;
128
+ }
129
+ #endif
130
+ constexpr auto function = "boost::math::tgamma<%1%>(%1%)";
131
+
132
+ if(z <= 0)
133
+ {
134
+ // shift z to > 1:
135
+ while(z < 0)
136
+ {
137
+ result /= z;
138
+ z += 1;
139
+ }
140
+ }
141
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
142
+ if((floor(z) == z) && (z < max_factorial<T>::value))
143
+ {
144
+ result *= unchecked_factorial<T>(static_cast<unsigned>(itrunc(z, pol) - 1));
145
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
146
+ }
147
+ else if (z < tools::root_epsilon<T>())
148
+ {
149
+ if (z < 1 / tools::max_value<T>())
150
+ result = policies::raise_overflow_error<T>(function, nullptr, pol);
151
+ result *= 1 / z - constants::euler<T>();
152
+ }
153
+ else
154
+ {
155
+ result *= Lanczos::lanczos_sum(z);
156
+ T zgh = (z + static_cast<T>(Lanczos::g()) - boost::math::constants::half<T>());
157
+ T lzgh = log(zgh);
158
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
159
+ BOOST_MATH_INSTRUMENT_VARIABLE(tools::log_max_value<T>());
160
+ if(z * lzgh > tools::log_max_value<T>())
161
+ {
162
+ // we're going to overflow unless this is done with care:
163
+ BOOST_MATH_INSTRUMENT_VARIABLE(zgh);
164
+ if(lzgh * z / 2 > tools::log_max_value<T>())
165
+ return boost::math::sign(result) * policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
166
+ T hp = pow(zgh, T((z / 2) - T(0.25)));
167
+ BOOST_MATH_INSTRUMENT_VARIABLE(hp);
168
+ result *= hp / exp(zgh);
169
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
170
+ if(tools::max_value<T>() / hp < result)
171
+ return boost::math::sign(result) * policies::raise_overflow_error<T>(function, "Result of tgamma is too large to represent.", pol);
172
+ result *= hp;
173
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
174
+ }
175
+ else
176
+ {
177
+ BOOST_MATH_INSTRUMENT_VARIABLE(zgh);
178
+ BOOST_MATH_INSTRUMENT_VARIABLE(pow(zgh, T(z - boost::math::constants::half<T>())));
179
+ BOOST_MATH_INSTRUMENT_VARIABLE(exp(zgh));
180
+ result *= pow(zgh, T(z - boost::math::constants::half<T>())) / exp(zgh);
181
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
182
+ }
183
+ }
184
+ return result;
185
+ }
186
+
187
+ #ifdef BOOST_MATH_ENABLE_CUDA
188
+ # pragma nv_diag_suppress 2190
189
+ #endif
190
+
191
+ // SYCL compilers can not support recursion so we extract it into a dispatch function
192
+ template <class T, class Policy, class Lanczos>
193
+ BOOST_MATH_GPU_ENABLED BOOST_MATH_FORCEINLINE T gamma_imp(T z, const Policy& pol, const Lanczos& l)
194
+ {
195
+ BOOST_MATH_STD_USING
196
+
197
+ T result = 1;
198
+ constexpr auto function = "boost::math::tgamma<%1%>(%1%)";
199
+
200
+ if(z <= 0)
201
+ {
202
+ if(floor(z) == z)
203
+ return policies::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol);
204
+ if(z <= -20)
205
+ {
206
+ #ifndef BOOST_MATH_NO_EXCEPTIONS
207
+ try
208
+ #endif
209
+ {
210
+ result = gamma_imp_final(T(-z), pol, l) * sinpx(z);
211
+ }
212
+ #ifndef BOOST_MATH_NO_EXCEPTIONS
213
+ catch (const std::overflow_error&)
214
+ {
215
+ return policies::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
216
+ }
217
+ #endif
218
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
219
+ BOOST_MATH_IF_CONSTEXPR(!boost::math::numeric_limits<T>::is_specialized || (boost::math::numeric_limits<T>::digits > 64))
220
+ {
221
+ if ((fabs(result) < 1) && (tools::max_value<T>() * fabs(result) < boost::math::constants::pi<T>()))
222
+ {
223
+ return policies::raise_overflow_error<T>(function, nullptr, pol); // LCOV_EXCL_LINE MP only.
224
+
225
+ }
226
+ }
227
+ else
228
+ {
229
+ // Result can never be small: tgamma[-z] is always larger than sinpx[z] is small.
230
+ // Specifically, sinpx can never be larger than 1 / epsilon which is too small to
231
+ // ever generate a value less than one for `result`, unless T has a truely
232
+ // exceptional number of digits precision.
233
+ BOOST_MATH_ASSERT((fabs(result) > 1) || (tools::max_value<T>() * fabs(result) > boost::math::constants::pi<T>()));
234
+ }
235
+ result = -boost::math::constants::pi<T>() / result;
236
+ if (result == 0)
237
+ return policies::raise_underflow_error<T>(function, "Result of tgamma is too small to represent.", pol);
238
+ /*
239
+ * Result can never be subnormal as we have a value > 1 in the numerator:
240
+ if((boost::math::fpclassify)(result) == (int)FP_SUBNORMAL)
241
+ return policies::raise_denorm_error<T>(function, "Result of tgamma is denormalized.", result, pol);
242
+ */
243
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
244
+ return result;
245
+ }
246
+ }
247
+
248
+ return gamma_imp_final(T(z), pol, l);
249
+ }
250
+
251
+ #ifdef BOOST_MATH_ENABLE_CUDA
252
+ # pragma nv_diag_default 2190
253
+ #endif
254
+
255
+ //
256
+ // lgamma(z) with Lanczos support:
257
+ //
258
+ template <class T, class Policy, class Lanczos>
259
+ BOOST_MATH_GPU_ENABLED T lgamma_imp_final(T z, const Policy& pol, const Lanczos& l, int* sign = nullptr)
260
+ {
261
+ #ifdef BOOST_MATH_INSTRUMENT
262
+ static bool b = false;
263
+ if(!b)
264
+ {
265
+ std::cout << "lgamma_imp called with " << typeid(z).name() << " " << typeid(l).name() << std::endl;
266
+ b = true;
267
+ }
268
+ #endif
269
+
270
+ BOOST_MATH_STD_USING
271
+
272
+ constexpr auto function = "boost::math::lgamma<%1%>(%1%)";
273
+
274
+ T result = 0;
275
+ int sresult = 1;
276
+
277
+ if (z < tools::root_epsilon<T>())
278
+ {
279
+ if (0 == z)
280
+ return policies::raise_pole_error<T>(function, "Evaluation of lgamma at %1%.", z, pol);
281
+ if (4 * fabs(z) < tools::epsilon<T>())
282
+ result = -log(fabs(z));
283
+ else
284
+ result = log(fabs(1 / z - constants::euler<T>()));
285
+ if (z < 0)
286
+ sresult = -1;
287
+ }
288
+ else if(z < 15)
289
+ {
290
+ typedef typename policies::precision<T, Policy>::type precision_type;
291
+ typedef boost::math::integral_constant<int,
292
+ precision_type::value <= 0 ? 0 :
293
+ precision_type::value <= 64 ? 64 :
294
+ precision_type::value <= 113 ? 113 : 0
295
+ > tag_type;
296
+
297
+ result = lgamma_small_imp<T>(z, T(z - 1), T(z - 2), tag_type(), pol, l);
298
+ }
299
+ else if((z >= 3) && (z < 100) && (boost::math::numeric_limits<T>::max_exponent >= 1024))
300
+ {
301
+ // taking the log of tgamma reduces the error, no danger of overflow here:
302
+ result = log(gamma_imp(z, pol, l));
303
+ }
304
+ else
305
+ {
306
+ // regular evaluation:
307
+ T zgh = static_cast<T>(z + T(Lanczos::g()) - boost::math::constants::half<T>());
308
+ result = log(zgh) - 1;
309
+ result *= z - 0.5f;
310
+ //
311
+ // Only add on the lanczos sum part if we're going to need it:
312
+ //
313
+ if(result * tools::epsilon<T>() < 20)
314
+ result += log(Lanczos::lanczos_sum_expG_scaled(z));
315
+ }
316
+
317
+ if(sign)
318
+ *sign = sresult;
319
+ return result;
320
+ }
321
+
322
+ #ifdef BOOST_MATH_ENABLE_CUDA
323
+ # pragma nv_diag_suppress 2190
324
+ #endif
325
+
326
+ template <class T, class Policy, class Lanczos>
327
+ BOOST_MATH_GPU_ENABLED BOOST_MATH_FORCEINLINE T lgamma_imp(T z, const Policy& pol, const Lanczos& l, int* sign = nullptr)
328
+ {
329
+ BOOST_MATH_STD_USING
330
+
331
+ if(z <= -tools::root_epsilon<T>())
332
+ {
333
+ constexpr auto function = "boost::math::lgamma<%1%>(%1%)";
334
+
335
+ T result = 0;
336
+ int sresult = 1;
337
+
338
+ // reflection formula:
339
+ if(floor(z) == z)
340
+ return policies::raise_pole_error<T>(function, "Evaluation of lgamma at a negative integer %1%.", z, pol);
341
+
342
+ T t = sinpx(z);
343
+ z = -z;
344
+ if(t < 0)
345
+ {
346
+ t = -t;
347
+ }
348
+ else
349
+ {
350
+ sresult = -sresult;
351
+ }
352
+ result = log(boost::math::constants::pi<T>()) - lgamma_imp_final(T(z), pol, l) - log(t);
353
+
354
+ if(sign)
355
+ {
356
+ *sign = sresult;
357
+ }
358
+
359
+ return result;
360
+ }
361
+ else
362
+ {
363
+ return lgamma_imp_final(T(z), pol, l, sign);
364
+ }
365
+ }
366
+
367
+ #ifdef BOOST_MATH_ENABLE_CUDA
368
+ # pragma nv_diag_default 2190
369
+ #endif
370
+
371
+ //
372
+ // Incomplete gamma functions follow:
373
+ //
374
+ template <class T>
375
+ struct upper_incomplete_gamma_fract
376
+ {
377
+ private:
378
+ T z, a;
379
+ int k;
380
+ public:
381
+ typedef boost::math::pair<T,T> result_type;
382
+
383
+ BOOST_MATH_GPU_ENABLED upper_incomplete_gamma_fract(T a1, T z1)
384
+ : z(z1-a1+1), a(a1), k(0)
385
+ {
386
+ }
387
+
388
+ BOOST_MATH_GPU_ENABLED result_type operator()()
389
+ {
390
+ ++k;
391
+ z += 2;
392
+ return result_type(k * (a - k), z);
393
+ }
394
+ };
395
+
396
+ template <class T>
397
+ BOOST_MATH_GPU_ENABLED inline T upper_gamma_fraction(T a, T z, T eps)
398
+ {
399
+ // Multiply result by z^a * e^-z to get the full
400
+ // upper incomplete integral. Divide by tgamma(z)
401
+ // to normalise.
402
+ upper_incomplete_gamma_fract<T> f(a, z);
403
+ return 1 / (z - a + 1 + boost::math::tools::continued_fraction_a(f, eps));
404
+ }
405
+
406
+ template <class T>
407
+ struct lower_incomplete_gamma_series
408
+ {
409
+ private:
410
+ T a, z, result;
411
+ public:
412
+ typedef T result_type;
413
+ BOOST_MATH_GPU_ENABLED lower_incomplete_gamma_series(T a1, T z1) : a(a1), z(z1), result(1){}
414
+
415
+ BOOST_MATH_GPU_ENABLED T operator()()
416
+ {
417
+ T r = result;
418
+ a += 1;
419
+ result *= z/a;
420
+ return r;
421
+ }
422
+ };
423
+
424
+ template <class T, class Policy>
425
+ BOOST_MATH_GPU_ENABLED inline T lower_gamma_series(T a, T z, const Policy& pol, T init_value = 0)
426
+ {
427
+ // Multiply result by ((z^a) * (e^-z) / a) to get the full
428
+ // lower incomplete integral. Then divide by tgamma(a)
429
+ // to get the normalised value.
430
+ lower_incomplete_gamma_series<T> s(a, z);
431
+ boost::math::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
432
+ T factor = policies::get_epsilon<T, Policy>();
433
+ T result = boost::math::tools::sum_series(s, factor, max_iter, init_value);
434
+ policies::check_series_iterations<T>("boost::math::detail::lower_gamma_series<%1%>(%1%)", max_iter, pol);
435
+ return result;
436
+ }
437
+
438
+ #ifndef BOOST_MATH_HAS_GPU_SUPPORT
439
+
440
+ //
441
+ // Fully generic tgamma and lgamma use Stirling's approximation
442
+ // with Bernoulli numbers.
443
+ //
444
+ template<class T>
445
+ boost::math::size_t highest_bernoulli_index()
446
+ {
447
+ const float digits10_of_type = (boost::math::numeric_limits<T>::is_specialized
448
+ ? static_cast<float>(boost::math::numeric_limits<T>::digits10)
449
+ : static_cast<float>(boost::math::tools::digits<T>() * 0.301F));
450
+
451
+ // Find the high index n for Bn to produce the desired precision in Stirling's calculation.
452
+ return static_cast<boost::math::size_t>(18.0F + (0.6F * digits10_of_type));
453
+ }
454
+
455
+ template<class T>
456
+ int minimum_argument_for_bernoulli_recursion()
457
+ {
458
+ BOOST_MATH_STD_USING
459
+
460
+ const float digits10_of_type = (boost::math::numeric_limits<T>::is_specialized
461
+ ? (float) boost::math::numeric_limits<T>::digits10
462
+ : (float) (boost::math::tools::digits<T>() * 0.301F));
463
+
464
+ int min_arg = (int) (digits10_of_type * 1.7F);
465
+
466
+ if(digits10_of_type < 50.0F)
467
+ {
468
+ // The following code sequence has been modified
469
+ // within the context of issue 396.
470
+
471
+ // The calculation of the test-variable limit has now
472
+ // been protected against overflow/underflow dangers.
473
+
474
+ // The previous line looked like this and did, in fact,
475
+ // underflow ldexp when using certain multiprecision types.
476
+
477
+ // const float limit = std::ceil(std::pow(1.0f / std::ldexp(1.0f, 1-boost::math::tools::digits<T>()), 1.0f / 20.0f));
478
+
479
+ // The new safe version of the limit check is now here.
480
+ const float d2_minus_one = ((digits10_of_type / 0.301F) - 1.0F);
481
+ const float limit = ceil(exp((d2_minus_one * log(2.0F)) / 20.0F));
482
+
483
+ min_arg = (int) (BOOST_MATH_GPU_SAFE_MIN(digits10_of_type * 1.7F, limit));
484
+ }
485
+
486
+ return min_arg;
487
+ }
488
+
489
+ template <class T, class Policy>
490
+ T scaled_tgamma_no_lanczos(const T& z, const Policy& pol, bool islog = false)
491
+ {
492
+ BOOST_MATH_STD_USING
493
+ //
494
+ // Calculates tgamma(z) / (z/e)^z
495
+ // Requires that our argument is large enough for Sterling's approximation to hold.
496
+ // Used internally when combining gamma's of similar magnitude without logarithms.
497
+ //
498
+ BOOST_MATH_ASSERT(minimum_argument_for_bernoulli_recursion<T>() <= z);
499
+
500
+ // Perform the Bernoulli series expansion of Stirling's approximation.
501
+
502
+ const boost::math::size_t number_of_bernoullis_b2n = policies::get_max_series_iterations<Policy>();
503
+
504
+ T one_over_x_pow_two_n_minus_one = 1 / z;
505
+ const T one_over_x2 = one_over_x_pow_two_n_minus_one * one_over_x_pow_two_n_minus_one;
506
+ T sum = (boost::math::bernoulli_b2n<T>(1) / 2) * one_over_x_pow_two_n_minus_one;
507
+ const T target_epsilon_to_break_loop = sum * boost::math::tools::epsilon<T>();
508
+ const T half_ln_two_pi_over_z = sqrt(boost::math::constants::two_pi<T>() / z);
509
+ T last_term = 2 * sum;
510
+
511
+ for (boost::math::size_t n = 2U;; ++n)
512
+ {
513
+ one_over_x_pow_two_n_minus_one *= one_over_x2;
514
+
515
+ const boost::math::size_t n2 = static_cast<boost::math::size_t>(n * 2U);
516
+
517
+ const T term = (boost::math::bernoulli_b2n<T>(static_cast<int>(n)) * one_over_x_pow_two_n_minus_one) / (n2 * (n2 - 1U));
518
+
519
+ if ((n >= 3U) && (abs(term) < target_epsilon_to_break_loop))
520
+ {
521
+ // We have reached the desired precision in Stirling's expansion.
522
+ // Adding additional terms to the sum of this divergent asymptotic
523
+ // expansion will not improve the result.
524
+
525
+ // Break from the loop.
526
+ break;
527
+ }
528
+ if (n > number_of_bernoullis_b2n)
529
+ // Safety net, we hope to never get here:
530
+ return policies::raise_evaluation_error("scaled_tgamma_no_lanczos<%1%>()", "Exceeded maximum series iterations without reaching convergence, best approximation was %1%", T(exp(sum) * half_ln_two_pi_over_z), pol); // LCOV_EXCL_LINE
531
+
532
+ sum += term;
533
+
534
+ // Sanity check for divergence:
535
+ T fterm = fabs(term);
536
+ if(fterm > last_term)
537
+ // Safety net, we hope to never get here:
538
+ return policies::raise_evaluation_error("scaled_tgamma_no_lanczos<%1%>()", "Series became divergent without reaching convergence, best approximation was %1%", T(exp(sum) * half_ln_two_pi_over_z), pol); // LCOV_EXCL_LINE
539
+ last_term = fterm;
540
+ }
541
+
542
+ // Complete Stirling's approximation.
543
+ T scaled_gamma_value = islog ? T(sum + log(half_ln_two_pi_over_z)) : T(exp(sum) * half_ln_two_pi_over_z);
544
+ return scaled_gamma_value;
545
+ }
546
+
547
+ // Forward declaration of the lgamma_imp template specialization.
548
+ template <class T, class Policy>
549
+ T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign = nullptr);
550
+
551
+ template <class T, class Policy>
552
+ T gamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&)
553
+ {
554
+ BOOST_MATH_STD_USING
555
+
556
+ constexpr auto function = "boost::math::tgamma<%1%>(%1%)";
557
+
558
+ // Check if the argument of tgamma is identically zero.
559
+ const bool is_at_zero = (z == 0);
560
+
561
+ if((boost::math::isnan)(z) || (is_at_zero) || ((boost::math::isinf)(z) && (z < 0)))
562
+ return policies::raise_domain_error<T>(function, "Evaluation of tgamma at %1%.", z, pol);
563
+
564
+ const bool b_neg = (z < 0);
565
+
566
+ const bool floor_of_z_is_equal_to_z = (floor(z) == z);
567
+
568
+ // Special case handling of small factorials:
569
+ if((!b_neg) && floor_of_z_is_equal_to_z && (z < boost::math::max_factorial<T>::value))
570
+ {
571
+ return boost::math::unchecked_factorial<T>(static_cast<unsigned>(itrunc(z) - 1));
572
+ }
573
+
574
+ // Make a local, unsigned copy of the input argument.
575
+ T zz((!b_neg) ? z : -z);
576
+
577
+ // Special case for ultra-small z:
578
+ if(zz < tools::cbrt_epsilon<T>())
579
+ {
580
+ const T a0(1);
581
+ const T a1(boost::math::constants::euler<T>());
582
+ const T six_euler_squared((boost::math::constants::euler<T>() * boost::math::constants::euler<T>()) * 6);
583
+ const T a2((six_euler_squared - boost::math::constants::pi_sqr<T>()) / 12);
584
+
585
+ const T inverse_tgamma_series = z * ((a2 * z + a1) * z + a0);
586
+
587
+ return 1 / inverse_tgamma_series;
588
+ }
589
+
590
+ // Scale the argument up for the calculation of lgamma,
591
+ // and use downward recursion later for the final result.
592
+ const int min_arg_for_recursion = minimum_argument_for_bernoulli_recursion<T>();
593
+
594
+ int n_recur;
595
+
596
+ if(zz < min_arg_for_recursion)
597
+ {
598
+ n_recur = boost::math::itrunc(min_arg_for_recursion - zz) + 1;
599
+
600
+ zz += n_recur;
601
+ }
602
+ else
603
+ {
604
+ n_recur = 0;
605
+ }
606
+ if (!n_recur)
607
+ {
608
+ if (zz > tools::log_max_value<T>())
609
+ return b_neg ? policies::raise_underflow_error<T>(function, nullptr, pol) : policies::raise_overflow_error<T>(function, nullptr, pol); // LCOV_EXCL_LINE MP only
610
+ if (log(zz) * zz / 2 > tools::log_max_value<T>())
611
+ return b_neg ? policies::raise_underflow_error<T>(function, nullptr, pol) : policies::raise_overflow_error<T>(function, nullptr, pol); // LCOV_EXCL_LINE MP only
612
+ }
613
+ T gamma_value = scaled_tgamma_no_lanczos(zz, pol);
614
+ T power_term = pow(zz, zz / 2);
615
+ T exp_term = exp(-zz);
616
+ gamma_value *= (power_term * exp_term);
617
+ if (!n_recur && (tools::max_value<T>() / power_term < gamma_value))
618
+ return b_neg ? policies::raise_underflow_error<T>(function, nullptr, pol) : policies::raise_overflow_error<T>(function, nullptr, pol); // LCOV_EXCL_LINE MP only
619
+ gamma_value *= power_term;
620
+
621
+ // Rescale the result using downward recursion if necessary.
622
+ if(n_recur)
623
+ {
624
+ // The order of divides is important, if we keep subtracting 1 from zz
625
+ // we DO NOT get back to z (cancellation error). Further if z < epsilon
626
+ // we would end up dividing by zero. Also in order to prevent spurious
627
+ // overflow with the first division, we must save dividing by |z| till last,
628
+ // so the optimal order of divides is z+1, z+2, z+3...z+n_recur-1,z.
629
+ zz = fabs(z) + 1;
630
+ for(int k = 1; k < n_recur; ++k)
631
+ {
632
+ gamma_value /= zz;
633
+ zz += 1;
634
+ }
635
+ gamma_value /= fabs(z);
636
+ }
637
+
638
+ // Return the result, accounting for possible negative arguments.
639
+ if(b_neg)
640
+ {
641
+ // Provide special error analysis for:
642
+ // * arguments in the neighborhood of a negative integer
643
+ // * arguments exactly equal to a negative integer.
644
+
645
+ // Check if the argument of tgamma is exactly equal to a negative integer.
646
+ if(floor_of_z_is_equal_to_z)
647
+ return policies::raise_pole_error<T>(function, "Evaluation of tgamma at a negative integer %1%.", z, pol); // LCOV_EXCL_LINE MP only
648
+
649
+ T s = sinpx(z);
650
+ if ((gamma_value > 1) && (tools::max_value<T>() / gamma_value < fabs(s)))
651
+ return policies::raise_underflow_error<T>(function, nullptr, pol); // LCOV_EXCL_LINE MP only
652
+ gamma_value *= s; // LCOV_EXCL_LINE MP only
653
+
654
+ BOOST_MATH_INSTRUMENT_VARIABLE(gamma_value);
655
+ //
656
+ // Result can never overflow, since sinpx(z) can never be smaller than machine epsilon and gamma_value > 1.
657
+ //
658
+ BOOST_MATH_ASSERT( (abs(gamma_value) > 1) || ((tools::max_value<T>() * abs(gamma_value)) > boost::math::constants::pi<T>())); // LCOV_EXCL_LINE MP only
659
+
660
+ gamma_value = -boost::math::constants::pi<T>() / gamma_value;
661
+
662
+ BOOST_MATH_INSTRUMENT_VARIABLE(gamma_value); // LCOV_EXCL_LINE MP only
663
+ //
664
+ // We can never underflow since the numerator > 1 above and denominator is not infinite:
665
+ //
666
+ BOOST_MATH_ASSERT(gamma_value != 0); // LCOV_EXCL_LINE MP only
667
+ }
668
+
669
+ return gamma_value;
670
+ }
671
+
672
+ template <class T, class Policy>
673
+ inline T log_gamma_near_1(const T& z, Policy const& pol)
674
+ {
675
+ //
676
+ // This is for the multiprecision case where there is
677
+ // no lanczos support, use a taylor series at z = 1,
678
+ // see https://www.wolframalpha.com/input/?i=taylor+series+lgamma(x)+at+x+%3D+1
679
+ //
680
+ BOOST_MATH_STD_USING // ADL of std names
681
+
682
+ // For some reason, several lines aren't triggered for coverage even though
683
+ // adjacent lines are... weird!
684
+
685
+ BOOST_MATH_ASSERT(fabs(z) < 1); // LCOV_EXCL_LINE
686
+
687
+ T result = -constants::euler<T>() * z;
688
+
689
+ T power_term = z * z / 2;
690
+ int n = 2; // LCOV_EXCL_LINE
691
+ T term = 0; // LCOV_EXCL_LINE
692
+
693
+ do
694
+ {
695
+ term = power_term * boost::math::polygamma(n - 1, T(1), pol);
696
+ result += term; // LCOV_EXCL_LINE
697
+ ++n;
698
+ power_term *= z / n;
699
+ } while (fabs(result) * tools::epsilon<T>() < fabs(term));
700
+
701
+ return result;
702
+ }
703
+
704
+ template <class T, class Policy>
705
+ T lgamma_imp(T z, const Policy& pol, const lanczos::undefined_lanczos&, int* sign)
706
+ {
707
+ BOOST_MATH_STD_USING
708
+
709
+ constexpr auto function = "boost::math::lgamma<%1%>(%1%)";
710
+
711
+ // Check if the argument of lgamma is identically zero.
712
+ const bool is_at_zero = (z == 0);
713
+
714
+ if(is_at_zero)
715
+ return policies::raise_domain_error<T>(function, "Evaluation of lgamma at zero %1%.", z, pol);
716
+ if((boost::math::isnan)(z))
717
+ return policies::raise_domain_error<T>(function, "Evaluation of lgamma at %1%.", z, pol);
718
+ if((boost::math::isinf)(z))
719
+ return policies::raise_overflow_error<T>(function, nullptr, pol);
720
+
721
+ const bool b_neg = (z < 0);
722
+
723
+ const bool floor_of_z_is_equal_to_z = (floor(z) == z);
724
+
725
+ // Special case handling of small factorials:
726
+ if((!b_neg) && floor_of_z_is_equal_to_z && (z < boost::math::max_factorial<T>::value))
727
+ {
728
+ if (sign)
729
+ *sign = 1; // LCOV_EXCL_LINE
730
+ return log(boost::math::unchecked_factorial<T>(itrunc(z) - 1));
731
+ }
732
+
733
+ // Make a local, unsigned copy of the input argument.
734
+ T zz((!b_neg) ? z : -z);
735
+
736
+ const int min_arg_for_recursion = minimum_argument_for_bernoulli_recursion<T>();
737
+
738
+ T log_gamma_value;
739
+
740
+ if (zz < min_arg_for_recursion)
741
+ {
742
+ // Here we simply take the logarithm of tgamma(). This is somewhat
743
+ // inefficient, but simple. The rationale is that the argument here
744
+ // is relatively small and overflow is not expected to be likely.
745
+ if (sign)
746
+ * sign = 1; // // LCOV_EXCL_LINE
747
+ if(fabs(z - 1) < 0.25)
748
+ {
749
+ log_gamma_value = log_gamma_near_1(T(zz - 1), pol);
750
+ }
751
+ else if(fabs(z - 2) < 0.25)
752
+ {
753
+ log_gamma_value = log_gamma_near_1(T(zz - 2), pol) + log(zz - 1);
754
+ }
755
+ else if (z > -tools::root_epsilon<T>())
756
+ {
757
+ // Reflection formula may fail if z is very close to zero, let the series
758
+ // expansion for tgamma close to zero do the work:
759
+ if (sign)
760
+ *sign = z < 0 ? -1 : 1; // LCOV_EXCL_LINE
761
+ return log(abs(gamma_imp(z, pol, lanczos::undefined_lanczos())));
762
+ }
763
+ else
764
+ {
765
+ // No issue with spurious overflow in reflection formula,
766
+ // just fall through to regular code:
767
+ T g = gamma_imp(zz, pol, lanczos::undefined_lanczos());
768
+ if (sign)
769
+ {
770
+ *sign = g < 0 ? -1 : 1; // LCOV_EXCL_LINE MP only
771
+ }
772
+ log_gamma_value = log(abs(g));
773
+ }
774
+ }
775
+ else
776
+ {
777
+ // Perform the Bernoulli series expansion of Stirling's approximation.
778
+ T sum = scaled_tgamma_no_lanczos(zz, pol, true);
779
+ log_gamma_value = zz * (log(zz) - 1) + sum;
780
+ }
781
+
782
+ int sign_of_result = 1;
783
+
784
+ if(b_neg)
785
+ {
786
+ // Provide special error analysis if the argument is exactly
787
+ // equal to a negative integer.
788
+
789
+ // Check if the argument of lgamma is exactly equal to a negative integer.
790
+ if(floor_of_z_is_equal_to_z)
791
+ return policies::raise_pole_error<T>(function, "Evaluation of lgamma at a negative integer %1%.", z, pol); // LCOV_EXCL_LINE MP only
792
+
793
+ T t = sinpx(z);
794
+
795
+ if(t < 0)
796
+ {
797
+ t = -t;
798
+ }
799
+ else
800
+ {
801
+ sign_of_result = -sign_of_result; // LCOV_EXCL_LINE MP only
802
+ }
803
+
804
+ log_gamma_value = - log_gamma_value + log(boost::math::constants::pi<T>()) - log(t);
805
+ }
806
+
807
+ if(sign != static_cast<int*>(nullptr)) { *sign = sign_of_result; }
808
+
809
+ return log_gamma_value;
810
+ }
811
+
812
+ #endif // BOOST_MATH_HAS_GPU_SUPPORT
813
+
814
+ // In order for tgammap1m1_imp to compile we need a forward decl of boost::math::tgamma
815
+ // The rub is that we can't just use math_fwd so we provide one here only in that circumstance
816
+ #ifdef BOOST_MATH_HAS_NVRTC
817
+ template <class RT>
818
+ BOOST_MATH_GPU_ENABLED tools::promote_args_t<RT> tgamma(RT z);
819
+
820
+ template <class RT1, class RT2>
821
+ BOOST_MATH_GPU_ENABLED tools::promote_args_t<RT1, RT2> tgamma(RT1 a, RT2 z);
822
+
823
+ template <class RT1, class RT2, class Policy>
824
+ BOOST_MATH_GPU_ENABLED tools::promote_args_t<RT1, RT2> tgamma(RT1 a, RT2 z, const Policy& pol);
825
+ #endif
826
+
827
+ //
828
+ // This helper calculates tgamma(dz+1)-1 without cancellation errors,
829
+ // used by the upper incomplete gamma with z < 1:
830
+ //
831
+ template <class T, class Policy, class Lanczos>
832
+ BOOST_MATH_GPU_ENABLED T tgammap1m1_imp(T dz, Policy const& pol, const Lanczos& l)
833
+ {
834
+ BOOST_MATH_STD_USING
835
+
836
+ typedef typename policies::precision<T,Policy>::type precision_type;
837
+
838
+ typedef boost::math::integral_constant<int,
839
+ precision_type::value <= 0 ? 0 :
840
+ precision_type::value <= 64 ? 64 :
841
+ precision_type::value <= 113 ? 113 : 0
842
+ > tag_type;
843
+
844
+ T result{};
845
+ if(dz < 0)
846
+ {
847
+ if(dz < T(-0.5))
848
+ {
849
+ // Best method is simply to subtract 1 from tgamma:
850
+ #ifdef BOOST_MATH_HAS_NVRTC
851
+ result = ::tgamma(1+dz);
852
+ #else
853
+ result = boost::math::tgamma(1+dz, pol) - 1;
854
+ #endif
855
+ BOOST_MATH_INSTRUMENT_CODE(result);
856
+ }
857
+ else
858
+ {
859
+ // Use expm1 on lgamma:
860
+ result = boost::math::expm1(-boost::math::log1p(dz, pol)
861
+ + lgamma_small_imp<T>(dz+2, dz + 1, dz, tag_type(), pol, l), pol);
862
+ BOOST_MATH_INSTRUMENT_CODE(result);
863
+ }
864
+ }
865
+ else
866
+ {
867
+ if(dz < 2)
868
+ {
869
+ // Use expm1 on lgamma:
870
+ result = boost::math::expm1(lgamma_small_imp<T>(dz+1, dz, dz-1, tag_type(), pol, l), pol);
871
+ BOOST_MATH_INSTRUMENT_CODE(result);
872
+ }
873
+ else
874
+ {
875
+ // Best method is simply to subtract 1 from tgamma:
876
+ #ifdef BOOST_MATH_HAS_NVRTC
877
+ result = ::tgamma(1+dz);
878
+ #else
879
+ result = boost::math::tgamma(1+dz, pol) - 1;
880
+ #endif
881
+ BOOST_MATH_INSTRUMENT_CODE(result);
882
+ }
883
+ }
884
+
885
+ return result;
886
+ }
887
+
888
+ #ifndef BOOST_MATH_HAS_GPU_SUPPORT
889
+
890
+ template <class T, class Policy>
891
+ inline T tgammap1m1_imp(T z, Policy const& pol,
892
+ const ::boost::math::lanczos::undefined_lanczos&)
893
+ {
894
+ BOOST_MATH_STD_USING // ADL of std names
895
+
896
+ if(fabs(z) < T(0.55))
897
+ {
898
+ return boost::math::expm1(log_gamma_near_1(z, pol));
899
+ }
900
+ return boost::math::expm1(boost::math::lgamma(1 + z, pol));
901
+ }
902
+
903
+ #endif // BOOST_MATH_HAS_GPU_SUPPORT
904
+
905
+ //
906
+ // Series representation for upper fraction when z is small:
907
+ //
908
+ template <class T>
909
+ struct small_gamma2_series
910
+ {
911
+ typedef T result_type;
912
+
913
+ BOOST_MATH_GPU_ENABLED small_gamma2_series(T a_, T x_) : result(-x_), x(-x_), apn(a_+1), n(1){}
914
+
915
+ BOOST_MATH_GPU_ENABLED T operator()()
916
+ {
917
+ T r = result / (apn);
918
+ result *= x;
919
+ result /= ++n;
920
+ apn += 1;
921
+ return r;
922
+ }
923
+
924
+ private:
925
+ T result, x, apn;
926
+ int n;
927
+ };
928
+ //
929
+ // calculate power term prefix (z^a)(e^-z) used in the non-normalised
930
+ // incomplete gammas:
931
+ //
932
+ template <class T, class Policy>
933
+ BOOST_MATH_GPU_ENABLED T full_igamma_prefix(T a, T z, const Policy& pol)
934
+ {
935
+ BOOST_MATH_STD_USING
936
+
937
+ if (z > tools::max_value<T>() || (a > 0 && z == 0))
938
+ return 0;
939
+
940
+ T alz = a * log(z);
941
+
942
+ T prefix { };
943
+
944
+ if(z >= 1)
945
+ {
946
+ if((alz < tools::log_max_value<T>()) && (-z > tools::log_min_value<T>()))
947
+ {
948
+ prefix = pow(z, a) * exp(-z);
949
+ }
950
+ else if(a >= 1)
951
+ {
952
+ prefix = pow(T(z / exp(z/a)), a);
953
+ }
954
+ else
955
+ {
956
+ prefix = exp(alz - z); // LCOV_EXCL_LINE defensive programming, can probably never get here?
957
+ }
958
+ }
959
+ else
960
+ {
961
+ if(alz > tools::log_min_value<T>())
962
+ {
963
+ prefix = pow(z, a) * exp(-z);
964
+ }
965
+ // LCOV_EXCL_START
966
+ // Defensive programming, can probably never get here, very hard to prove though!
967
+ else if(z/a < tools::log_max_value<T>())
968
+ {
969
+ prefix = pow(T(z / exp(z/a)), a);
970
+ }
971
+ else
972
+ {
973
+ prefix = exp(alz - z);
974
+ }
975
+ // LCOV_EXCL_STOP
976
+ }
977
+ //
978
+ // This error handling isn't very good: it happens after the fact
979
+ // rather than before it...
980
+ // Typically though this method is used when the result is small, we should probably not overflow here...
981
+ //
982
+ if((boost::math::fpclassify)(prefix) == (int)BOOST_MATH_FP_INFINITE)
983
+ return policies::raise_overflow_error<T>("boost::math::detail::full_igamma_prefix<%1%>(%1%, %1%)", "Result of incomplete gamma function is too large to represent.", pol); // LCOV_EXCL_LINE
984
+
985
+ return prefix;
986
+ }
987
+ //
988
+ // Compute (z^a)(e^-z)/tgamma(a)
989
+ // most if the error occurs in this function:
990
+ //
991
+ template <class T, class Policy, class Lanczos>
992
+ BOOST_MATH_GPU_ENABLED T regularised_gamma_prefix(T a, T z, const Policy& pol, const Lanczos& l)
993
+ {
994
+ BOOST_MATH_STD_USING
995
+ if (z >= tools::max_value<T>() || (a > 0 && z == 0))
996
+ return 0;
997
+ T agh = a + static_cast<T>(Lanczos::g()) - T(0.5);
998
+ T prefix{};
999
+ T d = ((z - a) - static_cast<T>(Lanczos::g()) + T(0.5)) / agh;
1000
+
1001
+ if(a < 1)
1002
+ {
1003
+ //
1004
+ // We have to treat a < 1 as a special case because our Lanczos
1005
+ // approximations are optimised against the factorials with a > 1,
1006
+ // and for high precision types especially (128-bit reals for example)
1007
+ // very small values of a can give rather erroneous results for gamma
1008
+ // unless we do this:
1009
+ //
1010
+ // TODO: is this still required? Lanczos approx should be better now?
1011
+ //
1012
+ if((z <= tools::log_min_value<T>()) || (a < 1 / tools::max_value<T>()))
1013
+ {
1014
+ // Oh dear, have to use logs, should be free of cancellation errors though:
1015
+ return exp(a * log(z) - z - lgamma_imp(a, pol, l));
1016
+ }
1017
+ else
1018
+ {
1019
+ // direct calculation, no danger of overflow as gamma(a) < 1/a
1020
+ // for small a.
1021
+ return pow(z, a) * exp(-z) / gamma_imp(a, pol, l);
1022
+ }
1023
+ }
1024
+ else if((fabs(d*d*a) <= 100) && (a > 150))
1025
+ {
1026
+ // special case for large a and a ~ z.
1027
+ prefix = a * boost::math::log1pmx(d, pol) + z * static_cast<T>(0.5 - Lanczos::g()) / agh;
1028
+ prefix = exp(prefix);
1029
+ }
1030
+ else
1031
+ {
1032
+ //
1033
+ // general case.
1034
+ // direct computation is most accurate, but use various fallbacks
1035
+ // for different parts of the problem domain:
1036
+ //
1037
+ T alz = a * log(z / agh);
1038
+ T amz = a - z;
1039
+ if((BOOST_MATH_GPU_SAFE_MIN(alz, amz) <= tools::log_min_value<T>()) || (BOOST_MATH_GPU_SAFE_MAX(alz, amz) >= tools::log_max_value<T>()))
1040
+ {
1041
+ T amza = amz / a;
1042
+ if((BOOST_MATH_GPU_SAFE_MIN(alz, amz)/2 > tools::log_min_value<T>()) && (BOOST_MATH_GPU_SAFE_MAX(alz, amz)/2 < tools::log_max_value<T>()))
1043
+ {
1044
+ // compute square root of the result and then square it:
1045
+ T sq = pow(z / agh, a / 2) * exp(amz / 2);
1046
+ prefix = sq * sq;
1047
+ }
1048
+ else if((BOOST_MATH_GPU_SAFE_MIN(alz, amz)/4 > tools::log_min_value<T>()) && (BOOST_MATH_GPU_SAFE_MAX(alz, amz)/4 < tools::log_max_value<T>()) && (z > a))
1049
+ {
1050
+ // compute the 4th root of the result then square it twice:
1051
+ T sq = pow(z / agh, a / 4) * exp(amz / 4);
1052
+ prefix = sq * sq;
1053
+ prefix *= prefix;
1054
+ }
1055
+ else if((amza > tools::log_min_value<T>()) && (amza < tools::log_max_value<T>()))
1056
+ {
1057
+ prefix = pow(T((z * exp(amza)) / agh), a);
1058
+ }
1059
+ else
1060
+ {
1061
+ prefix = exp(alz + amz);
1062
+ }
1063
+ }
1064
+ else
1065
+ {
1066
+ prefix = pow(T(z / agh), a) * exp(amz);
1067
+ }
1068
+ }
1069
+ prefix *= sqrt(agh / boost::math::constants::e<T>()) / Lanczos::lanczos_sum_expG_scaled(a);
1070
+ return prefix;
1071
+ }
1072
+
1073
+ #ifndef BOOST_MATH_HAS_GPU_SUPPORT
1074
+
1075
+ //
1076
+ // And again, without Lanczos support:
1077
+ //
1078
+ template <class T, class Policy>
1079
+ T regularised_gamma_prefix(T a, T z, const Policy& pol, const lanczos::undefined_lanczos& l)
1080
+ {
1081
+ BOOST_MATH_STD_USING
1082
+
1083
+ if((a < 1) && (z < 1))
1084
+ {
1085
+ // No overflow possible since the power terms tend to unity as a,z -> 0
1086
+ return pow(z, a) * exp(-z) / boost::math::tgamma(a, pol);
1087
+ }
1088
+ else if(a > minimum_argument_for_bernoulli_recursion<T>())
1089
+ {
1090
+ T scaled_gamma = scaled_tgamma_no_lanczos(a, pol);
1091
+ T power_term = pow(z / a, a / 2);
1092
+ T a_minus_z = a - z;
1093
+ if ((0 == power_term) || (fabs(a_minus_z) > tools::log_max_value<T>()))
1094
+ {
1095
+ // The result is probably zero, but we need to be sure:
1096
+ return exp(a * log(z / a) + a_minus_z - log(scaled_gamma));
1097
+ }
1098
+ return (power_term * exp(a_minus_z)) * (power_term / scaled_gamma);
1099
+ }
1100
+ else
1101
+ {
1102
+ //
1103
+ // Usual case is to calculate the prefix at a+shift and recurse down
1104
+ // to the value we want:
1105
+ //
1106
+ const int min_z = minimum_argument_for_bernoulli_recursion<T>();
1107
+ long shift = 1 + ltrunc(min_z - a);
1108
+ T result = regularised_gamma_prefix(T(a + shift), z, pol, l);
1109
+ if (result != 0)
1110
+ {
1111
+ for (long i = 0; i < shift; ++i)
1112
+ {
1113
+ result /= z;
1114
+ result *= a + i;
1115
+ }
1116
+ return result;
1117
+ }
1118
+ else
1119
+ {
1120
+ //
1121
+ // We failed, most probably we have z << 1, try again, this time
1122
+ // we calculate z^a e^-z / tgamma(a+shift), combining power terms
1123
+ // as we go. And again recurse down to the result.
1124
+ //
1125
+ T scaled_gamma = scaled_tgamma_no_lanczos(T(a + shift), pol);
1126
+ T power_term_1 = pow(T(z / (a + shift)), a);
1127
+ T power_term_2 = pow(T(a + shift), T(-shift));
1128
+ T power_term_3 = exp(a + shift - z);
1129
+ if ((0 == power_term_1) || (0 == power_term_2) || (0 == power_term_3) || (fabs(a + shift - z) > tools::log_max_value<T>()))
1130
+ {
1131
+ // We have no test case that gets here, most likely the type T
1132
+ // has a high precision but low exponent range:
1133
+ return exp(a * log(z) - z - boost::math::lgamma(a, pol));
1134
+ }
1135
+ result = power_term_1 * power_term_2 * power_term_3 / scaled_gamma;
1136
+ for (long i = 0; i < shift; ++i)
1137
+ {
1138
+ result *= a + i;
1139
+ }
1140
+ return result;
1141
+ }
1142
+ }
1143
+ }
1144
+
1145
+ #endif // BOOST_MATH_HAS_GPU_SUPPORT
1146
+
1147
+ //
1148
+ // Upper gamma fraction for very small a:
1149
+ //
1150
+ template <class T, class Policy>
1151
+ BOOST_MATH_GPU_ENABLED inline T tgamma_small_upper_part(T a, T x, const Policy& pol, T* pgam = 0, bool invert = false, T* pderivative = 0)
1152
+ {
1153
+ BOOST_MATH_STD_USING // ADL of std functions.
1154
+ //
1155
+ // Compute the full upper fraction (Q) when a is very small:
1156
+ //
1157
+
1158
+ #ifdef BOOST_MATH_HAS_NVRTC
1159
+ typedef typename tools::promote_args<T>::type result_type;
1160
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
1161
+ typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
1162
+ T result {detail::tgammap1m1_imp(static_cast<value_type>(a), pol, evaluation_type())};
1163
+ #else
1164
+ T result { boost::math::tgamma1pm1(a, pol) };
1165
+ #endif
1166
+
1167
+ if(pgam)
1168
+ *pgam = (result + 1) / a;
1169
+ T p = boost::math::powm1(x, a, pol);
1170
+ result -= p;
1171
+ result /= a;
1172
+ detail::small_gamma2_series<T> s(a, x);
1173
+ boost::math::uintmax_t max_iter = policies::get_max_series_iterations<Policy>() - 10;
1174
+ p += 1;
1175
+ if(pderivative)
1176
+ *pderivative = p / (*pgam * exp(x));
1177
+ T init_value = invert ? *pgam : 0;
1178
+ result = -p * tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter, (init_value - result) / p);
1179
+ policies::check_series_iterations<T>("boost::math::tgamma_small_upper_part<%1%>(%1%, %1%)", max_iter, pol);
1180
+ if(invert)
1181
+ result = -result;
1182
+ return result;
1183
+ }
1184
+ //
1185
+ // Upper gamma fraction for integer a:
1186
+ //
1187
+ template <class T, class Policy>
1188
+ BOOST_MATH_GPU_ENABLED inline T finite_gamma_q(T a, T x, Policy const& pol, T* pderivative = 0)
1189
+ {
1190
+ //
1191
+ // Calculates normalised Q when a is an integer:
1192
+ //
1193
+ BOOST_MATH_STD_USING
1194
+ T e = exp(-x);
1195
+ T sum = e;
1196
+ if(sum != 0)
1197
+ {
1198
+ T term = sum;
1199
+ for(unsigned n = 1; n < a; ++n)
1200
+ {
1201
+ term /= n;
1202
+ term *= x;
1203
+ sum += term;
1204
+ }
1205
+ }
1206
+ if(pderivative)
1207
+ {
1208
+ *pderivative = e * pow(x, a) / boost::math::unchecked_factorial<T>(itrunc(T(a - 1), pol));
1209
+ }
1210
+ return sum;
1211
+ }
1212
+ //
1213
+ // Upper gamma fraction for half integer a:
1214
+ //
1215
+ template <class T, class Policy>
1216
+ BOOST_MATH_GPU_ENABLED T finite_half_gamma_q(T a, T x, T* p_derivative, const Policy& pol)
1217
+ {
1218
+ //
1219
+ // Calculates normalised Q when a is a half-integer:
1220
+ //
1221
+ BOOST_MATH_STD_USING
1222
+
1223
+ #ifdef BOOST_MATH_HAS_NVRTC
1224
+ T e;
1225
+ if (boost::math::is_same_v<T, float>)
1226
+ {
1227
+ e = ::erfcf(::sqrtf(x));
1228
+ }
1229
+ else
1230
+ {
1231
+ e = ::erfc(::sqrt(x));
1232
+ }
1233
+ #else
1234
+ T e = boost::math::erfc(sqrt(x), pol);
1235
+ #endif
1236
+
1237
+ if((e != 0) && (a > 1))
1238
+ {
1239
+ T term = exp(-x) / sqrt(constants::pi<T>() * x);
1240
+ term *= x;
1241
+ static const T half = T(1) / 2; // LCOV_EXCL_LINE
1242
+ term /= half;
1243
+ T sum = term;
1244
+ for(unsigned n = 2; n < a; ++n)
1245
+ {
1246
+ term /= n - half;
1247
+ term *= x;
1248
+ sum += term;
1249
+ }
1250
+ e += sum;
1251
+ if(p_derivative)
1252
+ {
1253
+ *p_derivative = 0;
1254
+ }
1255
+ }
1256
+ else if(p_derivative)
1257
+ {
1258
+ // We'll be dividing by x later, so calculate derivative * x:
1259
+ *p_derivative = sqrt(x) * exp(-x) / constants::root_pi<T>();
1260
+ }
1261
+ return e;
1262
+ }
1263
+ //
1264
+ // Asymptotic approximation for large argument, see: https://dlmf.nist.gov/8.11#E2
1265
+ //
1266
+ template <class T>
1267
+ struct incomplete_tgamma_large_x_series
1268
+ {
1269
+ typedef T result_type;
1270
+ BOOST_MATH_GPU_ENABLED incomplete_tgamma_large_x_series(const T& a, const T& x)
1271
+ : a_poch(a - 1), z(x), term(1) {}
1272
+ BOOST_MATH_GPU_ENABLED T operator()()
1273
+ {
1274
+ T result = term;
1275
+ term *= a_poch / z;
1276
+ a_poch -= 1;
1277
+ return result;
1278
+ }
1279
+ T a_poch, z, term;
1280
+ };
1281
+
1282
+ template <class T, class Policy>
1283
+ BOOST_MATH_GPU_ENABLED T incomplete_tgamma_large_x(const T& a, const T& x, const Policy& pol)
1284
+ {
1285
+ BOOST_MATH_STD_USING
1286
+ incomplete_tgamma_large_x_series<T> s(a, x);
1287
+ boost::math::uintmax_t max_iter = boost::math::policies::get_max_series_iterations<Policy>();
1288
+ T result = boost::math::tools::sum_series(s, boost::math::policies::get_epsilon<T, Policy>(), max_iter);
1289
+ boost::math::policies::check_series_iterations<T>("boost::math::tgamma<%1%>(%1%,%1%)", max_iter, pol);
1290
+ return result;
1291
+ }
1292
+
1293
+ //
1294
+ // Main incomplete gamma entry point, handles all four incomplete gamma's:
1295
+ //
1296
+ template <class T, class Policy>
1297
+ BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp_final(T a, T x, bool normalised, bool invert,
1298
+ const Policy& pol, T* p_derivative)
1299
+ {
1300
+ BOOST_MATH_STD_USING
1301
+
1302
+ typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
1303
+
1304
+ T result = 0; // Just to avoid warning C4701: potentially uninitialized local variable 'result' used
1305
+
1306
+ BOOST_MATH_ASSERT((p_derivative == nullptr) || normalised);
1307
+
1308
+ bool is_int, is_half_int;
1309
+ bool is_small_a = (a < 30) && (a <= x + 1) && (x < tools::log_max_value<T>());
1310
+ if(is_small_a)
1311
+ {
1312
+ T fa = floor(a);
1313
+ is_int = (fa == a);
1314
+ is_half_int = is_int ? false : (fabs(fa - a) == 0.5f);
1315
+ }
1316
+ else
1317
+ {
1318
+ is_int = is_half_int = false;
1319
+ }
1320
+
1321
+ int eval_method;
1322
+
1323
+ if (x == 0)
1324
+ {
1325
+ eval_method = 2;
1326
+ }
1327
+ else if(is_int && (x > 0.6))
1328
+ {
1329
+ // calculate Q via finite sum:
1330
+ invert = !invert;
1331
+ eval_method = 0;
1332
+ }
1333
+ else if(is_half_int && (x > 0.2))
1334
+ {
1335
+ // calculate Q via finite sum for half integer a:
1336
+ invert = !invert;
1337
+ eval_method = 1;
1338
+ }
1339
+ else if((x < tools::root_epsilon<T>()) && (a > 1))
1340
+ {
1341
+ eval_method = 6;
1342
+ }
1343
+ else if ((x > 1000) && ((a < x) || (fabs(a - 50) / x < 1)))
1344
+ {
1345
+ // calculate Q via asymptotic approximation:
1346
+ invert = !invert;
1347
+ eval_method = 7;
1348
+ }
1349
+ else if(x < T(0.5))
1350
+ {
1351
+ //
1352
+ // Changeover criterion chosen to give a changeover at Q ~ 0.33
1353
+ //
1354
+ if(T(-0.4) / log(x) < a)
1355
+ {
1356
+ eval_method = 2;
1357
+ }
1358
+ else
1359
+ {
1360
+ eval_method = 3;
1361
+ }
1362
+ }
1363
+ else if(x < T(1.1))
1364
+ {
1365
+ //
1366
+ // Changeover here occurs when P ~ 0.75 or Q ~ 0.25:
1367
+ //
1368
+ if(x * 0.75f < a)
1369
+ {
1370
+ eval_method = 2;
1371
+ }
1372
+ else
1373
+ {
1374
+ eval_method = 3;
1375
+ }
1376
+ }
1377
+ else
1378
+ {
1379
+ //
1380
+ // Begin by testing whether we're in the "bad" zone
1381
+ // where the result will be near 0.5 and the usual
1382
+ // series and continued fractions are slow to converge:
1383
+ //
1384
+ bool use_temme = false;
1385
+ if(normalised && boost::math::numeric_limits<T>::is_specialized && (a > 20))
1386
+ {
1387
+ T sigma = fabs((x-a)/a);
1388
+ if((a > 200) && (policies::digits<T, Policy>() <= 113))
1389
+ {
1390
+ //
1391
+ // This limit is chosen so that we use Temme's expansion
1392
+ // only if the result would be larger than about 10^-6.
1393
+ // Below that the regular series and continued fractions
1394
+ // converge OK, and if we use Temme's method we get increasing
1395
+ // errors from the dominant erfc term as it's (inexact) argument
1396
+ // increases in magnitude.
1397
+ //
1398
+ if(20 / a > sigma * sigma)
1399
+ use_temme = true;
1400
+ }
1401
+ else if(policies::digits<T, Policy>() <= 64)
1402
+ {
1403
+ // Note in this zone we can't use Temme's expansion for
1404
+ // types longer than an 80-bit real:
1405
+ // it would require too many terms in the polynomials.
1406
+ if(sigma < 0.4)
1407
+ use_temme = true;
1408
+ }
1409
+ }
1410
+ if(use_temme)
1411
+ {
1412
+ eval_method = 5;
1413
+ }
1414
+ else
1415
+ {
1416
+ //
1417
+ // Regular case where the result will not be too close to 0.5.
1418
+ //
1419
+ // Changeover here occurs at P ~ Q ~ 0.5
1420
+ // Note that series computation of P is about x2 faster than continued fraction
1421
+ // calculation of Q, so try and use the CF only when really necessary, especially
1422
+ // for small x.
1423
+ //
1424
+ if(x - (1 / (3 * x)) < a)
1425
+ {
1426
+ eval_method = 2;
1427
+ }
1428
+ else
1429
+ {
1430
+ eval_method = 4;
1431
+ invert = !invert;
1432
+ }
1433
+ }
1434
+ }
1435
+
1436
+ switch(eval_method)
1437
+ {
1438
+ case 0:
1439
+ {
1440
+ result = finite_gamma_q(a, x, pol, p_derivative);
1441
+ if(!normalised)
1442
+ {
1443
+ #ifdef BOOST_MATH_HAS_NVRTC
1444
+ if (boost::math::is_same_v<T, float>)
1445
+ {
1446
+ result *= ::tgammaf(a);
1447
+ }
1448
+ else
1449
+ {
1450
+ result *= ::tgamma(a);
1451
+ }
1452
+ #else
1453
+ result *= boost::math::tgamma(a, pol);
1454
+ #endif
1455
+ }
1456
+ break;
1457
+ }
1458
+ case 1:
1459
+ {
1460
+ result = finite_half_gamma_q(a, x, p_derivative, pol);
1461
+ if(!normalised)
1462
+ {
1463
+ #ifdef BOOST_MATH_HAS_NVRTC
1464
+ if (boost::math::is_same_v<T, float>)
1465
+ {
1466
+ result *= ::tgammaf(a);
1467
+ }
1468
+ else
1469
+ {
1470
+ result *= ::tgamma(a);
1471
+ }
1472
+ #else
1473
+ result *= boost::math::tgamma(a, pol);
1474
+ #endif
1475
+ }
1476
+ if(p_derivative && (*p_derivative == 0))
1477
+ *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
1478
+ break;
1479
+ }
1480
+ case 2:
1481
+ {
1482
+ // Compute P:
1483
+ result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
1484
+ if(p_derivative)
1485
+ *p_derivative = result;
1486
+ if(result != 0)
1487
+ {
1488
+ //
1489
+ // If we're going to be inverting the result then we can
1490
+ // reduce the number of series evaluations by quite
1491
+ // a few iterations if we set an initial value for the
1492
+ // series sum based on what we'll end up subtracting it from
1493
+ // at the end.
1494
+ // Have to be careful though that this optimization doesn't
1495
+ // lead to spurious numeric overflow. Note that the
1496
+ // scary/expensive overflow checks below are more often
1497
+ // than not bypassed in practice for "sensible" input
1498
+ // values:
1499
+ //
1500
+ T init_value = 0;
1501
+ bool optimised_invert = false;
1502
+ if(invert)
1503
+ {
1504
+ #ifdef BOOST_MATH_HAS_NVRTC
1505
+ if (boost::math::is_same_v<T, float>)
1506
+ {
1507
+ init_value = (normalised ? T(1) : ::tgammaf(a));
1508
+ }
1509
+ else
1510
+ {
1511
+ init_value = (normalised ? T(1) : ::tgamma(a));
1512
+ }
1513
+ #else
1514
+ init_value = (normalised ? T(1) : boost::math::tgamma(a, pol));
1515
+ #endif
1516
+
1517
+ if(normalised || (result >= 1) || (tools::max_value<T>() * result > init_value))
1518
+ {
1519
+ init_value /= result;
1520
+ if(normalised || (a < 1) || (tools::max_value<T>() / a > init_value))
1521
+ {
1522
+ init_value *= -a;
1523
+ optimised_invert = true;
1524
+ }
1525
+ else
1526
+ init_value = 0; // LCOV_EXCL_LINE Unreachable for any "sensible" floating point type.
1527
+ }
1528
+ else
1529
+ init_value = 0;
1530
+ }
1531
+ result *= detail::lower_gamma_series(a, x, pol, init_value) / a;
1532
+ if(optimised_invert)
1533
+ {
1534
+ invert = false;
1535
+ result = -result;
1536
+ }
1537
+ }
1538
+ break;
1539
+ }
1540
+ case 3:
1541
+ {
1542
+ // Compute Q:
1543
+ invert = !invert;
1544
+ T g{};
1545
+ result = tgamma_small_upper_part(a, x, pol, &g, invert, p_derivative);
1546
+ invert = false;
1547
+ if(normalised)
1548
+ result /= g;
1549
+ break;
1550
+ }
1551
+ case 4:
1552
+ {
1553
+ // Compute Q:
1554
+ result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
1555
+ if(p_derivative)
1556
+ *p_derivative = result;
1557
+ if(result != 0)
1558
+ result *= upper_gamma_fraction(a, x, policies::get_epsilon<T, Policy>());
1559
+ break;
1560
+ }
1561
+ case 5:
1562
+ {
1563
+ //
1564
+ // Use compile time dispatch to the appropriate
1565
+ // Temme asymptotic expansion. This may be dead code
1566
+ // if T does not have numeric limits support, or has
1567
+ // too many digits for the most precise version of
1568
+ // these expansions, in that case we'll be calling
1569
+ // an empty function.
1570
+ //
1571
+ typedef typename policies::precision<T, Policy>::type precision_type;
1572
+
1573
+ typedef boost::math::integral_constant<int,
1574
+ precision_type::value <= 0 ? 0 :
1575
+ precision_type::value <= 53 ? 53 :
1576
+ precision_type::value <= 64 ? 64 :
1577
+ precision_type::value <= 113 ? 113 : 0
1578
+ > tag_type;
1579
+
1580
+ result = igamma_temme_large(a, x, pol, tag_type());
1581
+ if(x >= a)
1582
+ invert = !invert;
1583
+ if(p_derivative)
1584
+ *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
1585
+ break;
1586
+ }
1587
+ case 6:
1588
+ {
1589
+ // x is so small that P is necessarily very small too,
1590
+ // use http://functions.wolfram.com/GammaBetaErf/GammaRegularized/06/01/05/01/01/
1591
+ if(!normalised)
1592
+ result = pow(x, a) / (a);
1593
+ else
1594
+ {
1595
+ #ifndef BOOST_MATH_NO_EXCEPTIONS
1596
+ try
1597
+ {
1598
+ #endif
1599
+ #ifdef BOOST_MATH_HAS_NVRTC
1600
+ if (boost::math::is_same_v<T, float>)
1601
+ {
1602
+ result = ::powf(x, a) / ::tgammaf(a + 1);
1603
+ }
1604
+ else
1605
+ {
1606
+ result = ::pow(x, a) / ::tgamma(a + 1);
1607
+ }
1608
+ #else
1609
+ result = pow(x, a) / boost::math::tgamma(a + 1, pol);
1610
+ #endif
1611
+ #ifndef BOOST_MATH_NO_EXCEPTIONS
1612
+ }
1613
+ catch (const std::overflow_error&)
1614
+ {
1615
+ result = 0;
1616
+ }
1617
+ #endif
1618
+ }
1619
+ result *= 1 - a * x / (a + 1);
1620
+ if (p_derivative)
1621
+ *p_derivative = regularised_gamma_prefix(a, x, pol, lanczos_type());
1622
+ break;
1623
+ }
1624
+ case 7:
1625
+ {
1626
+ // x is large,
1627
+ // Compute Q:
1628
+ result = normalised ? regularised_gamma_prefix(a, x, pol, lanczos_type()) : full_igamma_prefix(a, x, pol);
1629
+ if (p_derivative)
1630
+ *p_derivative = result;
1631
+ result /= x;
1632
+ if (result != 0)
1633
+ result *= incomplete_tgamma_large_x(a, x, pol);
1634
+ break;
1635
+ }
1636
+ }
1637
+
1638
+ if(normalised && (result > 1))
1639
+ result = 1;
1640
+ if(invert)
1641
+ {
1642
+ #ifdef BOOST_MATH_HAS_NVRTC
1643
+ T gam;
1644
+ if (boost::math::is_same_v<T, float>)
1645
+ {
1646
+ gam = normalised ? T(1) : ::tgammaf(a);
1647
+ }
1648
+ else
1649
+ {
1650
+ gam = normalised ? T(1) : ::tgamma(a);
1651
+ }
1652
+ #else
1653
+ T gam = normalised ? T(1) : boost::math::tgamma(a, pol);
1654
+ #endif
1655
+ result = gam - result;
1656
+ }
1657
+ if(p_derivative)
1658
+ {
1659
+ if((x == 0) || ((x < 1) && (tools::max_value<T>() * x < *p_derivative)))
1660
+ {
1661
+ // overflow, just return an arbitrarily large value:
1662
+ *p_derivative = tools::max_value<T>() / 2;
1663
+ }
1664
+ else
1665
+ *p_derivative /= x;
1666
+ }
1667
+
1668
+ return result;
1669
+ }
1670
+
1671
+ // Need to implement this dispatch to avoid recursion for device compilers
1672
+ template <class T, class Policy>
1673
+ BOOST_MATH_GPU_ENABLED T gamma_incomplete_imp(T a, T x, bool normalised, bool invert,
1674
+ const Policy& pol, T* p_derivative)
1675
+ {
1676
+ constexpr auto function = "boost::math::gamma_p<%1%>(%1%, %1%)";
1677
+ if(a <= 0)
1678
+ return policies::raise_domain_error<T>(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
1679
+ if(x < 0)
1680
+ return policies::raise_domain_error<T>(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
1681
+
1682
+ BOOST_MATH_STD_USING
1683
+
1684
+
1685
+ T result = 0; // Just to avoid warning C4701: potentially uninitialized local variable 'result' used
1686
+
1687
+ if(x > 0 && a >= max_factorial<T>::value && !normalised)
1688
+ {
1689
+ //
1690
+ // When we're computing the non-normalized incomplete gamma
1691
+ // and a is large the result is rather hard to compute unless
1692
+ // we use logs. There are really two options - if x is a long
1693
+ // way from a in value then we can reliably use methods 2 and 4
1694
+ // below in logarithmic form and go straight to the result.
1695
+ // Otherwise we let the regularized gamma take the strain
1696
+ // (the result is unlikely to underflow in the central region anyway)
1697
+ // and combine with lgamma in the hopes that we get a finite result.
1698
+ //
1699
+ if(invert && (a * 4 < x))
1700
+ {
1701
+ // This is method 4 below, done in logs:
1702
+ result = a * log(x) - x;
1703
+ BOOST_MATH_ASSERT(p_derivative == nullptr);
1704
+ // Not currently used for non-normalized igamma:
1705
+ //if(p_derivative)
1706
+ // *p_derivative = exp(result);
1707
+ result += log(upper_gamma_fraction(a, x, policies::get_epsilon<T, Policy>()));
1708
+ }
1709
+ else if(!invert && (a > 4 * x))
1710
+ {
1711
+ // This is method 2 below, done in logs:
1712
+ result = a * log(x) - x;
1713
+ BOOST_MATH_ASSERT(p_derivative == nullptr);
1714
+ // Not currently used for non-normalized igamma:
1715
+ //if(p_derivative)
1716
+ // *p_derivative = exp(result);
1717
+ T init_value = 0;
1718
+ result += log(detail::lower_gamma_series(a, x, pol, init_value) / a);
1719
+ }
1720
+ else
1721
+ {
1722
+ result = gamma_incomplete_imp_final(T(a), T(x), true, invert, pol, p_derivative);
1723
+ if(result == 0)
1724
+ {
1725
+ if(invert)
1726
+ {
1727
+ // Try http://functions.wolfram.com/06.06.06.0039.01
1728
+ result = 1 + 1 / (12 * a) + 1 / (288 * a * a);
1729
+ result = log(result) - a + (a - 0.5f) * log(a) + log(boost::math::constants::root_two_pi<T>());
1730
+ BOOST_MATH_ASSERT(p_derivative == nullptr);
1731
+ // Not currently used for non-normalized igamma:
1732
+ //if(p_derivative)
1733
+ // *p_derivative = exp(a * log(x) - x);
1734
+ }
1735
+ else
1736
+ {
1737
+ // This is method 2 below, done in logs, we're really outside the
1738
+ // range of this method, but since the result is almost certainly
1739
+ // infinite, we should probably be OK:
1740
+ result = a * log(x) - x;
1741
+ BOOST_MATH_ASSERT(p_derivative == nullptr);
1742
+ // Not currently used for non-normalized igamma:
1743
+ //if(p_derivative)
1744
+ // *p_derivative = exp(result);
1745
+ T init_value = 0;
1746
+ result += log(detail::lower_gamma_series(a, x, pol, init_value) / a);
1747
+ }
1748
+ }
1749
+ else
1750
+ {
1751
+ #ifdef BOOST_MATH_HAS_NVRTC
1752
+ if (boost::math::is_same_v<T, float>)
1753
+ {
1754
+ result = ::logf(result) + ::lgammaf(a);
1755
+ }
1756
+ else
1757
+ {
1758
+ result = ::log(result) + ::lgamma(a);
1759
+ }
1760
+ #else
1761
+ result = log(result) + boost::math::lgamma(a, pol);
1762
+ #endif
1763
+ }
1764
+ }
1765
+ if(result > tools::log_max_value<T>())
1766
+ return policies::raise_overflow_error<T>(function, nullptr, pol);
1767
+ return exp(result);
1768
+ }
1769
+
1770
+ // If no special handling is required then we proceeds as normal
1771
+ return gamma_incomplete_imp_final(T(a), T(x), normalised, invert, pol, p_derivative);
1772
+ }
1773
+
1774
+ // Calculate log of incomplete gamma function
1775
+ template <class T, class Policy>
1776
+ BOOST_MATH_GPU_ENABLED T lgamma_incomplete_imp(T a, T x, const Policy& pol)
1777
+ {
1778
+ using namespace boost::math; // temporary until we're in the right namespace
1779
+
1780
+ BOOST_MATH_STD_USING_CORE
1781
+
1782
+ // Check for invalid inputs (a < 0 or x < 0)
1783
+ constexpr auto function = "boost::math::lgamma_q<%1%>(%1%, %1%)";
1784
+ if(a <= 0)
1785
+ return policies::raise_domain_error<T>(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
1786
+ if(x < 0)
1787
+ return policies::raise_domain_error<T>(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
1788
+
1789
+ if (((x > 1000) || (x > tools::log_max_value<T>() - 10)) && (a + 50 < x))
1790
+ {
1791
+ //
1792
+ // Take the logarithmic version of the asymtotic expansion:
1793
+ //
1794
+ return log(detail::incomplete_tgamma_large_x(a, x, pol)) + a * log(x) - x - lgamma(a, pol) - log(x);
1795
+ }
1796
+ //
1797
+ // Can't do better than taking the log of Q, but...
1798
+ //
1799
+ // Figure out whether we need P or Q, since if we calculate Q and it's too close to unity
1800
+ // we will lose precision in the result, selection logic here is extracted from gamma_incomplete_imp_final:
1801
+ //
1802
+ bool need_p = false;
1803
+ if ((x < 0.5) && (T(-0.4) / log(x) < a))
1804
+ need_p = true;
1805
+ else if ((x < 1.1) && (x >= 0.5) && (x * 0.75f < a))
1806
+ need_p = true;
1807
+ else if ((x < a) && (x >= 1.1))
1808
+ need_p = true;
1809
+
1810
+ if (need_p)
1811
+ return log1p(-gamma_p(a, x, pol), pol);
1812
+ return log(gamma_q(a, x, pol));
1813
+ }
1814
+
1815
+ // Calculate log of incomplete gamma function
1816
+ template <class T, class Policy>
1817
+ BOOST_MATH_GPU_ENABLED T lgamma_incomplete_lower_imp(T a, T x, const Policy& pol)
1818
+ {
1819
+ using namespace boost::math; // temporary until we're in the right namespace
1820
+
1821
+ BOOST_MATH_STD_USING_CORE
1822
+
1823
+ // Check for invalid inputs (a < 0 or x < 0)
1824
+ constexpr auto function = "boost::math::lgamma_p<%1%>(%1%, %1%)";
1825
+ if(a <= 0)
1826
+ return policies::raise_domain_error<T>(function, "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
1827
+ if(x < 0)
1828
+ return policies::raise_domain_error<T>(function, "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
1829
+
1830
+ // Taken from conditions on Line 1709. There are also
1831
+ // conditions on Line 1368, but didn't implement that one here.
1832
+ // The second condition ensures floats do not return -inf for small
1833
+ // values of x.
1834
+ if (((a > 4 * x) && (a >= max_factorial<T>::value)) || ((T(-0.4) / log(x) < a) && (x < T(1.0)))){
1835
+ return log(detail::lower_gamma_series(a, x, pol)) - log(a) + a * log(x) - x - lgamma(a, pol);
1836
+ }
1837
+
1838
+ //
1839
+ // Can't do better than taking the log of P, but...
1840
+ //
1841
+ // Figure out whether we need P or Q, since if we calculate P and it's too close to unity
1842
+ // we will lose precision in the result, selection logic here is extracted from gamma_incomplete_imp_final:
1843
+ //
1844
+ bool need_p = false;
1845
+ if ((x < 1.1) && (x >= 0.5) && (x * 0.75f < a))
1846
+ need_p = true;
1847
+ else if ((x < a) && (x >= 1.1))
1848
+ need_p = true;
1849
+
1850
+ if (need_p)
1851
+ return log(gamma_p(a, x, pol));
1852
+ return log1p(-gamma_q(a, x, pol), pol);
1853
+ }
1854
+
1855
+ //
1856
+ // Ratios of two gamma functions:
1857
+ //
1858
+ template <class T, class Policy, class Lanczos>
1859
+ BOOST_MATH_GPU_ENABLED T tgamma_delta_ratio_imp_lanczos_final(T z, T delta, const Policy& pol, const Lanczos&)
1860
+ {
1861
+ BOOST_MATH_STD_USING
1862
+
1863
+ T zgh = static_cast<T>(z + T(Lanczos::g()) - constants::half<T>());
1864
+ T result{};
1865
+ if(z + delta == z)
1866
+ {
1867
+ // Given delta < z * eps
1868
+ // and zgh > z
1869
+ // Then this must follow:
1870
+ BOOST_MATH_ASSERT(fabs(delta / zgh) < boost::math::tools::epsilon<T>());
1871
+ // We have:
1872
+ // result = exp((constants::half<T>() - z) * boost::math::log1p(delta / zgh, pol));
1873
+ // 0.5 - z == -z
1874
+ // log1p(delta / zgh) = delta / zgh = delta / z
1875
+ // multiplying we get -delta.
1876
+ result = exp(-delta);
1877
+ }
1878
+ else
1879
+ {
1880
+ if(fabs(delta) < 10)
1881
+ {
1882
+ result = exp((constants::half<T>() - z) * boost::math::log1p(delta / zgh, pol));
1883
+ }
1884
+ else
1885
+ {
1886
+ result = pow(T(zgh / (zgh + delta)), T(z - constants::half<T>()));
1887
+ }
1888
+ // Split the calculation up to avoid spurious overflow:
1889
+ result *= Lanczos::lanczos_sum(z) / Lanczos::lanczos_sum(T(z + delta));
1890
+ }
1891
+ result *= pow(T(constants::e<T>() / (zgh + delta)), delta);
1892
+ return result;
1893
+ }
1894
+
1895
+ template <class T, class Policy, class Lanczos>
1896
+ BOOST_MATH_GPU_ENABLED T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const Lanczos& l)
1897
+ {
1898
+ BOOST_MATH_STD_USING
1899
+
1900
+ if(z < tools::epsilon<T>())
1901
+ {
1902
+ //
1903
+ // We get spurious numeric overflow unless we're very careful, this
1904
+ // can occur either inside Lanczos::lanczos_sum(z) or in the
1905
+ // final combination of terms, to avoid this, split the product up
1906
+ // into 2 (or 3) parts:
1907
+ //
1908
+ // G(z) / G(L) = 1 / (z * G(L)) ; z < eps, L = z + delta = delta
1909
+ // z * G(L) = z * G(lim) * (G(L)/G(lim)) ; lim = largest factorial
1910
+ //
1911
+ if(boost::math::max_factorial<T>::value < delta)
1912
+ {
1913
+ T ratio = tgamma_delta_ratio_imp_lanczos_final(T(delta), T(boost::math::max_factorial<T>::value - delta), pol, l);
1914
+ ratio *= z;
1915
+ ratio *= boost::math::unchecked_factorial<T>(boost::math::max_factorial<T>::value - 1);
1916
+ return 1 / ratio;
1917
+ }
1918
+ else
1919
+ {
1920
+ #ifdef BOOST_MATH_HAS_NVRTC
1921
+ if (boost::math::is_same_v<T, float>)
1922
+ {
1923
+ return 1 / (z * ::tgammaf(z + delta));
1924
+ }
1925
+ else
1926
+ {
1927
+ return 1 / (z * ::tgamma(z + delta));
1928
+ }
1929
+ #else
1930
+ return 1 / (z * boost::math::tgamma(z + delta, pol));
1931
+ #endif
1932
+ }
1933
+ }
1934
+
1935
+ return tgamma_delta_ratio_imp_lanczos_final(T(z), T(delta), pol, l);
1936
+ }
1937
+
1938
+ //
1939
+ // And again without Lanczos support this time:
1940
+ //
1941
+ #ifndef BOOST_MATH_HAS_GPU_SUPPORT
1942
+
1943
+ template <class T, class Policy>
1944
+ T tgamma_delta_ratio_imp_lanczos(T z, T delta, const Policy& pol, const lanczos::undefined_lanczos& l)
1945
+ {
1946
+ BOOST_MATH_STD_USING
1947
+
1948
+ //
1949
+ // We adjust z and delta so that both z and z+delta are large enough for
1950
+ // Sterling's approximation to hold. We can then calculate the ratio
1951
+ // for the adjusted values, and rescale back down to z and z+delta.
1952
+ //
1953
+ // Get the required shifts first:
1954
+ //
1955
+ long numerator_shift = 0;
1956
+ long denominator_shift = 0;
1957
+ const int min_z = minimum_argument_for_bernoulli_recursion<T>();
1958
+
1959
+ if (min_z > z)
1960
+ numerator_shift = 1 + ltrunc(min_z - z);
1961
+ if (min_z > z + delta)
1962
+ denominator_shift = 1 + ltrunc(min_z - z - delta);
1963
+ //
1964
+ // If the shifts are zero, then we can just combine scaled tgamma's
1965
+ // and combine the remaining terms:
1966
+ //
1967
+ if (numerator_shift == 0 && denominator_shift == 0)
1968
+ {
1969
+ T scaled_tgamma_num = scaled_tgamma_no_lanczos(z, pol);
1970
+ T scaled_tgamma_denom = scaled_tgamma_no_lanczos(T(z + delta), pol);
1971
+ T result = scaled_tgamma_num / scaled_tgamma_denom;
1972
+ result *= exp(z * boost::math::log1p(-delta / (z + delta), pol)) * pow(T((delta + z) / constants::e<T>()), -delta);
1973
+ return result;
1974
+ }
1975
+ //
1976
+ // We're going to have to rescale first, get the adjusted z and delta values,
1977
+ // plus the ratio for the adjusted values:
1978
+ //
1979
+ T zz = z + numerator_shift;
1980
+ T dd = delta - (numerator_shift - denominator_shift);
1981
+ T ratio = tgamma_delta_ratio_imp_lanczos(zz, dd, pol, l);
1982
+ //
1983
+ // Use gamma recurrence relations to get back to the original
1984
+ // z and z+delta:
1985
+ //
1986
+ for (long long i = 0; i < numerator_shift; ++i)
1987
+ {
1988
+ ratio /= (z + i);
1989
+ if (i < denominator_shift)
1990
+ ratio *= (z + delta + i);
1991
+ }
1992
+ for (long long i = numerator_shift; i < denominator_shift; ++i)
1993
+ {
1994
+ ratio *= (z + delta + i);
1995
+ }
1996
+ return ratio;
1997
+ }
1998
+
1999
+ #endif
2000
+
2001
+ template <class T, class Policy>
2002
+ BOOST_MATH_GPU_ENABLED T tgamma_delta_ratio_imp(T z, T delta, const Policy& pol)
2003
+ {
2004
+ BOOST_MATH_STD_USING
2005
+
2006
+ if((z <= 0) || (z + delta <= 0))
2007
+ {
2008
+ // This isn't very sophisticated, or accurate, but it does work:
2009
+ #ifdef BOOST_MATH_HAS_NVRTC
2010
+ if (boost::math::is_same_v<T, float>)
2011
+ {
2012
+ return ::tgammaf(z) / ::tgammaf(z + delta);
2013
+ }
2014
+ else
2015
+ {
2016
+ return ::tgamma(z) / ::tgamma(z + delta);
2017
+ }
2018
+ #else
2019
+ return boost::math::tgamma(z, pol) / boost::math::tgamma(z + delta, pol);
2020
+ #endif
2021
+ }
2022
+
2023
+ if(floor(delta) == delta)
2024
+ {
2025
+ if(floor(z) == z)
2026
+ {
2027
+ //
2028
+ // Both z and delta are integers, see if we can just use table lookup
2029
+ // of the factorials to get the result:
2030
+ //
2031
+ if((z <= max_factorial<T>::value) && (z + delta <= max_factorial<T>::value))
2032
+ {
2033
+ return unchecked_factorial<T>((unsigned)itrunc(z, pol) - 1) / unchecked_factorial<T>((unsigned)itrunc(T(z + delta), pol) - 1);
2034
+ }
2035
+ }
2036
+ if(fabs(delta) < 20)
2037
+ {
2038
+ //
2039
+ // delta is a small integer, we can use a finite product:
2040
+ //
2041
+ if(delta == 0)
2042
+ return 1;
2043
+ if(delta < 0)
2044
+ {
2045
+ z -= 1;
2046
+ T result = z;
2047
+ while(0 != (delta += 1))
2048
+ {
2049
+ z -= 1;
2050
+ result *= z;
2051
+ }
2052
+ return result;
2053
+ }
2054
+ else
2055
+ {
2056
+ T result = 1 / z;
2057
+ while(0 != (delta -= 1))
2058
+ {
2059
+ z += 1;
2060
+ result /= z;
2061
+ }
2062
+ return result;
2063
+ }
2064
+ }
2065
+ }
2066
+ typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
2067
+ return tgamma_delta_ratio_imp_lanczos(z, delta, pol, lanczos_type());
2068
+ }
2069
+
2070
+ template <class T, class Policy>
2071
+ BOOST_MATH_GPU_ENABLED T tgamma_ratio_imp(T x, T y, const Policy& pol)
2072
+ {
2073
+ BOOST_MATH_STD_USING
2074
+
2075
+ if((x <= 0) || (boost::math::isinf)(x))
2076
+ return policies::raise_domain_error<T>("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got a=%1%).", x, pol);
2077
+ if((y <= 0) || (boost::math::isinf)(y))
2078
+ return policies::raise_domain_error<T>("boost::math::tgamma_ratio<%1%>(%1%, %1%)", "Gamma function ratios only implemented for positive arguments (got b=%1%).", y, pol);
2079
+
2080
+ // We don't need to worry about the denorm case on device
2081
+ // And this has the added bonus of removing recursion
2082
+ #ifndef BOOST_MATH_HAS_GPU_SUPPORT
2083
+ if(x <= tools::min_value<T>())
2084
+ {
2085
+ // Special case for denorms...Ugh.
2086
+ T shift = ldexp(T(1), tools::digits<T>());
2087
+ return shift * tgamma_ratio_imp(T(x * shift), y, pol);
2088
+ }
2089
+ #endif
2090
+
2091
+ if((x < max_factorial<T>::value) && (y < max_factorial<T>::value))
2092
+ {
2093
+ // Rather than subtracting values, lets just call the gamma functions directly:
2094
+ #ifdef BOOST_MATH_HAS_NVRTC
2095
+ if (boost::math::is_same_v<T, float>)
2096
+ {
2097
+ return ::tgammaf(x) / ::tgammaf(y);
2098
+ }
2099
+ else
2100
+ {
2101
+ return ::tgamma(x) / ::tgamma(y);
2102
+ }
2103
+ #else
2104
+ return boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol);
2105
+ #endif
2106
+ }
2107
+ T prefix = 1;
2108
+ if(x < 1)
2109
+ {
2110
+ if(y < 2 * max_factorial<T>::value)
2111
+ {
2112
+ // We need to sidestep on x as well, otherwise we'll underflow
2113
+ // before we get to factor in the prefix term:
2114
+ prefix /= x;
2115
+ x += 1;
2116
+ while(y >= max_factorial<T>::value)
2117
+ {
2118
+ y -= 1;
2119
+ prefix /= y;
2120
+ }
2121
+
2122
+ #ifdef BOOST_MATH_HAS_NVRTC
2123
+ if (boost::math::is_same_v<T, float>)
2124
+ {
2125
+ return prefix * ::tgammaf(x) / ::tgammaf(y);
2126
+ }
2127
+ else
2128
+ {
2129
+ return prefix * ::tgamma(x) / ::tgamma(y);
2130
+ }
2131
+ #else
2132
+ return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol);
2133
+ #endif
2134
+ }
2135
+ //
2136
+ // result is almost certainly going to underflow to zero, try logs just in case:
2137
+ //
2138
+ #ifdef BOOST_MATH_HAS_NVRTC
2139
+ if (boost::math::is_same_v<T, float>)
2140
+ {
2141
+ return ::expf(::lgammaf(x) - ::lgammaf(y));
2142
+ }
2143
+ else
2144
+ {
2145
+ return ::exp(::lgamma(x) - ::lgamma(y));
2146
+ }
2147
+ #else
2148
+ return exp(boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol));
2149
+ #endif
2150
+ }
2151
+ if(y < 1)
2152
+ {
2153
+ if(x < 2 * max_factorial<T>::value)
2154
+ {
2155
+ // We need to sidestep on y as well, otherwise we'll overflow
2156
+ // before we get to factor in the prefix term:
2157
+ prefix *= y;
2158
+ y += 1;
2159
+ while(x >= max_factorial<T>::value)
2160
+ {
2161
+ x -= 1;
2162
+ prefix *= x;
2163
+ }
2164
+
2165
+ #ifdef BOOST_MATH_HAS_NVRTC
2166
+ if (boost::math::is_same_v<T, float>)
2167
+ {
2168
+ return prefix * ::tgammaf(x) / ::tgammaf(y);
2169
+ }
2170
+ else
2171
+ {
2172
+ return prefix * ::tgamma(x) / ::tgamma(y);
2173
+ }
2174
+ #else
2175
+ return prefix * boost::math::tgamma(x, pol) / boost::math::tgamma(y, pol);
2176
+ #endif
2177
+ }
2178
+ //
2179
+ // Result will almost certainly overflow, try logs just in case:
2180
+ //
2181
+ BOOST_MATH_IF_CONSTEXPR(boost::math::is_same<T, float>::value || boost::math::is_same<T, double>::value)
2182
+ {
2183
+ // straight to the scene of the accident, since the result is larger than max_factorial:
2184
+ return policies::raise_overflow_error<T>("tgamma_ratio", nullptr, pol);
2185
+ }
2186
+ else
2187
+ {
2188
+ #ifdef BOOST_MATH_HAS_NVRTC
2189
+ if (boost::math::is_same_v<T, float>)
2190
+ {
2191
+ prefix = ::lgammaf(x) - ::lgammaf(y);
2192
+ }
2193
+ else
2194
+ {
2195
+ prefix = ::lgamma(x) - ::lgamma(y);
2196
+ }
2197
+ #else
2198
+ prefix = boost::math::lgamma(x, pol) - boost::math::lgamma(y, pol);
2199
+ #endif
2200
+ if (prefix > boost::math::tools::log_max_value<T>())
2201
+ return policies::raise_overflow_error<T>("tgamma_ratio", nullptr, pol);
2202
+ //
2203
+ // This is unreachable, unless max_factorial is small compared to the exponent
2204
+ // range of the type, ie multiprecision types only here...
2205
+ //
2206
+ return exp(prefix); // LCOV_EXCL_LINE
2207
+ }
2208
+ }
2209
+ //
2210
+ // Regular case, x and y both large and similar in magnitude:
2211
+ //
2212
+ #ifdef BOOST_MATH_HAS_NVRTC
2213
+ return detail::tgamma_delta_ratio_imp(x, y - x, pol);
2214
+ #else
2215
+ return boost::math::tgamma_delta_ratio(x, y - x, pol);
2216
+ #endif
2217
+ }
2218
+
2219
+ template <class T, class Policy>
2220
+ BOOST_MATH_GPU_ENABLED T gamma_p_derivative_imp(T a, T x, const Policy& pol)
2221
+ {
2222
+ BOOST_MATH_STD_USING
2223
+ //
2224
+ // Usual error checks first:
2225
+ //
2226
+ if(a <= 0)
2227
+ return policies::raise_domain_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument a to the incomplete gamma function must be greater than zero (got a=%1%).", a, pol);
2228
+ if(x < 0)
2229
+ return policies::raise_domain_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", "Argument x to the incomplete gamma function must be >= 0 (got x=%1%).", x, pol);
2230
+ //
2231
+ // Now special cases:
2232
+ //
2233
+ if(x == 0)
2234
+ {
2235
+ return (a > 1) ? T(0) :
2236
+ (a == 1) ? T(1) : policies::raise_overflow_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", nullptr, pol);
2237
+ }
2238
+ //
2239
+ // Normal case:
2240
+ //
2241
+ typedef typename lanczos::lanczos<T, Policy>::type lanczos_type;
2242
+ T f1 = detail::regularised_gamma_prefix(a, x, pol, lanczos_type());
2243
+ /*
2244
+ * Derivative goes to zero as x -> 0, this should be unreachable:
2245
+ *
2246
+ if((x < 1) && (tools::max_value<T>() * x < f1))
2247
+ {
2248
+ // overflow:
2249
+ return policies::raise_overflow_error<T>("boost::math::gamma_p_derivative<%1%>(%1%, %1%)", nullptr, pol);
2250
+ }
2251
+ */
2252
+ if(f1 == 0)
2253
+ {
2254
+ // Underflow in calculation, use logs instead:
2255
+ #ifdef BOOST_MATH_HAS_NVRTC
2256
+ if (boost::math::is_same_v<T, float>)
2257
+ {
2258
+ f1 = a * ::logf(x) - x - ::lgammaf(a) - ::logf(x);
2259
+ }
2260
+ else
2261
+ {
2262
+ f1 = a * ::log(x) - x - ::lgamma(a) - ::log(x);
2263
+ }
2264
+ #else
2265
+ f1 = a * log(x) - x - lgamma(a, pol) - log(x);
2266
+ #endif
2267
+ f1 = exp(f1);
2268
+ }
2269
+ else
2270
+ f1 /= x;
2271
+
2272
+ return f1;
2273
+ }
2274
+
2275
+ template <class T, class Policy>
2276
+ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args<T>::type
2277
+ tgamma(T z, const Policy& /* pol */, const boost::math::true_type)
2278
+ {
2279
+ BOOST_FPU_EXCEPTION_GUARD
2280
+ typedef typename tools::promote_args<T>::type result_type;
2281
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2282
+ typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
2283
+ typedef typename policies::normalise<
2284
+ Policy,
2285
+ policies::promote_float<false>,
2286
+ policies::promote_double<false>,
2287
+ policies::discrete_quantile<>,
2288
+ policies::assert_undefined<> >::type forwarding_policy;
2289
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::gamma_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma<%1%>(%1%)");
2290
+ }
2291
+
2292
+ template <class T1, class T2, class Policy>
2293
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2294
+ tgamma(T1 a, T2 z, const Policy&, const boost::math::false_type)
2295
+ {
2296
+ BOOST_FPU_EXCEPTION_GUARD
2297
+ typedef tools::promote_args_t<T1, T2> result_type;
2298
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2299
+ // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
2300
+ typedef typename policies::normalise<
2301
+ Policy,
2302
+ policies::promote_float<false>,
2303
+ policies::promote_double<false>,
2304
+ policies::discrete_quantile<>,
2305
+ policies::assert_undefined<> >::type forwarding_policy;
2306
+
2307
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
2308
+ detail::gamma_incomplete_imp(static_cast<value_type>(a),
2309
+ static_cast<value_type>(z), false, true,
2310
+ forwarding_policy(), static_cast<value_type*>(nullptr)), "boost::math::tgamma<%1%>(%1%, %1%)");
2311
+ }
2312
+
2313
+ template <class T1, class T2>
2314
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2315
+ tgamma(T1 a, T2 z, const boost::math::false_type& tag)
2316
+ {
2317
+ return tgamma(a, z, policies::policy<>(), tag);
2318
+ }
2319
+
2320
+
2321
+ } // namespace detail
2322
+
2323
+ template <class T, class Policy>
2324
+ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args<T>::type
2325
+ lgamma(T z, int* sign, const Policy&)
2326
+ {
2327
+ BOOST_FPU_EXCEPTION_GUARD
2328
+ typedef typename tools::promote_args<T>::type result_type;
2329
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2330
+ typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
2331
+ typedef typename policies::normalise<
2332
+ Policy,
2333
+ policies::promote_float<false>,
2334
+ policies::promote_double<false>,
2335
+ policies::discrete_quantile<>,
2336
+ policies::assert_undefined<> >::type forwarding_policy;
2337
+
2338
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::lgamma_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type(), sign), "boost::math::lgamma<%1%>(%1%)");
2339
+ }
2340
+
2341
+ template <class T>
2342
+ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args<T>::type
2343
+ lgamma(T z, int* sign)
2344
+ {
2345
+ return lgamma(z, sign, policies::policy<>());
2346
+ }
2347
+
2348
+ template <class T, class Policy>
2349
+ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args<T>::type
2350
+ lgamma(T x, const Policy& pol)
2351
+ {
2352
+ return ::boost::math::lgamma(x, nullptr, pol);
2353
+ }
2354
+
2355
+ template <class T>
2356
+ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args<T>::type
2357
+ lgamma(T x)
2358
+ {
2359
+ return ::boost::math::lgamma(x, nullptr, policies::policy<>());
2360
+ }
2361
+
2362
+ template <class T, class Policy>
2363
+ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args<T>::type
2364
+ tgamma1pm1(T z, const Policy& /* pol */)
2365
+ {
2366
+ BOOST_FPU_EXCEPTION_GUARD
2367
+ typedef typename tools::promote_args<T>::type result_type;
2368
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2369
+ typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
2370
+ typedef typename policies::normalise<
2371
+ Policy,
2372
+ policies::promote_float<false>,
2373
+ policies::promote_double<false>,
2374
+ policies::discrete_quantile<>,
2375
+ policies::assert_undefined<> >::type forwarding_policy;
2376
+
2377
+ return policies::checked_narrowing_cast<typename boost::math::remove_cv<result_type>::type, forwarding_policy>(detail::tgammap1m1_imp(static_cast<value_type>(z), forwarding_policy(), evaluation_type()), "boost::math::tgamma1pm1<%!%>(%1%)");
2378
+ }
2379
+
2380
+ template <class T>
2381
+ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args<T>::type
2382
+ tgamma1pm1(T z)
2383
+ {
2384
+ return tgamma1pm1(z, policies::policy<>());
2385
+ }
2386
+
2387
+ //
2388
+ // Full upper incomplete gamma:
2389
+ //
2390
+ template <class T1, class T2>
2391
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2392
+ tgamma(T1 a, T2 z)
2393
+ {
2394
+ //
2395
+ // Type T2 could be a policy object, or a value, select the
2396
+ // right overload based on T2:
2397
+ //
2398
+ using maybe_policy = typename policies::is_policy<T2>::type;
2399
+ using result_type = tools::promote_args_t<T1, T2>;
2400
+ return static_cast<result_type>(detail::tgamma(a, z, maybe_policy()));
2401
+ }
2402
+ template <class T1, class T2, class Policy>
2403
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2404
+ tgamma(T1 a, T2 z, const Policy& pol)
2405
+ {
2406
+ using result_type = tools::promote_args_t<T1, T2>;
2407
+ return static_cast<result_type>(detail::tgamma(a, z, pol, boost::math::false_type()));
2408
+ }
2409
+ template <class T>
2410
+ BOOST_MATH_GPU_ENABLED inline typename tools::promote_args<T>::type
2411
+ tgamma(T z)
2412
+ {
2413
+ return tgamma(z, policies::policy<>());
2414
+ }
2415
+ //
2416
+ // Full lower incomplete gamma:
2417
+ //
2418
+ template <class T1, class T2, class Policy>
2419
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2420
+ tgamma_lower(T1 a, T2 z, const Policy&)
2421
+ {
2422
+ BOOST_FPU_EXCEPTION_GUARD
2423
+ typedef tools::promote_args_t<T1, T2> result_type;
2424
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2425
+ // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
2426
+ typedef typename policies::normalise<
2427
+ Policy,
2428
+ policies::promote_float<false>,
2429
+ policies::promote_double<false>,
2430
+ policies::discrete_quantile<>,
2431
+ policies::assert_undefined<> >::type forwarding_policy;
2432
+
2433
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
2434
+ detail::gamma_incomplete_imp(static_cast<value_type>(a),
2435
+ static_cast<value_type>(z), false, false,
2436
+ forwarding_policy(), static_cast<value_type*>(nullptr)), "tgamma_lower<%1%>(%1%, %1%)");
2437
+ }
2438
+ template <class T1, class T2>
2439
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2440
+ tgamma_lower(T1 a, T2 z)
2441
+ {
2442
+ return tgamma_lower(a, z, policies::policy<>());
2443
+ }
2444
+ //
2445
+ // Regularised upper incomplete gamma:
2446
+ //
2447
+ template <class T1, class T2, class Policy>
2448
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2449
+ gamma_q(T1 a, T2 z, const Policy& /* pol */)
2450
+ {
2451
+ BOOST_FPU_EXCEPTION_GUARD
2452
+ typedef tools::promote_args_t<T1, T2> result_type;
2453
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2454
+ // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
2455
+ typedef typename policies::normalise<
2456
+ Policy,
2457
+ policies::promote_float<false>,
2458
+ policies::promote_double<false>,
2459
+ policies::discrete_quantile<>,
2460
+ policies::assert_undefined<> >::type forwarding_policy;
2461
+
2462
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
2463
+ detail::gamma_incomplete_imp(static_cast<value_type>(a),
2464
+ static_cast<value_type>(z), true, true,
2465
+ forwarding_policy(), static_cast<value_type*>(nullptr)), "gamma_q<%1%>(%1%, %1%)");
2466
+ }
2467
+ template <class T1, class T2>
2468
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2469
+ gamma_q(T1 a, T2 z)
2470
+ {
2471
+ return gamma_q(a, z, policies::policy<>());
2472
+ }
2473
+
2474
+ template <class T1, class T2, class Policy>
2475
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2> lgamma_q(T1 a, T2 z, const Policy& /* pol */)
2476
+ {
2477
+ typedef tools::promote_args_t<T1, T2> result_type;
2478
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2479
+ typedef typename policies::normalise<
2480
+ Policy,
2481
+ policies::promote_float<false>,
2482
+ policies::promote_double<false>,
2483
+ policies::discrete_quantile<>,
2484
+ policies::assert_undefined<> >::type forwarding_policy;
2485
+
2486
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
2487
+ detail::lgamma_incomplete_imp(static_cast<value_type>(a),
2488
+ static_cast<value_type>(z), forwarding_policy()), "lgamma_q<%1%>(%1%, %1%)");
2489
+ }
2490
+
2491
+ template <class T1, class T2>
2492
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2> lgamma_q(T1 a, T2 z)
2493
+ {
2494
+ return lgamma_q(a, z, policies::policy<>());
2495
+ }
2496
+
2497
+ template <class T1, class T2, class Policy>
2498
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2> lgamma_p(T1 a, T2 z, const Policy& /* pol */)
2499
+ {
2500
+ typedef tools::promote_args_t<T1, T2> result_type;
2501
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2502
+ typedef typename policies::normalise<
2503
+ Policy,
2504
+ policies::promote_float<false>,
2505
+ policies::promote_double<false>,
2506
+ policies::discrete_quantile<>,
2507
+ policies::assert_undefined<> >::type forwarding_policy;
2508
+
2509
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
2510
+ detail::lgamma_incomplete_lower_imp(static_cast<value_type>(a),
2511
+ static_cast<value_type>(z), forwarding_policy()), "lgamma_p<%1%>(%1%, %1%)");
2512
+ }
2513
+
2514
+ template <class T1, class T2>
2515
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2> lgamma_p(T1 a, T2 z)
2516
+ {
2517
+ return lgamma_p(a, z, policies::policy<>());
2518
+ }
2519
+ //
2520
+ // Regularised lower incomplete gamma:
2521
+ //
2522
+ template <class T1, class T2, class Policy>
2523
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2524
+ gamma_p(T1 a, T2 z, const Policy&)
2525
+ {
2526
+ BOOST_FPU_EXCEPTION_GUARD
2527
+ typedef tools::promote_args_t<T1, T2> result_type;
2528
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2529
+ // typedef typename lanczos::lanczos<value_type, Policy>::type evaluation_type;
2530
+ typedef typename policies::normalise<
2531
+ Policy,
2532
+ policies::promote_float<false>,
2533
+ policies::promote_double<false>,
2534
+ policies::discrete_quantile<>,
2535
+ policies::assert_undefined<> >::type forwarding_policy;
2536
+
2537
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(
2538
+ detail::gamma_incomplete_imp(static_cast<value_type>(a),
2539
+ static_cast<value_type>(z), true, false,
2540
+ forwarding_policy(), static_cast<value_type*>(nullptr)), "gamma_p<%1%>(%1%, %1%)");
2541
+ }
2542
+ template <class T1, class T2>
2543
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2544
+ gamma_p(T1 a, T2 z)
2545
+ {
2546
+ return gamma_p(a, z, policies::policy<>());
2547
+ }
2548
+
2549
+ // ratios of gamma functions:
2550
+ template <class T1, class T2, class Policy>
2551
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2552
+ tgamma_delta_ratio(T1 z, T2 delta, const Policy& /* pol */)
2553
+ {
2554
+ BOOST_FPU_EXCEPTION_GUARD
2555
+ typedef tools::promote_args_t<T1, T2> result_type;
2556
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2557
+ typedef typename policies::normalise<
2558
+ Policy,
2559
+ policies::promote_float<false>,
2560
+ policies::promote_double<false>,
2561
+ policies::discrete_quantile<>,
2562
+ policies::assert_undefined<> >::type forwarding_policy;
2563
+
2564
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::tgamma_delta_ratio_imp(static_cast<value_type>(z), static_cast<value_type>(delta), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)");
2565
+ }
2566
+ template <class T1, class T2>
2567
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2568
+ tgamma_delta_ratio(T1 z, T2 delta)
2569
+ {
2570
+ return tgamma_delta_ratio(z, delta, policies::policy<>());
2571
+ }
2572
+ template <class T1, class T2, class Policy>
2573
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2574
+ tgamma_ratio(T1 a, T2 b, const Policy&)
2575
+ {
2576
+ typedef tools::promote_args_t<T1, T2> result_type;
2577
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2578
+ typedef typename policies::normalise<
2579
+ Policy,
2580
+ policies::promote_float<false>,
2581
+ policies::promote_double<false>,
2582
+ policies::discrete_quantile<>,
2583
+ policies::assert_undefined<> >::type forwarding_policy;
2584
+
2585
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::tgamma_ratio_imp(static_cast<value_type>(a), static_cast<value_type>(b), forwarding_policy()), "boost::math::tgamma_delta_ratio<%1%>(%1%, %1%)");
2586
+ }
2587
+ template <class T1, class T2>
2588
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2589
+ tgamma_ratio(T1 a, T2 b)
2590
+ {
2591
+ return tgamma_ratio(a, b, policies::policy<>());
2592
+ }
2593
+
2594
+ template <class T1, class T2, class Policy>
2595
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2596
+ gamma_p_derivative(T1 a, T2 x, const Policy&)
2597
+ {
2598
+ BOOST_FPU_EXCEPTION_GUARD
2599
+ typedef tools::promote_args_t<T1, T2> result_type;
2600
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
2601
+ typedef typename policies::normalise<
2602
+ Policy,
2603
+ policies::promote_float<false>,
2604
+ policies::promote_double<false>,
2605
+ policies::discrete_quantile<>,
2606
+ policies::assert_undefined<> >::type forwarding_policy;
2607
+
2608
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::gamma_p_derivative_imp(static_cast<value_type>(a), static_cast<value_type>(x), forwarding_policy()), "boost::math::gamma_p_derivative<%1%>(%1%, %1%)");
2609
+ }
2610
+ template <class T1, class T2>
2611
+ BOOST_MATH_GPU_ENABLED inline tools::promote_args_t<T1, T2>
2612
+ gamma_p_derivative(T1 a, T2 x)
2613
+ {
2614
+ return gamma_p_derivative(a, x, policies::policy<>());
2615
+ }
2616
+
2617
+ } // namespace math
2618
+ } // namespace boost
2619
+
2620
+ #ifdef _MSC_VER
2621
+ # pragma warning(pop)
2622
+ #endif
2623
+
2624
+ #include <boost/math/special_functions/detail/igamma_inverse.hpp>
2625
+ #include <boost/math/special_functions/detail/gamma_inva.hpp>
2626
+ #include <boost/math/special_functions/erf.hpp>
2627
+
2628
+ #endif // BOOST_MATH_SF_GAMMA_HPP