@lakutata/math 0.0.0-stage → 3.1.5

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 +196 -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 +191 -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,3807 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ // Copyright Christopher Kormanyos 2002 - 2025.
3
+ // Copyright John Maddock 2011 -2025.
4
+ // Distributed under the Boost
5
+ // Software License, Version 1.0. (See accompanying file
6
+ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
+ //
8
+ // This work is based on an earlier work:
9
+ // "Algorithm 910: A Portable C++ Multiple-Precision System for Special-Function Calculations",
10
+ // in ACM TOMS, {VOL 37, ISSUE 4, (February 2011)} (C) ACM, 2011. http://doi.acm.org/10.1145/1916461.1916469
11
+ //
12
+
13
+ #ifndef BOOST_MP_CPP_DEC_FLOAT_HPP
14
+ #define BOOST_MP_CPP_DEC_FLOAT_HPP
15
+
16
+ #include <boost/multiprecision/detail/standalone_config.hpp>
17
+ #include <boost/multiprecision/number.hpp>
18
+ #include <boost/multiprecision/detail/fpclassify.hpp>
19
+ #include <boost/multiprecision/detail/dynamic_array.hpp>
20
+ #include <boost/multiprecision/detail/hash.hpp>
21
+ #include <boost/multiprecision/detail/float128_functions.hpp>
22
+ #include <boost/multiprecision/detail/itos.hpp>
23
+ #include <boost/multiprecision/detail/static_array.hpp>
24
+ #include <boost/multiprecision/detail/tables.hpp>
25
+ #include <boost/multiprecision/detail/no_exceptions_support.hpp>
26
+ #include <boost/multiprecision/detail/assert.hpp>
27
+
28
+ #ifdef BOOST_MP_MATH_AVAILABLE
29
+ //
30
+ // Headers required for Boost.Math integration:
31
+ //
32
+ #include <boost/math/policies/policy.hpp>
33
+ //
34
+ // Some includes we need from Boost.Math, since we rely on that library to provide these functions:
35
+ //
36
+ #include <boost/math/special_functions/acosh.hpp>
37
+ #include <boost/math/special_functions/asinh.hpp>
38
+ #include <boost/math/special_functions/atanh.hpp>
39
+ #include <boost/math/special_functions/cbrt.hpp>
40
+ #include <boost/math/special_functions/expm1.hpp>
41
+ #include <boost/math/special_functions/gamma.hpp>
42
+ #endif
43
+
44
+ #include <algorithm>
45
+ #include <array>
46
+ #include <cmath>
47
+ #include <cstdint>
48
+ #include <cstdlib>
49
+ #include <initializer_list>
50
+ #include <iomanip>
51
+ #include <ios>
52
+ #include <limits>
53
+ #include <locale>
54
+ #include <stdexcept>
55
+ #include <sstream>
56
+ #include <string>
57
+
58
+ #ifdef BOOST_MSVC
59
+ #pragma warning(push)
60
+ #pragma warning(disable : 6326) // comparison of two constants
61
+ #endif
62
+
63
+ namespace boost {
64
+ namespace multiprecision {
65
+
66
+ template <unsigned Digits10, class ExponentType, class Allocator>
67
+ struct number_category<backends::cpp_dec_float<Digits10, ExponentType, Allocator> > : public std::integral_constant<int, number_kind_floating_point>
68
+ {};
69
+
70
+ namespace backends {
71
+
72
+ template <unsigned Digits10, class ExponentType, class Allocator>
73
+ class cpp_dec_float // LCOV_EXCL_LINE This causes a false negative on lcov coverage test.
74
+ {
75
+ private:
76
+ // Perform some static sanity checks.
77
+ static_assert(boost::multiprecision::detail::is_signed<ExponentType>::value,
78
+ "ExponentType must be a signed built in integer type.");
79
+
80
+ static_assert(sizeof(ExponentType) > 1,
81
+ "ExponentType is too small.");
82
+
83
+ static_assert(Digits10 < UINT32_C(0x80000000),
84
+ "Digits10 exceeds the maximum.");
85
+
86
+ // Private class-local constants.
87
+ static constexpr std::int32_t cpp_dec_float_digits10_limit_lo = INT32_C(9);
88
+ static constexpr std::int32_t cpp_dec_float_digits10_limit_hi = static_cast<std::int32_t>((std::numeric_limits<std::int32_t>::max)() - 100);
89
+
90
+ static constexpr std::int32_t cpp_dec_float_elem_digits10 = INT32_C(8);
91
+ static constexpr std::int32_t cpp_dec_float_elem_mask = INT32_C(100000000);
92
+
93
+ static constexpr std::int32_t cpp_dec_float_elems_for_kara = static_cast<std::int32_t>(128 + 1);
94
+
95
+ public:
96
+ using signed_types = std::tuple<long long> ;
97
+ using unsigned_types = std::tuple<unsigned long long>;
98
+ using float_types = std::tuple<double, long double>;
99
+ using exponent_type = ExponentType;
100
+
101
+ // Public class-local constants.
102
+ static constexpr std::int32_t cpp_dec_float_radix = INT32_C(10);
103
+ static constexpr std::int32_t cpp_dec_float_digits10 = ((static_cast<std::int32_t>(Digits10) < cpp_dec_float_digits10_limit_lo) ? cpp_dec_float_digits10_limit_lo : ((static_cast<std::int32_t>(Digits10) > cpp_dec_float_digits10_limit_hi) ? cpp_dec_float_digits10_limit_hi : static_cast<std::int32_t>(Digits10)));
104
+ static constexpr exponent_type cpp_dec_float_max_exp10 = (static_cast<exponent_type>(1) << (std::numeric_limits<exponent_type>::digits - 5));
105
+ static constexpr exponent_type cpp_dec_float_min_exp10 = -cpp_dec_float_max_exp10;
106
+ static constexpr exponent_type cpp_dec_float_max_exp = cpp_dec_float_max_exp10;
107
+ static constexpr exponent_type cpp_dec_float_min_exp = cpp_dec_float_min_exp10;
108
+
109
+ static_assert(cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_max_exp10 == -cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_min_exp10, "Failed exponent range check");
110
+
111
+ static_assert(0 == cpp_dec_float_max_exp10 % cpp_dec_float_elem_digits10, "Failed digit sanity check");
112
+
113
+ private:
114
+ // There are three guard limbs.
115
+ // 1) The first limb has 'play' from 1...8 decimal digits.
116
+ // 2) The last limb also has 'play' from 1...8 decimal digits.
117
+ // 3) One limb can get lost when justifying after multiply.
118
+ static constexpr std::int32_t cpp_dec_float_elem_number = static_cast<std::int32_t>(((Digits10 / cpp_dec_float_elem_digits10) + (((Digits10 % cpp_dec_float_elem_digits10) != 0) ? 1 : 0)) + 3);
119
+
120
+ public:
121
+ static constexpr std::int32_t cpp_dec_float_max_digits10 = static_cast<std::int32_t>(cpp_dec_float_elem_number * cpp_dec_float_elem_digits10);
122
+
123
+ private:
124
+ using array_type =
125
+ typename std::conditional<std::is_void<Allocator>::value,
126
+ detail::static_array <std::uint32_t, static_cast<std::uint32_t>(cpp_dec_float_elem_number)>,
127
+ detail::dynamic_array<std::uint32_t, static_cast<std::uint32_t>(cpp_dec_float_elem_number), Allocator> >::type;
128
+
129
+ typedef enum enum_fpclass_type
130
+ {
131
+ cpp_dec_float_finite,
132
+ cpp_dec_float_inf,
133
+ cpp_dec_float_NaN
134
+ } fpclass_type;
135
+
136
+ array_type data { };
137
+ exponent_type exp { };
138
+ bool neg { };
139
+ fpclass_type fpclass { cpp_dec_float_finite };
140
+ std::int32_t prec_elem { cpp_dec_float_elem_number };
141
+
142
+ // Private constructor from the floating-point class type.
143
+ explicit cpp_dec_float(fpclass_type c) : fpclass(c) { }
144
+
145
+ // Constructor from an initializer_list, an optional
146
+ // (value-aligned) exponent and a Boolean sign.
147
+ static cpp_dec_float from_lst(std::initializer_list<std::uint32_t> lst,
148
+ const exponent_type e = 0,
149
+ const bool n = false)
150
+ {
151
+ cpp_dec_float a;
152
+
153
+ a.data = array_type(lst);
154
+ a.exp = e;
155
+ a.neg = n;
156
+ a.fpclass = cpp_dec_float_finite;
157
+ a.prec_elem = cpp_dec_float_elem_number;
158
+
159
+ return a;
160
+ } // LCOV_EXCL_LINE This causes a false negative on lcov coverage test.
161
+
162
+ public:
163
+ // Public Constructors
164
+ cpp_dec_float() noexcept(noexcept(array_type())) { }
165
+
166
+ cpp_dec_float(const char* s)
167
+ {
168
+ *this = s;
169
+ }
170
+
171
+ template <class I>
172
+ cpp_dec_float(I i, typename std::enable_if<( boost::multiprecision::detail::is_unsigned<I>::value
173
+ && (sizeof(I) <= sizeof(long long)))>::type* = nullptr)
174
+ {
175
+ from_unsigned_long_long(i);
176
+ }
177
+
178
+ template <class I>
179
+ cpp_dec_float(I i,
180
+ typename std::enable_if<( boost::multiprecision::detail::is_signed<I>::value
181
+ && boost::multiprecision::detail::is_integral<I>::value
182
+ && (sizeof(I) <= sizeof(long long)))>::type* = nullptr)
183
+ {
184
+ if (i < 0)
185
+ {
186
+ from_unsigned_long_long(boost::multiprecision::detail::unsigned_abs(i));
187
+ negate();
188
+ }
189
+ else
190
+ from_unsigned_long_long(static_cast<unsigned long long>(i));
191
+ }
192
+
193
+ cpp_dec_float(const cpp_dec_float& f) noexcept(noexcept(array_type(std::declval<const array_type&>())))
194
+ : data(f.data),
195
+ exp(f.exp),
196
+ neg(f.neg),
197
+ fpclass(static_cast<enum_fpclass_type>(static_cast<int>(f.fpclass))),
198
+ prec_elem(f.prec_elem) {}
199
+
200
+ template <unsigned D, class ET, class A>
201
+ cpp_dec_float(const cpp_dec_float<D, ET, A>& f, typename std::enable_if<D <= Digits10>::type* = nullptr)
202
+ : exp(f.exp),
203
+ neg(f.neg),
204
+ fpclass(static_cast<enum_fpclass_type>(static_cast<int>(f.fpclass)))
205
+ {
206
+ std::copy(f.data.begin(), f.data.begin() + f.prec_elem, data.begin());
207
+ }
208
+
209
+ template <unsigned D, class ET, class A>
210
+ explicit cpp_dec_float(const cpp_dec_float<D, ET, A>& f, typename std::enable_if< !(D <= Digits10)>::type* = nullptr)
211
+ : exp(f.exp),
212
+ neg(f.neg),
213
+ fpclass(static_cast<enum_fpclass_type>(static_cast<int>(f.fpclass)))
214
+ {
215
+ // TODO: this doesn't round!
216
+ std::copy(f.data.begin(), f.data.begin() + prec_elem, data.begin());
217
+ }
218
+
219
+ template <class F>
220
+ cpp_dec_float(const F val, typename std::enable_if<std::is_floating_point<F>::value>::type* = nullptr)
221
+ {
222
+ *this = val;
223
+ }
224
+
225
+ cpp_dec_float(const double mantissa, const exponent_type exp10);
226
+
227
+ std::size_t hash() const
228
+ {
229
+ std::size_t result = 0;
230
+ for (int i = 0; i < prec_elem; ++i)
231
+ boost::multiprecision::detail::hash_combine(result, data[i]);
232
+ boost::multiprecision::detail::hash_combine(result, exp, neg, static_cast<std::size_t>(fpclass));
233
+ return result;
234
+ }
235
+
236
+ // Specific special values.
237
+ static const cpp_dec_float& nan () { static const cpp_dec_float val(cpp_dec_float_NaN); return val; }
238
+ static const cpp_dec_float& inf () { static const cpp_dec_float val(cpp_dec_float_inf); return val; }
239
+ static const cpp_dec_float& (max)() { static const cpp_dec_float val(from_lst({ std::uint32_t(1u) }, cpp_dec_float_max_exp10)); return val; }
240
+ static const cpp_dec_float& (min)() { static const cpp_dec_float val(from_lst({ std::uint32_t(1u) }, cpp_dec_float_min_exp10)); return val; }
241
+ static const cpp_dec_float& zero() { static const cpp_dec_float val(from_lst({ std::uint32_t(0u) })); return val; }
242
+ static const cpp_dec_float& one () { static const cpp_dec_float val(from_lst({ std::uint32_t(1u) })); return val; }
243
+ static const cpp_dec_float& two () { static const cpp_dec_float val(from_lst({ std::uint32_t(2u) })); return val; }
244
+ static const cpp_dec_float& half() { static const cpp_dec_float val(from_lst({ std::uint32_t(cpp_dec_float_elem_mask / 2)}, -8)); return val; }
245
+
246
+ static const cpp_dec_float& double_min() { static const cpp_dec_float val((std::numeric_limits<double>::min)()); return val; }
247
+ static const cpp_dec_float& double_max() { static const cpp_dec_float val((std::numeric_limits<double>::max)()); return val; }
248
+
249
+ static const cpp_dec_float& long_double_min()
250
+ {
251
+ #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
252
+ static const cpp_dec_float val(static_cast<long double>((std::numeric_limits<double>::min)()));
253
+ #else
254
+ static const cpp_dec_float val((std::numeric_limits<long double>::min)());
255
+ #endif
256
+ return val;
257
+ }
258
+
259
+ static const cpp_dec_float& long_double_max()
260
+ {
261
+ #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
262
+ static const cpp_dec_float val(static_cast<long double>((std::numeric_limits<double>::max)()));
263
+ #else
264
+ static const cpp_dec_float val((std::numeric_limits<long double>::max)());
265
+ #endif
266
+ return val;
267
+ }
268
+
269
+ static const cpp_dec_float& long_long_max () { static const cpp_dec_float val((std::numeric_limits<long long>::max)()); return val; }
270
+ static const cpp_dec_float& long_long_min () { static const cpp_dec_float val((std::numeric_limits<long long>::min)()); return val; }
271
+ static const cpp_dec_float& ulong_long_max() { static const cpp_dec_float val((std::numeric_limits<unsigned long long>::max)()); return val; }
272
+
273
+ static const cpp_dec_float& eps()
274
+ {
275
+ static const cpp_dec_float val
276
+ (
277
+ from_lst
278
+ (
279
+ {
280
+ (std::uint32_t) detail::pow10_maker((std::uint32_t) ((std::int32_t) (INT32_C(1) + (std::int32_t) (((cpp_dec_float_digits10 / cpp_dec_float_elem_digits10) + ((cpp_dec_float_digits10 % cpp_dec_float_elem_digits10) != 0 ? 1 : 0)) * cpp_dec_float_elem_digits10)) - cpp_dec_float_digits10))
281
+ },
282
+ -(exponent_type) (((cpp_dec_float_digits10 / cpp_dec_float_elem_digits10) + ((cpp_dec_float_digits10 % cpp_dec_float_elem_digits10) != 0 ? 1 : 0)) * cpp_dec_float_elem_digits10)
283
+ )
284
+ );
285
+
286
+ return val;
287
+ }
288
+
289
+ // Basic operations.
290
+ cpp_dec_float& operator=(const cpp_dec_float& v) noexcept(noexcept(std::declval<array_type&>() = std::declval<const array_type&>()))
291
+ {
292
+ data = v.data;
293
+ exp = v.exp;
294
+ neg = v.neg;
295
+ fpclass = v.fpclass;
296
+ prec_elem = v.prec_elem;
297
+ return *this;
298
+ }
299
+
300
+ template <unsigned D>
301
+ cpp_dec_float& operator=(const cpp_dec_float<D>& f)
302
+ {
303
+ exp = f.exp;
304
+ neg = f.neg;
305
+ fpclass = static_cast<enum_fpclass_type>(static_cast<int>(f.fpclass));
306
+ unsigned elems = (std::min)(f.prec_elem, cpp_dec_float_elem_number);
307
+ std::copy(f.data.begin(), f.data.begin() + elems, data.begin());
308
+ std::fill(data.begin() + elems, data.end(), 0);
309
+ prec_elem = cpp_dec_float_elem_number;
310
+ return *this;
311
+ }
312
+
313
+ cpp_dec_float& operator=(long long v)
314
+ {
315
+ if (v < 0)
316
+ {
317
+ from_unsigned_long_long(boost::multiprecision::detail::unsigned_abs(v));
318
+ negate();
319
+ }
320
+ else
321
+ {
322
+ using local_ulonglong_type = typename boost::multiprecision::detail::make_unsigned<long long>::type;
323
+
324
+ from_unsigned_long_long(static_cast<local_ulonglong_type>(v));
325
+ }
326
+ return *this;
327
+ }
328
+
329
+ cpp_dec_float& operator=(unsigned long long v)
330
+ {
331
+ from_unsigned_long_long(v);
332
+ return *this;
333
+ }
334
+ #ifdef BOOST_HAS_INT128
335
+ cpp_dec_float& operator=(int128_type v)
336
+ {
337
+ *this = boost::multiprecision::detail::unsigned_abs(v);
338
+ if (v < 0)
339
+ negate();
340
+ return *this;
341
+ }
342
+
343
+ cpp_dec_float& operator=(uint128_type v)
344
+ {
345
+ using default_ops::eval_add;
346
+ using default_ops::eval_multiply;
347
+
348
+ constexpr unsigned bit_shift = sizeof(unsigned long long) * CHAR_BIT;
349
+ constexpr uint128_type mask = (static_cast<uint128_type>(1u) << bit_shift) - 1;
350
+
351
+ *this = static_cast<unsigned long long>(v & mask);
352
+
353
+ v >>= bit_shift;
354
+
355
+ while (v)
356
+ {
357
+ cpp_dec_float t(static_cast<unsigned long long>(v & mask));
358
+ eval_multiply(t, cpp_dec_float::pow2(bit_shift));
359
+ eval_add(*this, t);
360
+ v >>= bit_shift;
361
+ }
362
+ return *this;
363
+ }
364
+ #endif
365
+
366
+ template <class Float>
367
+ typename std::enable_if<std::is_floating_point<Float>::value, cpp_dec_float&>::type operator=(Float v);
368
+
369
+ cpp_dec_float& operator=(const char* v)
370
+ {
371
+ rd_string(v);
372
+ return *this;
373
+ }
374
+
375
+ cpp_dec_float& operator+=(const cpp_dec_float& v);
376
+ cpp_dec_float& operator-=(const cpp_dec_float& v);
377
+ cpp_dec_float& operator*=(const cpp_dec_float& v);
378
+ cpp_dec_float& operator/=(const cpp_dec_float& v);
379
+
380
+ cpp_dec_float& add_unsigned_long_long(const unsigned long long n)
381
+ {
382
+ cpp_dec_float t;
383
+ t.from_unsigned_long_long(n);
384
+ return *this += t;
385
+ }
386
+
387
+ cpp_dec_float& sub_unsigned_long_long(const unsigned long long n)
388
+ {
389
+ cpp_dec_float t;
390
+ t.from_unsigned_long_long(n);
391
+ return *this -= t;
392
+ }
393
+
394
+ cpp_dec_float& mul_unsigned_long_long(const unsigned long long n);
395
+ cpp_dec_float& div_unsigned_long_long(const unsigned long long n);
396
+
397
+ // Elementary primitives.
398
+ cpp_dec_float& calculate_sqrt();
399
+
400
+ void negate()
401
+ {
402
+ if (!iszero())
403
+ neg = !neg;
404
+ }
405
+
406
+ // Comparison functions
407
+ bool isnan BOOST_PREVENT_MACRO_SUBSTITUTION() const { return (fpclass == cpp_dec_float_NaN); }
408
+ bool isinf BOOST_PREVENT_MACRO_SUBSTITUTION() const { return (fpclass == cpp_dec_float_inf); }
409
+ bool isfinite BOOST_PREVENT_MACRO_SUBSTITUTION() const { return (fpclass == cpp_dec_float_finite); }
410
+
411
+ bool iszero() const
412
+ {
413
+ return ((fpclass == cpp_dec_float_finite) && (data[0u] == 0u));
414
+ }
415
+
416
+ bool isint() const;
417
+ bool isneg() const { return neg; }
418
+
419
+ // Operators pre-increment and pre-decrement
420
+ cpp_dec_float& operator++()
421
+ {
422
+ return *this += one();
423
+ }
424
+
425
+ cpp_dec_float& operator--()
426
+ {
427
+ return *this -= one();
428
+ }
429
+
430
+ std::string str(std::intmax_t digits, std::ios_base::fmtflags f) const;
431
+
432
+ int compare(const cpp_dec_float& v) const;
433
+
434
+ template <class V>
435
+ int compare(const V& v) const
436
+ {
437
+ cpp_dec_float<Digits10, ExponentType, Allocator> t;
438
+ t = v;
439
+ return compare(t);
440
+ }
441
+
442
+ void swap(cpp_dec_float& v)
443
+ {
444
+ data.swap(v.data);
445
+ std::swap(exp, v.exp);
446
+ std::swap(neg, v.neg);
447
+ std::swap(fpclass, v.fpclass);
448
+ std::swap(prec_elem, v.prec_elem);
449
+ }
450
+
451
+ double extract_double() const;
452
+ long double extract_long_double() const;
453
+ long long extract_signed_long_long() const;
454
+ unsigned long long extract_unsigned_long_long() const;
455
+ #ifdef BOOST_HAS_INT128
456
+ int128_type extract_signed_int128() const;
457
+ uint128_type extract_unsigned_int128() const;
458
+ #endif
459
+ void extract_parts(double& mantissa, exponent_type& exponent) const;
460
+ cpp_dec_float extract_integer_part() const;
461
+
462
+ void precision(const std::int32_t prec_digits)
463
+ {
464
+ const std::int32_t elems =
465
+ static_cast<std::int32_t>( static_cast<std::int32_t>(prec_digits / cpp_dec_float_elem_digits10)
466
+ + (((prec_digits % cpp_dec_float_elem_digits10) != 0) ? 1 : 0));
467
+
468
+ prec_elem = (std::min)(cpp_dec_float_elem_number, (std::max)(elems, static_cast<std::int32_t>(2)));
469
+ }
470
+
471
+ static cpp_dec_float pow2(long long i);
472
+
473
+ exponent_type order() const
474
+ {
475
+ const bool
476
+ bo_order_is_zero
477
+ {
478
+ ((!(isfinite)()) || (data[0] == static_cast<std::uint32_t>(0u)))
479
+ };
480
+
481
+ return (bo_order_is_zero ? static_cast<exponent_type>(0)
482
+ : static_cast<exponent_type>(exp + limb_order(data[static_cast<std::size_t>(UINT8_C(0))])));
483
+ }
484
+
485
+ #ifndef BOOST_MP_STANDALONE
486
+ template <class Archive>
487
+ void serialize(Archive& ar, const unsigned int /*version*/)
488
+ {
489
+ for (unsigned i = 0; i < data.size(); ++i)
490
+ ar & boost::make_nvp("digit", data[i]);
491
+
492
+ ar & boost::make_nvp("exponent", exp);
493
+ ar & boost::make_nvp("sign", neg);
494
+ ar & boost::make_nvp("class-type", fpclass);
495
+ ar & boost::make_nvp("precision", prec_elem);
496
+ }
497
+ #endif
498
+
499
+ private:
500
+ static bool data_elem_is_non_zero_predicate(const std::uint32_t& d) { return (d != static_cast<std::uint32_t>(0u)); }
501
+ static bool data_elem_is_non_nine_predicate(const std::uint32_t& d) { return (d != static_cast<std::uint32_t>(cpp_dec_float::cpp_dec_float_elem_mask - 1)); }
502
+ static bool char_is_nonzero_predicate(const char& c) { return (c != static_cast<char>('0')); }
503
+
504
+ // Inversion.
505
+ cpp_dec_float& calculate_inv();
506
+
507
+ static exponent_type limb_order(const limb_type limb)
508
+ {
509
+ //
510
+ // Binary search to find the order of the leading term:
511
+ //
512
+ exponent_type prefix = 0;
513
+
514
+ if (limb >= 100000UL)
515
+ {
516
+ if (limb >= 10000000UL)
517
+ {
518
+ if (limb >= 100000000UL)
519
+ prefix = 8;
520
+ else
521
+ prefix = 7;
522
+ }
523
+ else
524
+ {
525
+ if (limb >= 1000000UL)
526
+ prefix = 6;
527
+ else
528
+ prefix = 5;
529
+ }
530
+ }
531
+ else
532
+ {
533
+ if (limb >= 1000UL)
534
+ {
535
+ if (limb >= 10000UL)
536
+ prefix = 4;
537
+ else
538
+ prefix = 3;
539
+ }
540
+ else
541
+ {
542
+ if (limb >= 100)
543
+ prefix = 2;
544
+ else if (limb >= 10)
545
+ prefix = 1;
546
+ }
547
+ }
548
+
549
+ return prefix;
550
+ }
551
+
552
+ bool isone() const
553
+ {
554
+ bool b_neg;
555
+
556
+ const bool result_one_is_ok = is_one_or_minus_one(&b_neg);
557
+
558
+ return (result_one_is_ok && (!b_neg));
559
+ }
560
+
561
+ bool is_one_or_minus_one(bool* p_sign) const;
562
+
563
+ void from_unsigned_long_long(const unsigned long long u);
564
+
565
+ template <typename InputIteratorTypeLeft,
566
+ typename InputIteratorTypeRight>
567
+ static int compare_ranges(InputIteratorTypeLeft a,
568
+ InputIteratorTypeRight b,
569
+ const std::uint32_t count = cpp_dec_float_elem_number);
570
+
571
+ static std::uint32_t eval_add_n( std::uint32_t* r,
572
+ const std::uint32_t* u,
573
+ const std::uint32_t* v,
574
+ const std::int32_t count);
575
+
576
+ static std::uint32_t eval_subtract_n( std::uint32_t* r,
577
+ const std::uint32_t* u,
578
+ const std::uint32_t* v,
579
+ const std::int32_t count);
580
+
581
+ static void eval_multiply_n_by_n_to_2n( std::uint32_t* r,
582
+ const std::uint32_t* a,
583
+ const std::uint32_t* b,
584
+ const std::uint32_t count);
585
+
586
+ static std::uint32_t mul_loop_n(std::uint32_t* const u, std::uint32_t n, const std::int32_t p);
587
+ static std::uint32_t div_loop_n(std::uint32_t* const u, std::uint32_t n, const std::int32_t p);
588
+
589
+ static void eval_multiply_kara_propagate_carry (std::uint32_t* t, const std::uint32_t n, const std::uint32_t carry);
590
+ static void eval_multiply_kara_propagate_borrow(std::uint32_t* t, const std::uint32_t n, const bool has_borrow);
591
+ static void eval_multiply_kara_n_by_n_to_2n ( std::uint32_t* r,
592
+ const std::uint32_t* a,
593
+ const std::uint32_t* b,
594
+ const std::uint32_t n,
595
+ std::uint32_t* t);
596
+
597
+ template<unsigned D>
598
+ void eval_mul_dispatch_multiplication_method(
599
+ const cpp_dec_float<D, ExponentType, Allocator>& v,
600
+ const std::int32_t prec_elems_for_multiply,
601
+ const typename std::enable_if< (D == Digits10)
602
+ && (cpp_dec_float<D, ExponentType, Allocator>::cpp_dec_float_elem_number < cpp_dec_float_elems_for_kara)>::type* = nullptr)
603
+ {
604
+ // Use school multiplication.
605
+
606
+ using array_for_mul_result_type =
607
+ typename std::conditional<std::is_void<Allocator>::value,
608
+ detail::static_array <std::uint32_t, std::uint32_t(cpp_dec_float_elem_number * 2)>,
609
+ detail::dynamic_array<std::uint32_t, std::uint32_t(cpp_dec_float_elem_number * 2), Allocator> >::type;
610
+
611
+ array_for_mul_result_type result;
612
+
613
+ eval_multiply_n_by_n_to_2n(result.data(), data.data(), v.data.data(), static_cast<std::uint32_t>(prec_elems_for_multiply));
614
+
615
+ // Handle a potential carry.
616
+ if(result[0U] != static_cast<std::uint32_t>(0U))
617
+ {
618
+ exp += static_cast<exponent_type>(cpp_dec_float_elem_digits10);
619
+
620
+ // Shift the result of the multiplication one element to the right.
621
+ std::copy(result.cbegin(),
622
+ result.cbegin() + static_cast<std::ptrdiff_t>(prec_elems_for_multiply),
623
+ data.begin());
624
+ }
625
+ else
626
+ {
627
+ std::copy(result.cbegin() + static_cast<std::ptrdiff_t>(1),
628
+ result.cbegin() + static_cast<std::ptrdiff_t>(1 + (std::min)(prec_elems_for_multiply, cpp_dec_float_elem_number)),
629
+ data.begin());
630
+ }
631
+ }
632
+
633
+ template<unsigned D>
634
+ void eval_mul_dispatch_multiplication_method(
635
+ const cpp_dec_float<D, ExponentType, Allocator>& v,
636
+ const std::int32_t prec_elems_for_multiply,
637
+ const typename std::enable_if< (D == Digits10)
638
+ && !(cpp_dec_float<D, ExponentType, Allocator>::cpp_dec_float_elem_number < cpp_dec_float_elems_for_kara)>::type* = nullptr)
639
+ {
640
+ if(prec_elems_for_multiply < cpp_dec_float_elems_for_kara)
641
+ {
642
+ // Use school multiplication.
643
+
644
+ using array_for_mul_result_type =
645
+ typename std::conditional<std::is_void<Allocator>::value,
646
+ detail::static_array <std::uint32_t, std::uint32_t(cpp_dec_float_elem_number * 2)>,
647
+ detail::dynamic_array<std::uint32_t, std::uint32_t(cpp_dec_float_elem_number * 2), Allocator> >::type;
648
+
649
+ array_for_mul_result_type result;
650
+
651
+ eval_multiply_n_by_n_to_2n(result.data(), data.data(), v.data.data(), static_cast<std::uint32_t>(prec_elems_for_multiply));
652
+
653
+ // Handle a potential carry.
654
+ if(result[0U] != static_cast<std::uint32_t>(0U))
655
+ {
656
+ exp += static_cast<exponent_type>(cpp_dec_float_elem_digits10);
657
+
658
+ // Shift the result of the multiplication one element to the right.
659
+ std::copy(result.cbegin(),
660
+ result.cbegin() + static_cast<std::ptrdiff_t>(prec_elems_for_multiply),
661
+ data.begin());
662
+ }
663
+ else
664
+ {
665
+ std::copy(result.cbegin() + static_cast<std::ptrdiff_t>(1),
666
+ result.cbegin() + static_cast<std::ptrdiff_t>(1 + (std::min)(prec_elems_for_multiply, cpp_dec_float_elem_number)),
667
+ data.begin());
668
+ }
669
+ }
670
+ else
671
+ {
672
+ // Use Karatsuba multiplication.
673
+
674
+ using array_for_kara_tmp_type =
675
+ typename std::conditional<std::is_void<Allocator>::value,
676
+ detail::static_array <std::uint32_t, detail::a029750::a029750_as_constexpr(static_cast<std::uint32_t>(cpp_dec_float_elem_number)) * 8U>,
677
+ detail::dynamic_array<std::uint32_t, detail::a029750::a029750_as_constexpr(static_cast<std::uint32_t>(cpp_dec_float_elem_number)) * 8U, Allocator> >::type;
678
+
679
+ // Sloanes's A029747: Numbers of the form 2^k times 1, 3 or 5.
680
+ const std::uint32_t kara_elems_for_multiply =
681
+ detail::a029750::a029750_as_runtime_value(static_cast<std::uint32_t>(prec_elems_for_multiply));
682
+
683
+ array_for_kara_tmp_type my_kara_mul_pool;
684
+
685
+ std::uint32_t* result = my_kara_mul_pool.data() + (kara_elems_for_multiply * 0U);
686
+ std::uint32_t* t = my_kara_mul_pool.data() + (kara_elems_for_multiply * 2U);
687
+ std::uint32_t* u_local = my_kara_mul_pool.data() + (kara_elems_for_multiply * 6U);
688
+ std::uint32_t* v_local = my_kara_mul_pool.data() + (kara_elems_for_multiply * 7U);
689
+
690
+ std::copy( data.cbegin(), data.cbegin() + prec_elems_for_multiply, u_local);
691
+ std::copy(v.data.cbegin(), v.data.cbegin() + prec_elems_for_multiply, v_local);
692
+
693
+ eval_multiply_kara_n_by_n_to_2n(result,
694
+ u_local,
695
+ v_local,
696
+ kara_elems_for_multiply,
697
+ t);
698
+
699
+ // Handle a potential carry.
700
+ if(result[0U] != static_cast<std::uint32_t>(0U))
701
+ {
702
+ exp += static_cast<exponent_type>(cpp_dec_float_elem_digits10);
703
+
704
+ // Shift the result of the multiplication one element to the right.
705
+ std::copy(result,
706
+ result + static_cast<std::ptrdiff_t>(prec_elems_for_multiply),
707
+ data.begin());
708
+ }
709
+ else
710
+ {
711
+ std::copy(result + static_cast<std::ptrdiff_t>(1),
712
+ result + static_cast<std::ptrdiff_t>(1 + (std::min)(prec_elems_for_multiply, cpp_dec_float_elem_number)),
713
+ data.begin());
714
+ }
715
+ }
716
+ }
717
+
718
+ bool rd_string(const char* const s);
719
+
720
+ template <unsigned D, class ET, class A>
721
+ friend class cpp_dec_float;
722
+ };
723
+
724
+ template <unsigned Digits10, class ExponentType, class Allocator>
725
+ constexpr std::int32_t cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_radix;
726
+ template <unsigned Digits10, class ExponentType, class Allocator>
727
+ constexpr std::int32_t cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_digits10_limit_lo;
728
+ template <unsigned Digits10, class ExponentType, class Allocator>
729
+ constexpr std::int32_t cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_digits10_limit_hi;
730
+ template <unsigned Digits10, class ExponentType, class Allocator>
731
+ constexpr std::int32_t cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_digits10;
732
+ template <unsigned Digits10, class ExponentType, class Allocator>
733
+ constexpr ExponentType cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_max_exp;
734
+ template <unsigned Digits10, class ExponentType, class Allocator>
735
+ constexpr ExponentType cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_min_exp;
736
+ template <unsigned Digits10, class ExponentType, class Allocator>
737
+ constexpr ExponentType cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_max_exp10;
738
+ template <unsigned Digits10, class ExponentType, class Allocator>
739
+ constexpr ExponentType cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_min_exp10;
740
+ template <unsigned Digits10, class ExponentType, class Allocator>
741
+ constexpr std::int32_t cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_elem_digits10;
742
+ template <unsigned Digits10, class ExponentType, class Allocator>
743
+ constexpr std::int32_t cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_elem_number;
744
+ template <unsigned Digits10, class ExponentType, class Allocator>
745
+ constexpr std::int32_t cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_elem_mask;
746
+
747
+ template <unsigned Digits10, class ExponentType, class Allocator>
748
+ cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, ExponentType, Allocator>::operator+=(const cpp_dec_float<Digits10, ExponentType, Allocator>& v)
749
+ {
750
+ if ((isnan)())
751
+ {
752
+ return *this;
753
+ }
754
+
755
+ if ((isinf)())
756
+ {
757
+ if ((v.isinf)() && (isneg() != v.isneg()))
758
+ {
759
+ *this = nan();
760
+ }
761
+ return *this;
762
+ }
763
+
764
+ if (iszero())
765
+ {
766
+ return operator=(v);
767
+ }
768
+
769
+ if ((v.isnan)() || (v.isinf)())
770
+ {
771
+ *this = v;
772
+ return *this;
773
+ }
774
+
775
+ // Get the offset for the add/sub operation.
776
+ constexpr exponent_type max_delta_exp =
777
+ static_cast<exponent_type>((cpp_dec_float_elem_number - 1) * cpp_dec_float_elem_digits10);
778
+
779
+ const exponent_type ofs_exp = static_cast<exponent_type>(exp - v.exp);
780
+
781
+ // Check if the operation is out of range, requiring special handling.
782
+ if (v.iszero() || (ofs_exp > max_delta_exp))
783
+ {
784
+ // Result is *this unchanged since v is negligible compared to *this.
785
+ return *this;
786
+ }
787
+ else if (ofs_exp < -max_delta_exp)
788
+ {
789
+ // Result is *this = v since *this is negligible compared to v.
790
+ return operator=(v);
791
+ }
792
+
793
+ // Do the add/sub operation.
794
+
795
+ typename array_type::pointer p_u = data.data();
796
+ typename array_type::const_pointer p_v = v.data.data();
797
+ bool b_copy = false;
798
+ const std::int32_t ofs = static_cast<std::int32_t>(static_cast<std::int32_t>(ofs_exp) / cpp_dec_float_elem_digits10);
799
+ array_type n_data;
800
+
801
+ if (neg == v.neg)
802
+ {
803
+ // Add v to *this, where the data array of either *this or v
804
+ // might have to be treated with a positive, negative or zero offset.
805
+ // The result is stored in *this. The data are added one element
806
+ // at a time, each element with carry.
807
+ if (ofs >= static_cast<std::int32_t>(0))
808
+ {
809
+ std::copy(v.data.cbegin(), v.data.cend() - static_cast<std::ptrdiff_t>(ofs), n_data.begin() + static_cast<std::ptrdiff_t>(ofs));
810
+ std::fill(n_data.begin(), n_data.begin() + static_cast<std::ptrdiff_t>(ofs), static_cast<std::uint32_t>(0u));
811
+ p_v = n_data.data();
812
+ }
813
+ else
814
+ {
815
+ std::copy(data.cbegin(), data.cend() - static_cast<std::ptrdiff_t>(-ofs), n_data.begin() + static_cast<std::ptrdiff_t>(-ofs));
816
+ std::fill(n_data.begin(), n_data.begin() + static_cast<std::ptrdiff_t>(-ofs), static_cast<std::uint32_t>(0u));
817
+ p_u = n_data.data();
818
+ b_copy = true;
819
+ }
820
+
821
+ // Addition algorithm
822
+ const std::uint32_t carry = eval_add_n(p_u, p_u, p_v, cpp_dec_float_elem_number);
823
+
824
+ if (b_copy)
825
+ {
826
+ data = n_data;
827
+ exp = v.exp;
828
+ }
829
+
830
+ // There needs to be a carry into the element -1 of the array data
831
+ if (carry != static_cast<std::uint32_t>(0u))
832
+ {
833
+ std::copy_backward(data.cbegin(), data.cend() - static_cast<std::size_t>(1u), data.end());
834
+ data[0] = carry;
835
+ exp += static_cast<exponent_type>(cpp_dec_float_elem_digits10);
836
+ }
837
+ }
838
+ else
839
+ {
840
+ // Subtract v from *this, where the data array of either *this or v
841
+ // might have to be treated with a positive, negative or zero offset.
842
+ if ((ofs > static_cast<std::int32_t>(0)) || ((ofs == static_cast<std::int32_t>(0)) && (compare_ranges(data.cbegin(), v.data.cbegin()) > static_cast<std::int32_t>(0))))
843
+ {
844
+ // In this case, |u| > |v| and ofs is positive.
845
+ // Copy the data of v, shifted down to a lower value
846
+ // into the data array m_n. Set the operand pointer p_v
847
+ // to point to the copied, shifted data m_n.
848
+ std::copy(v.data.cbegin(), v.data.cend() - static_cast<std::ptrdiff_t>(ofs), n_data.begin() + static_cast<std::ptrdiff_t>(ofs));
849
+ std::fill(n_data.begin(), n_data.begin() + static_cast<std::ptrdiff_t>(ofs), static_cast<std::uint32_t>(0u));
850
+ p_v = n_data.data();
851
+ }
852
+ else
853
+ {
854
+ if (ofs != static_cast<std::int32_t>(0))
855
+ {
856
+ // In this case, |u| < |v| and ofs is negative.
857
+ // Shift the data of u down to a lower value.
858
+ std::copy_backward(data.cbegin(), data.cend() - static_cast<std::ptrdiff_t>(-ofs), data.end());
859
+ std::fill(data.begin(), data.begin() + static_cast<std::ptrdiff_t>(-ofs), static_cast<std::uint32_t>(0u));
860
+ }
861
+
862
+ // Copy the data of v into the data array n_data.
863
+ // Set the u-pointer p_u to point to m_n and the
864
+ // operand pointer p_v to point to the shifted
865
+ // data m_data.
866
+ n_data = v.data;
867
+ p_u = n_data.data();
868
+ p_v = data.data();
869
+ b_copy = true;
870
+ }
871
+
872
+ // Subtraction algorithm
873
+ static_cast<void>(eval_subtract_n(p_u, p_u, p_v, cpp_dec_float_elem_number));
874
+
875
+ if (b_copy)
876
+ {
877
+ data = n_data;
878
+ exp = v.exp;
879
+ neg = v.neg;
880
+ }
881
+
882
+ // Is it necessary to justify the data?
883
+ const typename array_type::const_iterator first_nonzero_elem = std::find_if(data.begin(), data.end(), data_elem_is_non_zero_predicate);
884
+
885
+ if (first_nonzero_elem != data.begin())
886
+ {
887
+ if (first_nonzero_elem == data.end())
888
+ {
889
+ // This result of the subtraction is exactly zero.
890
+ // Reset the sign and the exponent.
891
+ neg = false;
892
+ exp = static_cast<exponent_type>(0);
893
+ }
894
+ else
895
+ {
896
+ // Justify the data
897
+ const std::size_t sj = static_cast<std::size_t>(std::distance<typename array_type::const_iterator>(data.begin(), first_nonzero_elem));
898
+
899
+ std::copy(data.begin() + static_cast<std::ptrdiff_t>(sj), data.end(), data.begin());
900
+ std::fill(data.end() - static_cast<std::ptrdiff_t>(sj), data.end(), static_cast<std::uint32_t>(0u));
901
+
902
+ exp -= static_cast<exponent_type>(sj * static_cast<std::size_t>(cpp_dec_float_elem_digits10));
903
+ }
904
+ }
905
+ }
906
+
907
+ // Handle underflow.
908
+ if (iszero())
909
+ return (*this = zero());
910
+
911
+ // Check for potential overflow.
912
+ const bool b_result_might_overflow = (exp >= static_cast<exponent_type>(cpp_dec_float_max_exp10));
913
+
914
+ // Handle overflow.
915
+ if (b_result_might_overflow)
916
+ {
917
+ const bool b_result_is_neg = neg;
918
+ neg = false;
919
+
920
+ if (compare((cpp_dec_float::max)()) > 0)
921
+ *this = inf();
922
+
923
+ neg = b_result_is_neg;
924
+ }
925
+
926
+ return *this;
927
+ }
928
+
929
+ template <unsigned Digits10, class ExponentType, class Allocator>
930
+ cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, ExponentType, Allocator>::operator-=(const cpp_dec_float<Digits10, ExponentType, Allocator>& v)
931
+ {
932
+ // Use *this - v = -(-*this + v).
933
+ negate();
934
+ *this += v;
935
+ negate();
936
+ return *this;
937
+ }
938
+
939
+ template <unsigned Digits10, class ExponentType, class Allocator>
940
+ cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, ExponentType, Allocator>::operator*=(const cpp_dec_float<Digits10, ExponentType, Allocator>& v)
941
+ {
942
+ // Evaluate the sign of the result.
943
+ const bool b_result_is_neg = (neg != v.neg);
944
+
945
+ // Artificially set the sign of the result to be positive.
946
+ neg = false;
947
+
948
+ // Handle special cases like zero, inf and NaN.
949
+ const bool b_u_is_inf = (isinf)();
950
+ const bool b_v_is_inf = (v.isinf)();
951
+ const bool b_u_is_zero = iszero();
952
+ const bool b_v_is_zero = v.iszero();
953
+
954
+ if (((isnan)() || (v.isnan)()) || (b_u_is_inf && b_v_is_zero) || (b_v_is_inf && b_u_is_zero))
955
+ {
956
+ *this = nan();
957
+ return *this;
958
+ }
959
+
960
+ if (b_u_is_inf || b_v_is_inf)
961
+ {
962
+ *this = inf();
963
+ if (b_result_is_neg)
964
+ negate();
965
+ return *this;
966
+ }
967
+
968
+ if (b_u_is_zero || b_v_is_zero)
969
+ {
970
+ return *this = zero();
971
+ }
972
+
973
+ // Check for potential overflow or underflow.
974
+ const bool b_result_might_overflow = ((exp + v.exp) >= static_cast<exponent_type>(cpp_dec_float_max_exp10));
975
+ const bool b_result_might_underflow = ((exp + v.exp) <= static_cast<exponent_type>(cpp_dec_float_min_exp10));
976
+
977
+ // Set the exponent of the result.
978
+ exp += v.exp;
979
+
980
+ const std::int32_t prec_mul = (std::min)(prec_elem, v.prec_elem);
981
+
982
+ eval_mul_dispatch_multiplication_method(v, prec_mul);
983
+
984
+ // Handle overflow.
985
+ if (b_result_might_overflow && (compare((cpp_dec_float::max)()) > 0))
986
+ {
987
+ *this = inf();
988
+ }
989
+
990
+ // Handle underflow.
991
+ if (b_result_might_underflow && (compare((cpp_dec_float::min)()) < 0))
992
+ {
993
+ *this = zero();
994
+
995
+ return *this;
996
+ }
997
+
998
+ // Set the sign of the result.
999
+ neg = b_result_is_neg;
1000
+
1001
+ return *this;
1002
+ }
1003
+
1004
+ template <unsigned Digits10, class ExponentType, class Allocator>
1005
+ cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, ExponentType, Allocator>::operator/=(const cpp_dec_float<Digits10, ExponentType, Allocator>& v)
1006
+ {
1007
+ if (iszero())
1008
+ {
1009
+ if ((v.isnan)())
1010
+ {
1011
+ return *this = v;
1012
+ }
1013
+ else if (v.iszero())
1014
+ {
1015
+ return *this = nan();
1016
+ }
1017
+ }
1018
+
1019
+ const bool u_and_v_are_finite_and_identical = ((isfinite)() && (fpclass == v.fpclass) && (exp == v.exp) && (compare_ranges(data.cbegin(), v.data.cbegin()) == static_cast<std::int32_t>(0)));
1020
+
1021
+ if (u_and_v_are_finite_and_identical)
1022
+ {
1023
+ if (neg != v.neg)
1024
+ {
1025
+ *this = one();
1026
+ negate();
1027
+ }
1028
+ else
1029
+ *this = one();
1030
+ return *this;
1031
+ }
1032
+ else
1033
+ {
1034
+ cpp_dec_float t(v);
1035
+ t.calculate_inv();
1036
+ return operator*=(t);
1037
+ }
1038
+ }
1039
+
1040
+ template <unsigned Digits10, class ExponentType, class Allocator>
1041
+ cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, ExponentType, Allocator>::mul_unsigned_long_long(const unsigned long long n)
1042
+ {
1043
+ // Multiply *this with a constant unsigned long long.
1044
+
1045
+ // Evaluate the sign of the result.
1046
+ const bool b_neg = neg;
1047
+
1048
+ // Artificially set the sign of the result to be positive.
1049
+ neg = false;
1050
+
1051
+ // Handle special cases like zero, inf and NaN.
1052
+ const bool b_u_is_inf = (isinf)();
1053
+ const bool b_n_is_zero = (n == static_cast<std::int32_t>(0));
1054
+
1055
+ if ((isnan)() || (b_u_is_inf && b_n_is_zero))
1056
+ {
1057
+ return (*this = nan());
1058
+ }
1059
+
1060
+ if (b_u_is_inf)
1061
+ {
1062
+ *this = inf();
1063
+ if (b_neg)
1064
+ negate();
1065
+ return *this;
1066
+ }
1067
+
1068
+ if (iszero() || b_n_is_zero)
1069
+ {
1070
+ // Multiplication by zero.
1071
+ return *this = zero();
1072
+ }
1073
+
1074
+ if (n >= static_cast<unsigned long long>(cpp_dec_float_elem_mask))
1075
+ {
1076
+ neg = b_neg;
1077
+ cpp_dec_float t;
1078
+ t = n;
1079
+ return operator*=(t);
1080
+ }
1081
+
1082
+ if (n == static_cast<unsigned long long>(1u))
1083
+ {
1084
+ neg = b_neg;
1085
+ return *this;
1086
+ }
1087
+
1088
+ // Set up the multiplication loop.
1089
+ const std::uint32_t nn = static_cast<std::uint32_t>(n);
1090
+ const std::uint32_t carry = mul_loop_n(data.data(), nn, prec_elem);
1091
+
1092
+ // Handle the carry and adjust the exponent.
1093
+ if (carry != static_cast<std::uint32_t>(0u))
1094
+ {
1095
+ exp += static_cast<exponent_type>(cpp_dec_float_elem_digits10);
1096
+
1097
+ // Shift the result of the multiplication one element to the right.
1098
+ std::copy_backward(data.begin(),
1099
+ data.begin() + static_cast<std::ptrdiff_t>(prec_elem - static_cast<std::int32_t>(1)),
1100
+ data.begin() + static_cast<std::ptrdiff_t>(prec_elem));
1101
+
1102
+ data.front() = static_cast<std::uint32_t>(carry);
1103
+ }
1104
+
1105
+ // Check for potential overflow.
1106
+ const bool b_result_might_overflow = (exp >= cpp_dec_float_max_exp10);
1107
+
1108
+ // Handle overflow.
1109
+ if (b_result_might_overflow && (compare((cpp_dec_float::max)()) > 0))
1110
+ {
1111
+ *this = inf();
1112
+ }
1113
+
1114
+ // Set the sign.
1115
+ neg = b_neg;
1116
+
1117
+ return *this;
1118
+ }
1119
+
1120
+ template <unsigned Digits10, class ExponentType, class Allocator>
1121
+ cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, ExponentType, Allocator>::div_unsigned_long_long(const unsigned long long n)
1122
+ {
1123
+ // Divide *this by a constant unsigned long long.
1124
+
1125
+ // Evaluate the sign of the result.
1126
+ const bool b_neg = neg;
1127
+
1128
+ // Artificially set the sign of the result to be positive.
1129
+ neg = false;
1130
+
1131
+ // Handle special cases like zero, inf and NaN.
1132
+ if ((isnan)())
1133
+ {
1134
+ return *this;
1135
+ }
1136
+
1137
+ if ((isinf)())
1138
+ {
1139
+ *this = inf();
1140
+ if (b_neg)
1141
+ negate();
1142
+ return *this;
1143
+ }
1144
+
1145
+ if (n == static_cast<unsigned long long>(0u))
1146
+ {
1147
+ // Divide by 0.
1148
+ if (iszero())
1149
+ {
1150
+ *this = nan();
1151
+ return *this;
1152
+ }
1153
+ else
1154
+ {
1155
+ *this = inf();
1156
+ if (b_neg)
1157
+ negate();
1158
+ return *this;
1159
+ }
1160
+ }
1161
+
1162
+ if (iszero())
1163
+ {
1164
+ return *this;
1165
+ }
1166
+
1167
+ if (n >= static_cast<unsigned long long>(cpp_dec_float_elem_mask))
1168
+ {
1169
+ neg = b_neg;
1170
+ cpp_dec_float t;
1171
+ t = n;
1172
+ return operator/=(t);
1173
+ } // LCOV_EXCL_LINE This causes a false negative on lcov coverage test.
1174
+
1175
+ const std::uint32_t nn = static_cast<std::uint32_t>(n);
1176
+
1177
+ if (nn > static_cast<std::uint32_t>(1u))
1178
+ {
1179
+ // Do the division loop.
1180
+ const std::uint32_t prev = div_loop_n(data.data(), nn, prec_elem);
1181
+
1182
+ // Determine if one leading zero is in the result data.
1183
+ if (data[0] == static_cast<std::uint32_t>(0u))
1184
+ {
1185
+ // Adjust the exponent
1186
+ exp -= static_cast<exponent_type>(cpp_dec_float_elem_digits10);
1187
+
1188
+ // Shift result of the division one element to the left.
1189
+ std::copy(data.begin() + static_cast<std::ptrdiff_t>(1),
1190
+ data.begin() + static_cast<std::ptrdiff_t>(prec_elem - static_cast<std::int32_t>(1)),
1191
+ data.begin());
1192
+
1193
+ data[static_cast<std::size_t>(prec_elem - static_cast<std::int32_t>(1))] = static_cast<std::uint32_t>(static_cast<std::uint64_t>(prev * static_cast<std::uint64_t>(cpp_dec_float_elem_mask)) / nn);
1194
+ }
1195
+ }
1196
+
1197
+ // Check for potential underflow.
1198
+ const bool b_result_might_underflow = (exp <= cpp_dec_float_min_exp10);
1199
+
1200
+ // Handle underflow.
1201
+ if (b_result_might_underflow && (compare((cpp_dec_float::min)()) < 0))
1202
+ return (*this = zero());
1203
+
1204
+ // Set the sign of the result.
1205
+ neg = b_neg;
1206
+
1207
+ return *this;
1208
+ }
1209
+
1210
+ template <unsigned Digits10, class ExponentType, class Allocator>
1211
+ cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, ExponentType, Allocator>::calculate_inv()
1212
+ {
1213
+ // Handle the special case of zero.
1214
+ if (iszero())
1215
+ {
1216
+ *this = inf();
1217
+
1218
+ return *this;
1219
+ }
1220
+
1221
+ // Handle the special cases of inf, NaN, and +1 or -1.
1222
+
1223
+ if ((isinf)())
1224
+ {
1225
+ return *this = zero();
1226
+ }
1227
+
1228
+ bool b_neg;
1229
+
1230
+ if ((isnan)() || is_one_or_minus_one(&b_neg))
1231
+ {
1232
+ return *this;
1233
+ }
1234
+
1235
+ // Compute the inverse of *this.
1236
+
1237
+ neg = false;
1238
+
1239
+ // Save the original (absolute value of) *this.
1240
+ cpp_dec_float<Digits10, ExponentType, Allocator> x(*this);
1241
+
1242
+ // Generate the initial estimate using division.
1243
+ // Extract the mantissa and exponent for a "manual"
1244
+ // computation of the estimate.
1245
+ double dd;
1246
+ exponent_type ne;
1247
+ x.extract_parts(dd, ne);
1248
+
1249
+ // Setup the iteration.
1250
+
1251
+ // Calculate the initial estimate of the inverse using double
1252
+ // precision approximations of mantissa and exponent.
1253
+
1254
+ operator=(cpp_dec_float<Digits10, ExponentType, Allocator>(1.0 / dd, -ne));
1255
+
1256
+ // Compute the inverse of *this. Quadratically convergent Newton-Raphson iteration
1257
+ // is used. During the iterative steps, the precision of the calculation is limited
1258
+ // to the minimum required in order to minimize the run-time.
1259
+
1260
+ constexpr std::int32_t double_digits10_minus_a_few = std::numeric_limits<double>::digits10 - 3;
1261
+
1262
+ for (std::int32_t digits = double_digits10_minus_a_few; digits <= cpp_dec_float_max_digits10; digits *= static_cast<std::int32_t>(2))
1263
+ {
1264
+ // Adjust precision of the terms.
1265
+ precision(static_cast<std::int32_t>((digits + 10) * static_cast<std::int32_t>(2)));
1266
+ x.precision(static_cast<std::int32_t>((digits + 10) * static_cast<std::int32_t>(2)));
1267
+
1268
+ // Next iteration.
1269
+ cpp_dec_float t(*this);
1270
+ t *= x;
1271
+ t -= two();
1272
+ t.negate();
1273
+ *this *= t;
1274
+ }
1275
+
1276
+ neg = b_neg;
1277
+
1278
+ prec_elem = cpp_dec_float_elem_number;
1279
+
1280
+ return *this;
1281
+ }
1282
+
1283
+ template <unsigned Digits10, class ExponentType, class Allocator>
1284
+ cpp_dec_float<Digits10, ExponentType, Allocator>& cpp_dec_float<Digits10, ExponentType, Allocator>::calculate_sqrt()
1285
+ {
1286
+ // Compute the square root of *this.
1287
+
1288
+ if ((isinf)() && (!isneg()))
1289
+ {
1290
+ return *this;
1291
+ }
1292
+
1293
+ if (isneg() || (!(isfinite)()))
1294
+ {
1295
+ *this = nan();
1296
+ errno = EDOM;
1297
+ return *this;
1298
+ }
1299
+
1300
+ if (iszero() || isone())
1301
+ {
1302
+ return *this;
1303
+ }
1304
+
1305
+ // Save the original *this.
1306
+ cpp_dec_float<Digits10, ExponentType, Allocator> x(*this);
1307
+
1308
+ // Generate the initial estimate using division.
1309
+ // Extract the mantissa and exponent for a "manual"
1310
+ // computation of the estimate.
1311
+ double dd;
1312
+ exponent_type ne;
1313
+ extract_parts(dd, ne);
1314
+
1315
+ // Force the exponent to be an even multiple of two.
1316
+ if ((ne % static_cast<exponent_type>(2)) != static_cast<exponent_type>(0))
1317
+ {
1318
+ ++ne;
1319
+ dd /= 10.0;
1320
+ }
1321
+
1322
+ // Setup the iteration.
1323
+
1324
+ // Calculate the initial estimate of the root using double
1325
+ // precision approximations of mantissa and exponent.
1326
+
1327
+ const double sqd = std::sqrt(dd);
1328
+
1329
+ *this = cpp_dec_float<Digits10, ExponentType, Allocator>(sqd, static_cast<ExponentType>(ne / static_cast<ExponentType>(2)));
1330
+
1331
+ // Estimate 1.0 / (2.0 * x0) using simple manipulations.
1332
+ cpp_dec_float<Digits10, ExponentType, Allocator> vi(0.5 / sqd, static_cast<ExponentType>(-ne / static_cast<ExponentType>(2)));
1333
+
1334
+ // Compute the square root of x. Coupled Newton iteration
1335
+ // as described in "Pi Unleashed" is used. During the
1336
+ // iterative steps, the precision of the calculation is
1337
+ // limited to the minimum required in order to minimize
1338
+ // the run-time.
1339
+ //
1340
+ // Book reference to "Pi Unleashed:
1341
+ // https://www.springer.com/gp/book/9783642567353
1342
+
1343
+ constexpr std::uint32_t double_digits10_minus_a_few = std::numeric_limits<double>::digits10 - 3;
1344
+
1345
+ for (std::int32_t digits = double_digits10_minus_a_few; digits <= cpp_dec_float_max_digits10; digits *= 2)
1346
+ {
1347
+ // Adjust precision of the terms.
1348
+ precision((digits + 10) * 2);
1349
+ vi.precision((digits + 10) * 2);
1350
+
1351
+ // Next iteration of vi
1352
+ cpp_dec_float t(*this);
1353
+ t *= vi;
1354
+ t.negate();
1355
+ t.mul_unsigned_long_long(2u);
1356
+ t += one();
1357
+ t *= vi;
1358
+ vi += t;
1359
+
1360
+ // Next iteration of *this
1361
+ t = *this;
1362
+ t *= *this;
1363
+ t.negate();
1364
+ t += x;
1365
+ t *= vi;
1366
+ *this += t;
1367
+ }
1368
+
1369
+ prec_elem = cpp_dec_float_elem_number;
1370
+
1371
+ return *this;
1372
+ }
1373
+
1374
+ template <unsigned Digits10, class ExponentType, class Allocator>
1375
+ int cpp_dec_float<Digits10, ExponentType, Allocator>::compare(const cpp_dec_float& v) const
1376
+ {
1377
+ // Compare v with *this.
1378
+ // Return +1 for *this > v
1379
+ // 0 for *this = v
1380
+ // -1 for *this < v
1381
+
1382
+ // Handle all non-finite cases.
1383
+ if ((!(isfinite)()) || (!(v.isfinite)()))
1384
+ {
1385
+ // NaN can never equal NaN. Return an implementation-dependent
1386
+ // signed result. Also note that comparison of NaN with NaN
1387
+ // using operators greater-than or less-than is undefined.
1388
+ if ((isnan)() || (v.isnan)())
1389
+ {
1390
+ return ((isnan)() ? 1 : -1);
1391
+ }
1392
+
1393
+ if ((isinf)() && (v.isinf)())
1394
+ {
1395
+ // Both *this and v are infinite. They are equal if they have the same sign.
1396
+ // Otherwise, *this is less than v if and only if *this is negative.
1397
+ return ((neg == v.neg) ? 0 : (neg ? -1 : 1));
1398
+ }
1399
+
1400
+ if ((isinf)())
1401
+ {
1402
+ // *this is infinite, but v is finite.
1403
+ // So negative infinite *this is less than any finite v.
1404
+ // Whereas positive infinite *this is greater than any finite v.
1405
+ return (isneg() ? -1 : 1);
1406
+ }
1407
+ else
1408
+ {
1409
+ // *this is finite, and v is infinite.
1410
+ // So any finite *this is greater than negative infinite v.
1411
+ // Whereas any finite *this is less than positive infinite v.
1412
+ return (v.neg ? 1 : -1);
1413
+ }
1414
+ }
1415
+
1416
+ // And now handle all *finite* cases.
1417
+ if (iszero())
1418
+ {
1419
+ // The value of *this is zero and v is either zero or non-zero.
1420
+ return (v.iszero() ? 0 : (v.neg ? 1 : -1));
1421
+ }
1422
+ else if (v.iszero())
1423
+ {
1424
+ // The value of v is zero and *this is non-zero.
1425
+ return (neg ? -1 : 1);
1426
+ }
1427
+ else
1428
+ {
1429
+ // Both *this and v are non-zero.
1430
+
1431
+ if (neg != v.neg)
1432
+ {
1433
+ // The signs are different.
1434
+ return (neg ? -1 : 1);
1435
+ }
1436
+ else if (exp != v.exp)
1437
+ {
1438
+ // The signs are the same and the exponents are different.
1439
+ const int val_cexpression = ((exp < v.exp) ? 1 : -1);
1440
+
1441
+ return (neg ? val_cexpression : -val_cexpression);
1442
+ }
1443
+ else
1444
+ {
1445
+ // The signs are the same and the exponents are the same.
1446
+ // Compare the data.
1447
+ const int val_cmp_data = compare_ranges(data.cbegin(), v.data.cbegin());
1448
+
1449
+ return ((!neg) ? val_cmp_data : -val_cmp_data);
1450
+ }
1451
+ }
1452
+ }
1453
+
1454
+ template <unsigned Digits10, class ExponentType, class Allocator>
1455
+ bool cpp_dec_float<Digits10, ExponentType, Allocator>::is_one_or_minus_one(bool* p_sign) const
1456
+ {
1457
+ // Check if the value of *this is identically 1 or very close to 1.
1458
+
1459
+ if(p_sign != nullptr)
1460
+ *p_sign = neg;
1461
+
1462
+ if ((isfinite)())
1463
+ {
1464
+ if ((data[0u] == static_cast<std::uint32_t>(1u)) && (exp == static_cast<exponent_type>(0)))
1465
+ {
1466
+ const typename array_type::const_iterator it_non_zero = std::find_if(data.begin(), data.end(), data_elem_is_non_zero_predicate);
1467
+
1468
+ const bool result_one_is_ok = (it_non_zero == data.end());
1469
+
1470
+ return result_one_is_ok;
1471
+ }
1472
+ else if ((data[0u] == static_cast<std::uint32_t>(cpp_dec_float_elem_mask - 1)) && (exp == static_cast<exponent_type>(-cpp_dec_float_elem_digits10)))
1473
+ {
1474
+ const typename array_type::const_iterator it_non_nine = std::find_if(data.begin(), data.end(), data_elem_is_non_nine_predicate);
1475
+
1476
+ const bool result_one_is_ok = (it_non_nine == data.end());
1477
+
1478
+ return result_one_is_ok;
1479
+ }
1480
+ }
1481
+
1482
+ return false;
1483
+ }
1484
+
1485
+ template <unsigned Digits10, class ExponentType, class Allocator>
1486
+ bool cpp_dec_float<Digits10, ExponentType, Allocator>::isint() const
1487
+ {
1488
+ if (fpclass != cpp_dec_float_finite)
1489
+ {
1490
+ return false;
1491
+ }
1492
+
1493
+ if (iszero())
1494
+ {
1495
+ return true;
1496
+ }
1497
+
1498
+ if (exp < static_cast<exponent_type>(0))
1499
+ {
1500
+ return false;
1501
+ } // |*this| < 1.
1502
+
1503
+ const typename array_type::size_type offset_decimal_part = static_cast<typename array_type::size_type>(exp / cpp_dec_float_elem_digits10) + 1u;
1504
+
1505
+ if (offset_decimal_part >= static_cast<typename array_type::size_type>(cpp_dec_float_elem_number))
1506
+ {
1507
+ // The number is too large to resolve the integer part.
1508
+ // It considered to be a pure integer.
1509
+ return true;
1510
+ }
1511
+
1512
+ typename array_type::const_iterator it_non_zero = std::find_if(data.begin() + static_cast<std::ptrdiff_t>(offset_decimal_part), data.end(), data_elem_is_non_zero_predicate);
1513
+
1514
+ return (it_non_zero == data.end());
1515
+ }
1516
+
1517
+ template <unsigned Digits10, class ExponentType, class Allocator>
1518
+ void cpp_dec_float<Digits10, ExponentType, Allocator>::extract_parts(double& mantissa, ExponentType& exponent) const
1519
+ {
1520
+ // Extract the approximate parts mantissa and base-10 exponent from
1521
+ // the input cpp_dec_float<Digits10, ExponentType, Allocator> value x.
1522
+ // This subroutine is designed to be fast and does not round.
1523
+
1524
+ // Extract the mantissa and exponent.
1525
+
1526
+ using local_exponent_type = ExponentType;
1527
+
1528
+ const local_exponent_type my_order_limb0 { limb_order(data.front()) };
1529
+
1530
+ exponent = static_cast<local_exponent_type>(exp + my_order_limb0);
1531
+
1532
+ // Extract into the mantissa the first limb, extracted as a double.
1533
+
1534
+ mantissa = ((!neg) ? static_cast<double>(data.front()) : -static_cast<double>(data.front()));
1535
+
1536
+ int digit_counter { static_cast<int>(my_order_limb0) };
1537
+
1538
+ // Keep a running power-of-ten scale in the variable p10.
1539
+ double p10 { static_cast<double>(detail::pow10_maker(static_cast<std::uint32_t>(my_order_limb0))) };
1540
+
1541
+ // Scale the first limb with its order.
1542
+ mantissa /= p10;
1543
+
1544
+ // Extract the rest of the mantissa piecewise from the limbs.
1545
+ // This loop does not round. For finite values, the absolute
1546
+ // value of the mantissa is scaled and between 1 and 10.
1547
+
1548
+ auto itr_data = data.cbegin() + static_cast<std::size_t>(UINT8_C(1));
1549
+
1550
+ while ((itr_data != data.cend()) && (digit_counter <= std::numeric_limits<double>::max_digits10))
1551
+ {
1552
+ p10 *= static_cast<double>(cpp_dec_float_elem_mask);
1553
+
1554
+ mantissa += static_cast<double>(static_cast<double>(*itr_data++) / p10);
1555
+
1556
+ digit_counter += static_cast<int>(cpp_dec_float_elem_digits10);
1557
+ }
1558
+ }
1559
+
1560
+ template <unsigned Digits10, class ExponentType, class Allocator>
1561
+ double cpp_dec_float<Digits10, ExponentType, Allocator>::extract_double() const
1562
+ {
1563
+ // Returns the double conversion of a cpp_dec_float<Digits10, ExponentType, Allocator>.
1564
+
1565
+ // Check for non-normal cpp_dec_float<Digits10, ExponentType, Allocator>.
1566
+ if (!(isfinite)())
1567
+ {
1568
+ if ((isnan)())
1569
+ {
1570
+ return std::numeric_limits<double>::quiet_NaN();
1571
+ }
1572
+ else
1573
+ {
1574
+ return ((!neg) ? +std::numeric_limits<double>::infinity()
1575
+ : -std::numeric_limits<double>::infinity());
1576
+ }
1577
+ }
1578
+
1579
+ cpp_dec_float<Digits10, ExponentType, Allocator> xx(*this);
1580
+
1581
+ if (xx.isneg())
1582
+ xx.negate();
1583
+
1584
+ // Check if *this cpp_dec_float<Digits10, ExponentType, Allocator> is zero.
1585
+ if (iszero() || (xx.compare(double_min()) < 0))
1586
+ {
1587
+ return 0.0;
1588
+ }
1589
+
1590
+ // Check if *this cpp_dec_float<Digits10, ExponentType, Allocator> exceeds the maximum of double.
1591
+ if (xx.compare(double_max()) > 0)
1592
+ {
1593
+ return ((!neg) ? +std::numeric_limits<double>::infinity()
1594
+ : -std::numeric_limits<double>::infinity());
1595
+ }
1596
+
1597
+ std::stringstream strm { };
1598
+
1599
+ strm.imbue(std::locale::classic());
1600
+
1601
+ strm << str(std::numeric_limits<double>::max_digits10, std::ios_base::scientific);
1602
+
1603
+ double d;
1604
+ strm >> d;
1605
+
1606
+ return d;
1607
+ }
1608
+
1609
+ template <unsigned Digits10, class ExponentType, class Allocator>
1610
+ long double cpp_dec_float<Digits10, ExponentType, Allocator>::extract_long_double() const
1611
+ {
1612
+ // Returns the long double conversion of a cpp_dec_float<Digits10, ExponentType, Allocator>.
1613
+
1614
+ // Check if *this cpp_dec_float<Digits10, ExponentType, Allocator> is subnormal.
1615
+ if (!(isfinite)())
1616
+ {
1617
+ if ((isnan)())
1618
+ {
1619
+ return std::numeric_limits<long double>::quiet_NaN();
1620
+ }
1621
+ else
1622
+ {
1623
+ return ((!neg) ? std::numeric_limits<long double>::infinity()
1624
+ : -std::numeric_limits<long double>::infinity());
1625
+ }
1626
+ }
1627
+
1628
+ cpp_dec_float<Digits10, ExponentType, Allocator> xx(*this);
1629
+ if (xx.isneg())
1630
+ xx.negate();
1631
+
1632
+ // Check if *this cpp_dec_float<Digits10, ExponentType, Allocator> is zero.
1633
+ if (iszero() || (xx.compare(long_double_min()) < 0))
1634
+ {
1635
+ return static_cast<long double>(0.0);
1636
+ }
1637
+
1638
+ // Check if *this cpp_dec_float<Digits10, ExponentType, Allocator> exceeds the maximum of double.
1639
+ if (xx.compare(long_double_max()) > 0)
1640
+ {
1641
+ return ((!neg) ? std::numeric_limits<long double>::infinity()
1642
+ : -std::numeric_limits<long double>::infinity());
1643
+ }
1644
+
1645
+ std::stringstream strm;
1646
+ strm.imbue(std::locale::classic());
1647
+
1648
+ strm << str(std::numeric_limits<long double>::max_digits10, std::ios_base::scientific);
1649
+
1650
+ long double ld;
1651
+ strm >> ld;
1652
+
1653
+ return ld;
1654
+ }
1655
+
1656
+ template <unsigned Digits10, class ExponentType, class Allocator>
1657
+ long long cpp_dec_float<Digits10, ExponentType, Allocator>::extract_signed_long_long() const
1658
+ {
1659
+ // Extracts a signed long long from *this.
1660
+ // If (x > maximum of long long) or (x < minimum of long long),
1661
+ // then the maximum or minimum of long long is returned accordingly.
1662
+
1663
+ if (exp < static_cast<exponent_type>(0))
1664
+ {
1665
+ return static_cast<long long>(0);
1666
+ }
1667
+
1668
+ const bool b_neg = isneg();
1669
+
1670
+ unsigned long long val;
1671
+
1672
+ if ((!b_neg) && (compare(long_long_max()) > 0))
1673
+ {
1674
+ return (std::numeric_limits<long long>::max)();
1675
+ }
1676
+ else if (b_neg && (compare(long_long_min()) < 0))
1677
+ {
1678
+ return (std::numeric_limits<long long>::min)();
1679
+ }
1680
+ else
1681
+ {
1682
+ // Extract the data into an unsigned long long value.
1683
+ cpp_dec_float<Digits10, ExponentType, Allocator> xn(extract_integer_part());
1684
+ if (xn.isneg())
1685
+ xn.negate();
1686
+
1687
+ val = static_cast<unsigned long long>(xn.data[0]);
1688
+
1689
+ const std::int32_t imax = (std::min)(static_cast<std::int32_t>(static_cast<std::int32_t>(xn.exp) / cpp_dec_float_elem_digits10), static_cast<std::int32_t>(cpp_dec_float_elem_number - static_cast<std::int32_t>(1)));
1690
+
1691
+ for (std::int32_t i = static_cast<std::int32_t>(1); i <= imax; i++)
1692
+ {
1693
+ val *= static_cast<unsigned long long>(cpp_dec_float_elem_mask);
1694
+ val += static_cast<unsigned long long>(xn.data[static_cast<std::size_t>(i)]);
1695
+ }
1696
+ }
1697
+
1698
+ if (!b_neg)
1699
+ {
1700
+ return static_cast<long long>(val);
1701
+ }
1702
+ else
1703
+ {
1704
+ // This strange expression avoids a hardware trap in the corner case
1705
+ // that val is the most negative value permitted in long long.
1706
+ // See https://svn.boost.org/trac/boost/ticket/9740.
1707
+ //
1708
+ long long sval = static_cast<long long>(val - 1);
1709
+ sval = -sval;
1710
+ --sval;
1711
+ return sval;
1712
+ }
1713
+ }
1714
+
1715
+ template <unsigned Digits10, class ExponentType, class Allocator>
1716
+ unsigned long long cpp_dec_float<Digits10, ExponentType, Allocator>::extract_unsigned_long_long() const
1717
+ {
1718
+ // Extracts an unsigned long long from *this.
1719
+ // If x exceeds the maximum of unsigned long long,
1720
+ // then the maximum of unsigned long long is returned.
1721
+ // If x is negative, then the unsigned long long cast of
1722
+ // the long long extracted value is returned.
1723
+
1724
+ if (isneg())
1725
+ {
1726
+ return static_cast<unsigned long long>(extract_signed_long_long());
1727
+ }
1728
+
1729
+ if (exp < static_cast<exponent_type>(0))
1730
+ {
1731
+ return static_cast<unsigned long long>(0u);
1732
+ }
1733
+
1734
+ const cpp_dec_float<Digits10, ExponentType, Allocator> xn(extract_integer_part());
1735
+
1736
+ unsigned long long val;
1737
+
1738
+ if (xn.compare(ulong_long_max()) > 0)
1739
+ {
1740
+ return (std::numeric_limits<unsigned long long>::max)();
1741
+ }
1742
+ else
1743
+ {
1744
+ // Extract the data into an unsigned long long value.
1745
+ val = static_cast<unsigned long long>(xn.data[std::size_t { 0U }]);
1746
+
1747
+ const std::int32_t imax = (std::min)(static_cast<std::int32_t>(static_cast<std::int32_t>(xn.exp) / cpp_dec_float_elem_digits10), static_cast<std::int32_t>(cpp_dec_float_elem_number - static_cast<std::int32_t>(1)));
1748
+
1749
+ for (std::int32_t i = static_cast<std::int32_t>(1); i <= imax; i++)
1750
+ {
1751
+ val *= static_cast<unsigned long long>(cpp_dec_float_elem_mask);
1752
+ val += static_cast<unsigned long long>(xn.data[static_cast<std::size_t>(i)]);
1753
+ }
1754
+ }
1755
+
1756
+ return val;
1757
+ }
1758
+
1759
+ #ifdef BOOST_HAS_INT128
1760
+
1761
+ template <unsigned Digits10, class ExponentType, class Allocator>
1762
+ int128_type cpp_dec_float<Digits10, ExponentType, Allocator>::extract_signed_int128() const
1763
+ {
1764
+ // Extracts a signed __int128 from *this.
1765
+ // If (x > maximum of __int128) or (x < minimum of __int128),
1766
+ // then the maximum or minimum of long long is returned accordingly.
1767
+
1768
+ if (exp < static_cast<exponent_type>(0))
1769
+ {
1770
+ return static_cast<int128_type>(0);
1771
+ }
1772
+
1773
+ const bool b_neg = isneg();
1774
+ cpp_dec_float<Digits10, ExponentType, Allocator> i128max;
1775
+ i128max = ((~static_cast<uint128_type>(0)) >> 1);
1776
+ cpp_dec_float<Digits10, ExponentType, Allocator> i128min;
1777
+ i128min = (-1 - static_cast<int128_type>((static_cast<uint128_type>(1) << 127) - 1));
1778
+
1779
+ uint128_type val;
1780
+
1781
+ if ((!b_neg) && (compare(i128max) > 0))
1782
+ {
1783
+ return ((~static_cast<uint128_type>(0)) >> 1);
1784
+ }
1785
+ else if (b_neg && (compare(i128min) < 0))
1786
+ {
1787
+ return (-1 - static_cast<int128_type>((static_cast<uint128_type>(1) << 127) - 1));
1788
+ }
1789
+ else
1790
+ {
1791
+ // Extract the data into an (unsigned) boost::uint128_type value.
1792
+ cpp_dec_float<Digits10, ExponentType, Allocator> xn(extract_integer_part());
1793
+ if (xn.isneg())
1794
+ xn.negate();
1795
+
1796
+ val = static_cast<uint128_type>(xn.data[0]);
1797
+
1798
+ const std::int32_t imax = (std::min)(static_cast<std::int32_t>(static_cast<std::int32_t>(xn.exp) / cpp_dec_float_elem_digits10), static_cast<std::int32_t>(cpp_dec_float_elem_number - static_cast<std::int32_t>(1)));
1799
+
1800
+ for (std::int32_t i = static_cast<std::int32_t>(1); i <= imax; i++)
1801
+ {
1802
+ val *= static_cast<uint128_type>(cpp_dec_float_elem_mask);
1803
+ val += static_cast<uint128_type>(xn.data[static_cast<std::size_t>(i)]);
1804
+ }
1805
+ }
1806
+
1807
+ if (!b_neg)
1808
+ {
1809
+ return static_cast<int128_type>(val);
1810
+ }
1811
+ else
1812
+ {
1813
+ // This strange expression avoids a hardware trap in the corner case that
1814
+ // val is the most negative value permitted in (signed) boost::int128_type.
1815
+ // See also https://svn.boost.org/trac/boost/ticket/9740.
1816
+ //
1817
+ int128_type sval = static_cast<int128_type>(val - 1);
1818
+ sval = -sval;
1819
+ --sval;
1820
+ return sval;
1821
+ }
1822
+ }
1823
+
1824
+ template <unsigned Digits10, class ExponentType, class Allocator>
1825
+ uint128_type cpp_dec_float<Digits10, ExponentType, Allocator>::extract_unsigned_int128() const
1826
+ {
1827
+ // Extracts an unsigned __int128 from *this.
1828
+ // If x exceeds the maximum of unsigned __int128,
1829
+ // then the maximum of unsigned __int128 is returned.
1830
+ // If x is negative, then the unsigned __int128 cast of
1831
+ // the __int128 extracted value is returned.
1832
+
1833
+ if (isneg())
1834
+ {
1835
+ return static_cast<uint128_type>(extract_signed_int128());
1836
+ }
1837
+
1838
+ if (exp < static_cast<exponent_type>(0))
1839
+ {
1840
+ return 0u;
1841
+ }
1842
+
1843
+ const cpp_dec_float<Digits10, ExponentType, Allocator> xn(extract_integer_part());
1844
+ cpp_dec_float<Digits10, ExponentType, Allocator> i128max;
1845
+ i128max = (~static_cast<uint128_type>(0));
1846
+
1847
+ uint128_type val;
1848
+
1849
+ if (xn.compare(i128max) > 0)
1850
+ {
1851
+ return (~static_cast<uint128_type>(0));
1852
+ }
1853
+ else
1854
+ {
1855
+ // Extract the data into an unsigned long long value.
1856
+ val = static_cast<uint128_type>(xn.data[0]);
1857
+
1858
+ const std::int32_t imax = (std::min)(static_cast<std::int32_t>(static_cast<std::int32_t>(xn.exp) / cpp_dec_float_elem_digits10), static_cast<std::int32_t>(cpp_dec_float_elem_number - static_cast<std::int32_t>(1)));
1859
+
1860
+ for (std::int32_t i = static_cast<std::int32_t>(1); i <= imax; i++)
1861
+ {
1862
+ val *= static_cast<uint128_type>(cpp_dec_float_elem_mask);
1863
+ val += static_cast<uint128_type>(xn.data[i]);
1864
+ }
1865
+ }
1866
+
1867
+ return val;
1868
+ }
1869
+
1870
+ #endif
1871
+
1872
+ template <unsigned Digits10, class ExponentType, class Allocator>
1873
+ cpp_dec_float<Digits10, ExponentType, Allocator> cpp_dec_float<Digits10, ExponentType, Allocator>::extract_integer_part() const
1874
+ {
1875
+ // Compute the signed integer part of x.
1876
+
1877
+ if (!(isfinite)())
1878
+ {
1879
+ return *this;
1880
+ }
1881
+
1882
+ if (exp < static_cast<ExponentType>(0))
1883
+ {
1884
+ // The absolute value of the number is smaller than 1.
1885
+ // Thus the integer part is zero.
1886
+ return zero();
1887
+ }
1888
+
1889
+ // Truncate the digits from the decimal part, including guard digits
1890
+ // that do not belong to the integer part.
1891
+
1892
+ // Make a local copy.
1893
+ cpp_dec_float<Digits10, ExponentType, Allocator> x = *this;
1894
+
1895
+ // Clear out the decimal portion
1896
+ const std::size_t first_clear = (static_cast<std::size_t>(x.exp) / static_cast<std::size_t>(cpp_dec_float_elem_digits10)) + 1u;
1897
+ const std::size_t last_clear = static_cast<std::size_t>(cpp_dec_float_elem_number);
1898
+
1899
+ if (first_clear < last_clear)
1900
+ std::fill(x.data.begin() + static_cast<std::ptrdiff_t>(first_clear), x.data.begin() + static_cast<std::ptrdiff_t>(last_clear), static_cast<std::uint32_t>(0u));
1901
+
1902
+ return x;
1903
+ }
1904
+
1905
+ template <unsigned Digits10, class ExponentType, class Allocator>
1906
+ std::string cpp_dec_float<Digits10, ExponentType, Allocator>::str(std::intmax_t number_of_digits, std::ios_base::fmtflags f) const
1907
+ {
1908
+ if ((this->isinf)())
1909
+ {
1910
+ if (this->isneg())
1911
+ return "-inf";
1912
+ else if (f & std::ios_base::showpos)
1913
+ return "+inf";
1914
+ else
1915
+ return "inf";
1916
+ }
1917
+ else if ((this->isnan)())
1918
+ {
1919
+ return "nan";
1920
+ }
1921
+
1922
+ std::string my_str;
1923
+ std::intmax_t org_digits(number_of_digits);
1924
+ exponent_type my_exp = order();
1925
+
1926
+ if (!(f & std::ios_base::fixed) && (number_of_digits == 0))
1927
+ number_of_digits = cpp_dec_float_max_digits10;
1928
+
1929
+ if (f & std::ios_base::fixed)
1930
+ {
1931
+ number_of_digits += my_exp + 1;
1932
+ }
1933
+ else if (f & std::ios_base::scientific)
1934
+ ++number_of_digits;
1935
+
1936
+ // Determine the number of elements needed to provide the requested
1937
+ // digits from cpp_dec_float<Digits10, ExponentType, Allocator>.
1938
+ const std::intmax_t
1939
+ number_of_elements_signed
1940
+ {
1941
+ (std::max)(static_cast<std::intmax_t>(number_of_digits / static_cast<std::intmax_t>(cpp_dec_float_elem_digits10) + 2),
1942
+ std::intmax_t { INT8_C(0) })
1943
+ };
1944
+
1945
+ const std::size_t number_of_elements = (std::min)(static_cast<std::size_t>(number_of_elements_signed),
1946
+ static_cast<std::size_t>(cpp_dec_float_elem_number));
1947
+
1948
+ // Extract the remaining digits from cpp_dec_float<Digits10, ExponentType, Allocator> after the decimal point.
1949
+ std::stringstream strm;
1950
+ strm.imbue(std::locale::classic());
1951
+ strm << data[0];
1952
+ // Extract all of the digits from cpp_dec_float<Digits10, ExponentType, Allocator>, beginning with the first data element.
1953
+ for (std::size_t i = static_cast<std::size_t>(1u); i < number_of_elements; i++)
1954
+ {
1955
+ strm << std::setw(static_cast<std::streamsize>(cpp_dec_float_elem_digits10))
1956
+ << std::setfill(static_cast<char>('0'))
1957
+ << data[i];
1958
+ }
1959
+ my_str += strm.str();
1960
+
1961
+ bool have_leading_zeros = false;
1962
+
1963
+ if (number_of_digits == 0)
1964
+ {
1965
+ // We only get here if the output format is "fixed" and we just need to
1966
+ // round the first non-zero digit.
1967
+ number_of_digits -= my_exp + 1; // reset to original value
1968
+ if (number_of_digits)
1969
+ {
1970
+ my_str.insert(static_cast<std::string::size_type>(0), std::string::size_type(number_of_digits), '0');
1971
+ have_leading_zeros = true; // LCOV_EXCL_LINE This causes a false negative on lcov coverage test.
1972
+ }
1973
+ }
1974
+
1975
+ if (number_of_digits < 0)
1976
+ {
1977
+ my_str = "0"; // LCOV_EXCL_LINE This causes a false negative on lcov coverage test.
1978
+ if (isneg())
1979
+ my_str.insert(static_cast<std::string::size_type>(0), 1, '-');
1980
+ boost::multiprecision::detail::format_float_string(my_str, 0, number_of_digits - my_exp - 1, f, this->iszero());
1981
+ return my_str;
1982
+ }
1983
+ else
1984
+ {
1985
+ // Cut the output to the size of the precision.
1986
+ if (my_str.length() > static_cast<std::string::size_type>(number_of_digits))
1987
+ {
1988
+ // Get the digit after the last needed digit for rounding
1989
+ const std::uint32_t round = static_cast<std::uint32_t>(static_cast<std::uint32_t>(my_str[static_cast<std::string::size_type>(number_of_digits)]) - static_cast<std::uint32_t>('0'));
1990
+
1991
+ bool need_round_up = round >= 5u;
1992
+
1993
+ if (round == 5u)
1994
+ {
1995
+ const std::uint32_t ix = number_of_digits == 0 ? 0 : static_cast<std::uint32_t>(static_cast<std::uint32_t>(my_str[static_cast<std::string::size_type>(number_of_digits - 1)]) - static_cast<std::uint32_t>('0'));
1996
+ if ((ix & 1u) == 0)
1997
+ {
1998
+ // We have an even digit followed by a 5, so we might not actually
1999
+ // need to round up if all the remaining digits are zero:
2000
+ if (my_str.find_first_not_of('0', static_cast<std::string::size_type>(number_of_digits + 1)) == std::string::npos)
2001
+ {
2002
+ bool all_zeros = true;
2003
+
2004
+ // There are no non-zero trailing digits in the string,
2005
+ // now check whatever parts we didn't convert to the string:
2006
+ for (std::size_t i = number_of_elements; i < data.size(); i++)
2007
+ {
2008
+ if (data[i])
2009
+ {
2010
+ all_zeros = false;
2011
+ break;
2012
+ }
2013
+ }
2014
+ if (all_zeros)
2015
+ need_round_up = false; // tie break - round to even.
2016
+ }
2017
+ }
2018
+ }
2019
+
2020
+ // Truncate the string
2021
+ my_str.erase(static_cast<std::string::size_type>(number_of_digits));
2022
+
2023
+ if (need_round_up)
2024
+ {
2025
+ if (my_str.size())
2026
+ {
2027
+ std::size_t ix = static_cast<std::size_t>(my_str.length() - 1u);
2028
+
2029
+ // Every trailing 9 must be rounded up
2030
+ while (ix && (static_cast<std::int32_t>(my_str.at(ix)) - static_cast<std::int32_t>('0') == static_cast<std::int32_t>(9)))
2031
+ {
2032
+ my_str.at(ix) = static_cast<char>('0');
2033
+ --ix;
2034
+ }
2035
+
2036
+ if (!ix)
2037
+ {
2038
+ // There were nothing but trailing nines.
2039
+ if (static_cast<std::int32_t>(static_cast<std::int32_t>(my_str.at(ix)) - static_cast<std::int32_t>(0x30)) == static_cast<std::int32_t>(9))
2040
+ {
2041
+ // Increment up to the next order and adjust exponent.
2042
+ my_str.at(ix) = static_cast<char>('1');
2043
+ ++my_exp;
2044
+ }
2045
+ else
2046
+ {
2047
+ // Round up this digit.
2048
+ ++my_str.at(ix);
2049
+ }
2050
+ }
2051
+ else
2052
+ {
2053
+ // Round up the last digit.
2054
+ ++my_str[ix];
2055
+ }
2056
+ }
2057
+ else
2058
+ {
2059
+ my_str = "1"; // LCOV_EXCL_LINE This causes a false negative on lcov coverage test.
2060
+ ++my_exp;
2061
+ }
2062
+ }
2063
+ }
2064
+ }
2065
+
2066
+ if (have_leading_zeros)
2067
+ {
2068
+ // We need to take the zeros back out again, and correct the exponent
2069
+ // if we rounded up:
2070
+ if (my_str[std::string::size_type(number_of_digits - 1)] != '0')
2071
+ {
2072
+ ++my_exp;
2073
+ my_str.erase(0, std::string::size_type(number_of_digits - 1));
2074
+ }
2075
+ else
2076
+ my_str.erase(0, std::string::size_type(number_of_digits));
2077
+ }
2078
+
2079
+ if (isneg())
2080
+ my_str.insert(static_cast<std::string::size_type>(0), 1, '-');
2081
+
2082
+ boost::multiprecision::detail::format_float_string(my_str, my_exp, org_digits, f, this->iszero());
2083
+ return my_str;
2084
+ }
2085
+
2086
+ template <unsigned Digits10, class ExponentType, class Allocator>
2087
+ bool cpp_dec_float<Digits10, ExponentType, Allocator>::rd_string(const char* const s)
2088
+ {
2089
+ #ifndef BOOST_NO_EXCEPTIONS
2090
+ try
2091
+ {
2092
+ #endif
2093
+
2094
+ std::string my_str(s);
2095
+ static const std::string valid_characters{"0123456789"};
2096
+
2097
+ // TBD: Using several regular expressions may significantly reduce
2098
+ // the code complexity (and perhaps the run-time) of rd_string().
2099
+
2100
+ // Get a possible exponent and remove it.
2101
+ exp = static_cast<exponent_type>(0);
2102
+
2103
+ std::size_t pos;
2104
+
2105
+ if (((pos = my_str.find('e')) != std::string::npos) || ((pos = my_str.find('E')) != std::string::npos))
2106
+ {
2107
+ // Remove the exponent part from the string.
2108
+ #ifndef BOOST_MP_STANDALONE
2109
+ exp = boost::lexical_cast<exponent_type>(static_cast<const char*>(my_str.c_str() + (pos + 1u)));
2110
+ #else
2111
+ if (my_str.find_first_not_of(valid_characters, ((my_str[pos + 1] == '+') || (my_str[pos + 1] == '-')) ? pos + 2 : pos + 1) != std::string::npos)
2112
+ BOOST_MP_THROW_EXCEPTION(std::runtime_error("Can not construct a floating point with non-numeric content")); // LCOV_EXCL_LINE
2113
+ exp = static_cast<exponent_type>(std::atoll(static_cast<const char*>(my_str.c_str() + (pos + 1u))));
2114
+ #endif
2115
+
2116
+ my_str = my_str.substr(static_cast<std::size_t>(0u), pos);
2117
+ }
2118
+
2119
+ // Get a possible +/- sign and remove it.
2120
+ neg = false;
2121
+
2122
+ if (!my_str.empty())
2123
+ {
2124
+ if (my_str[0] == '-')
2125
+ {
2126
+ neg = true;
2127
+
2128
+ my_str.erase(0, 1);
2129
+ }
2130
+ else if (my_str[0] == '+')
2131
+ {
2132
+ my_str.erase(0, 1);
2133
+ }
2134
+ }
2135
+
2136
+ //
2137
+ // Special cases for infinities and NaN's:
2138
+ //
2139
+ if ((my_str == "inf") || (my_str == "INF") || (my_str == "infinity") || (my_str == "INFINITY"))
2140
+ {
2141
+ const bool tmp_neg { neg };
2142
+
2143
+ *this = this->inf();
2144
+
2145
+ neg = tmp_neg;
2146
+
2147
+ return true;
2148
+ }
2149
+
2150
+ if ((my_str.size() >= 3) && ((my_str.substr(0, 3) == "nan") || (my_str.substr(0, 3) == "NAN") || (my_str.substr(0, 3) == "NaN")))
2151
+ {
2152
+ *this = this->nan();
2153
+
2154
+ return true;
2155
+ }
2156
+
2157
+ // Remove the leading zeros for all input types.
2158
+ const std::string::iterator fwd_it_leading_zero = std::find_if(my_str.begin(), my_str.end(), char_is_nonzero_predicate);
2159
+
2160
+ if (fwd_it_leading_zero != my_str.begin())
2161
+ {
2162
+ if (fwd_it_leading_zero == my_str.end())
2163
+ {
2164
+ // The string contains nothing but leading zeros.
2165
+ // This string represents zero.
2166
+ operator=(zero());
2167
+ return true;
2168
+ }
2169
+ else
2170
+ {
2171
+ my_str.erase(my_str.begin(), fwd_it_leading_zero);
2172
+ }
2173
+ }
2174
+
2175
+ // Put the input string into the standard cpp_dec_float<Digits10, ExponentType, Allocator> input form
2176
+ // aaa.bbbbE+/-n, where aaa has 1...cpp_dec_float_elem_digits10, bbbb has an
2177
+ // even multiple of cpp_dec_float_elem_digits10 which are possibly zero padded
2178
+ // on the right-end, and n is a signed 64-bit integer which is an
2179
+ // even multiple of cpp_dec_float_elem_digits10.
2180
+
2181
+ // Find a possible decimal point.
2182
+ pos = my_str.find(static_cast<char>('.'));
2183
+
2184
+ if (pos != std::string::npos)
2185
+ {
2186
+ // Check we have only digits either side of the point:
2187
+ if (my_str.find_first_not_of(valid_characters) != pos)
2188
+ BOOST_MP_THROW_EXCEPTION(std::runtime_error("Can not construct a floating point with non-numeric content")); // LCOV_EXCL_LINE
2189
+ if (my_str.find_first_not_of(valid_characters, pos + 1) != std::string::npos)
2190
+ BOOST_MP_THROW_EXCEPTION(std::runtime_error("Can not construct a floating point with non-numeric content")); // LCOV_EXCL_LINE
2191
+
2192
+ // Remove all trailing insignificant zeros.
2193
+ const std::string::const_reverse_iterator rit_non_zero = std::find_if(my_str.rbegin(), my_str.rend(), char_is_nonzero_predicate);
2194
+
2195
+ if (rit_non_zero != static_cast<std::string::const_reverse_iterator>(my_str.rbegin()))
2196
+ {
2197
+ const std::string::size_type ofs =
2198
+ static_cast<std::string::size_type>
2199
+ (
2200
+ static_cast<std::ptrdiff_t>(my_str.length())
2201
+ - std::distance<std::string::const_reverse_iterator>(my_str.rbegin(), rit_non_zero)
2202
+ );
2203
+
2204
+ my_str.erase(my_str.begin() + static_cast<std::ptrdiff_t>(ofs), my_str.end());
2205
+ }
2206
+
2207
+ // Check if the input is identically zero.
2208
+ if (my_str == std::string("."))
2209
+ {
2210
+ operator=(zero());
2211
+ return true;
2212
+ }
2213
+
2214
+ // Remove leading significant zeros just after the decimal point
2215
+ // and adjust the exponent accordingly.
2216
+ // Note that the while-loop operates only on strings of the form ".000abcd..."
2217
+ // and peels away the zeros just after the decimal point.
2218
+ if (my_str.at(static_cast<std::size_t>(0u)) == static_cast<char>('.'))
2219
+ {
2220
+ const std::string::iterator it_non_zero = std::find_if(my_str.begin() + 1u, my_str.end(), char_is_nonzero_predicate);
2221
+
2222
+ std::size_t delta_exp = static_cast<std::size_t>(0u);
2223
+
2224
+ if (my_str.at(static_cast<std::size_t>(1u)) == static_cast<char>('0'))
2225
+ {
2226
+ delta_exp = static_cast<std::size_t>(std::distance<std::string::const_iterator>(my_str.begin() + 1u, it_non_zero));
2227
+ }
2228
+
2229
+ // Bring one single digit into the mantissa and adjust the exponent accordingly.
2230
+ my_str.erase(my_str.begin(), it_non_zero);
2231
+ my_str.insert(static_cast<std::string::size_type>(1u), ".");
2232
+ exp -= static_cast<exponent_type>(delta_exp + 1u);
2233
+ }
2234
+ }
2235
+ else
2236
+ {
2237
+ // We should have only digits:
2238
+ if (my_str.find_first_not_of(valid_characters) != std::string::npos)
2239
+ BOOST_MP_THROW_EXCEPTION(std::runtime_error("Can not construct a floating point with non-numeric content")); // LCOV_EXCL_LINE
2240
+
2241
+ // Input string has no decimal point: Append decimal point.
2242
+ my_str.append(".");
2243
+ }
2244
+
2245
+ // Shift the decimal point such that the exponent is an even multiple of cpp_dec_float_elem_digits10.
2246
+ std::ptrdiff_t n_shift = static_cast<std::ptrdiff_t>(0);
2247
+ const std::ptrdiff_t n_exp_rem = static_cast<std::ptrdiff_t>(exp % static_cast<exponent_type>(cpp_dec_float_elem_digits10));
2248
+
2249
+ if((exp % static_cast<exponent_type>(cpp_dec_float_elem_digits10)) != static_cast<exponent_type>(0))
2250
+ {
2251
+ n_shift = ((exp < static_cast<exponent_type>(0))
2252
+ ? static_cast<std::ptrdiff_t>(n_exp_rem + static_cast<std::ptrdiff_t>(cpp_dec_float_elem_digits10))
2253
+ : static_cast<std::ptrdiff_t>(n_exp_rem));
2254
+ }
2255
+
2256
+ // Make sure that there are enough digits for the decimal point shift.
2257
+ pos = my_str.find(static_cast<char>('.'));
2258
+
2259
+ std::ptrdiff_t pos_plus_one = static_cast<std::ptrdiff_t>(pos + 1);
2260
+
2261
+ if ((static_cast<std::ptrdiff_t>(my_str.length()) - pos_plus_one) < n_shift)
2262
+ {
2263
+ const std::ptrdiff_t sz = static_cast<std::ptrdiff_t>(n_shift - (static_cast<std::ptrdiff_t>(my_str.length()) - pos_plus_one));
2264
+
2265
+ my_str.append(std::string(static_cast<std::string::size_type>(sz), static_cast<char>('0')));
2266
+ }
2267
+
2268
+ // Do the decimal point shift.
2269
+ if (n_shift != static_cast<std::ptrdiff_t>(0))
2270
+ {
2271
+ my_str.insert(static_cast<std::string::size_type>(pos_plus_one + n_shift), ".");
2272
+
2273
+ my_str.erase(pos, static_cast<std::ptrdiff_t>(1));
2274
+
2275
+ exp -= static_cast<exponent_type>(n_shift);
2276
+ }
2277
+
2278
+ // Cut the size of the mantissa to <= cpp_dec_float_elem_digits10.
2279
+ pos = my_str.find(static_cast<char>('.'));
2280
+ pos_plus_one = static_cast<std::ptrdiff_t>(pos + 1u);
2281
+
2282
+ if (pos > static_cast<std::size_t>(cpp_dec_float_elem_digits10))
2283
+ {
2284
+ const std::int32_t n_pos = static_cast<std::int32_t>(pos);
2285
+ const std::int32_t n_rem_is_zero = ((static_cast<std::int32_t>(n_pos % cpp_dec_float_elem_digits10) == static_cast<std::int32_t>(0)) ? static_cast<std::int32_t>(1) : static_cast<std::int32_t>(0));
2286
+ const std::int32_t n = static_cast<std::int32_t>(static_cast<std::int32_t>(n_pos / cpp_dec_float_elem_digits10) - n_rem_is_zero);
2287
+
2288
+ my_str.insert(static_cast<std::size_t>(static_cast<std::int32_t>(n_pos - static_cast<std::int32_t>(n * cpp_dec_float_elem_digits10))), ".");
2289
+
2290
+ my_str.erase(static_cast<std::size_t>(pos_plus_one), static_cast<std::size_t>(1u));
2291
+
2292
+ exp += static_cast<exponent_type>(static_cast<exponent_type>(n) * static_cast<exponent_type>(cpp_dec_float_elem_digits10));
2293
+ }
2294
+
2295
+ // Pad the decimal part such that its value is an even
2296
+ // multiple of cpp_dec_float_elem_digits10.
2297
+ pos = my_str.find(static_cast<char>('.'));
2298
+ pos_plus_one = static_cast<std::ptrdiff_t>(pos + 1u);
2299
+
2300
+ // Throws an error for a strange construction like 3.14L
2301
+ if(pos != std::string::npos && (my_str.back() == 'L' || my_str.back() == 'l' || my_str.back() == 'u' || my_str.back() == 'U'))
2302
+ {
2303
+ BOOST_MP_THROW_EXCEPTION(std::runtime_error("Can not construct a floating point with an integer literal")); // LCOV_EXCL_LINE
2304
+ }
2305
+
2306
+ const std::int32_t n_dec = static_cast<std::int32_t>(static_cast<std::int32_t>(my_str.length() - 1u) - static_cast<std::int32_t>(pos));
2307
+ const std::int32_t n_rem = static_cast<std::int32_t>(n_dec % cpp_dec_float_elem_digits10);
2308
+
2309
+ std::int32_t n_cnt = ((n_rem != static_cast<std::int32_t>(0))
2310
+ ? static_cast<std::int32_t>(cpp_dec_float_elem_digits10 - n_rem)
2311
+ : static_cast<std::int32_t>(0));
2312
+
2313
+ if (n_cnt != static_cast<std::int32_t>(0))
2314
+ {
2315
+ my_str.append(static_cast<std::size_t>(n_cnt), static_cast<char>('0'));
2316
+ }
2317
+
2318
+ // Truncate decimal part if it is too long.
2319
+ const std::size_t max_dec = static_cast<std::size_t>((cpp_dec_float_elem_number - 1) * cpp_dec_float_elem_digits10);
2320
+
2321
+ if (static_cast<std::size_t>(my_str.length() - pos) > max_dec)
2322
+ {
2323
+ my_str = my_str.substr(static_cast<std::size_t>(0u),
2324
+ static_cast<std::size_t>(pos_plus_one + static_cast<std::ptrdiff_t>(max_dec)));
2325
+ }
2326
+
2327
+ // Now the input string has the standard cpp_dec_float<Digits10, ExponentType, Allocator> input form.
2328
+ // (See the comment above.)
2329
+
2330
+ // Set all the data elements to 0.
2331
+ std::fill(data.begin(), data.end(), static_cast<std::uint32_t>(0u));
2332
+
2333
+ // Extract the data.
2334
+
2335
+ // First get the digits to the left of the decimal point...
2336
+ data[0u] = static_cast<std::uint32_t>(std::stol(my_str.substr(static_cast<std::size_t>(0u), pos)));
2337
+
2338
+ // ...then get the remaining digits to the right of the decimal point.
2339
+ const std::string::size_type i_end =
2340
+ (
2341
+ static_cast<std::string::size_type>(my_str.length() - static_cast<std::string::size_type>(pos_plus_one))
2342
+ / static_cast<std::string::size_type>(cpp_dec_float_elem_digits10)
2343
+ );
2344
+
2345
+ for (std::string::size_type i = static_cast<std::string::size_type>(0u); i < i_end; i++)
2346
+ {
2347
+ const std::string::const_iterator it =
2348
+ my_str.begin()
2349
+ + static_cast<std::ptrdiff_t>
2350
+ (
2351
+ static_cast<std::string::size_type>(pos_plus_one)
2352
+ + static_cast<std::string::size_type>(i * static_cast<std::string::size_type>(cpp_dec_float_elem_digits10))
2353
+ );
2354
+
2355
+ data[i + 1u] = static_cast<std::uint32_t>(std::stol(std::string(it, it + static_cast<std::string::size_type>(cpp_dec_float_elem_digits10))));
2356
+ }
2357
+
2358
+ // Check for overflow...
2359
+ if (exp >= cpp_dec_float_max_exp10)
2360
+ {
2361
+ const bool neg_tmp { neg };
2362
+
2363
+ neg = false;
2364
+
2365
+ const int compare_result { compare((cpp_dec_float::max)()) };
2366
+
2367
+ if(compare_result > 0)
2368
+ {
2369
+ *this = inf();
2370
+ }
2371
+
2372
+ neg = neg_tmp;
2373
+ }
2374
+
2375
+ // ...and check for underflow.
2376
+ if (exp <= cpp_dec_float_min_exp10)
2377
+ {
2378
+ const bool neg_tmp { neg };
2379
+
2380
+ neg = false;
2381
+
2382
+ const int compare_result { compare((cpp_dec_float::min)()) };
2383
+
2384
+ if(compare_result < 0)
2385
+ {
2386
+ *this = zero();
2387
+ }
2388
+ else
2389
+ {
2390
+ neg = neg_tmp;
2391
+ }
2392
+ }
2393
+
2394
+
2395
+ #ifndef BOOST_NO_EXCEPTIONS
2396
+ }
2397
+ #ifndef BOOST_MP_STANDALONE
2398
+ catch (const bad_lexical_cast&)
2399
+ #else
2400
+ catch (const std::exception&)
2401
+ #endif
2402
+ {
2403
+ // Rethrow with better error message:
2404
+ std::string msg = "Unable to parse the string \"";
2405
+ msg += s;
2406
+ msg += "\" as a floating point value.";
2407
+ throw std::runtime_error(msg);
2408
+ }
2409
+ #endif
2410
+ return true;
2411
+ }
2412
+
2413
+ template <unsigned Digits10, class ExponentType, class Allocator>
2414
+ cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float(const double mantissa, const ExponentType exp10)
2415
+ {
2416
+ // Create *this cpp_dec_float<Digits10, ExponentType, Allocator>
2417
+ // from a given mantissa and base-10 exponent. It is important
2418
+ // to note that this constructor does *not* maintain the full
2419
+ // precision of double. It is used internally (privately), mostly
2420
+ // as a first guess for Newton iteration in square root and inversion.
2421
+
2422
+ std::fill(data.begin(), data.end(), static_cast<std::uint32_t>(0u));
2423
+
2424
+ constexpr double
2425
+ dbl_min_check
2426
+ {
2427
+ static_cast<double>
2428
+ (
2429
+ (std::numeric_limits<double>::min)() * (1.0 + std::numeric_limits<double>::epsilon())
2430
+ )
2431
+ };
2432
+
2433
+ const bool b_neg { (mantissa < 0.0) };
2434
+
2435
+ double d_mant { ((!b_neg) ? mantissa : -mantissa) };
2436
+
2437
+ const bool mantissa_is_non_zero { (d_mant > dbl_min_check) };
2438
+
2439
+ if (mantissa_is_non_zero)
2440
+ {
2441
+ exponent_type exp10_val { exp10 };
2442
+
2443
+ // This subroutine is used after a call to extract_parts().
2444
+ // The corresponding scaling loop for (d_mant > 10.0) is not
2445
+ // needed here since extract_parts() returns a mantissa value
2446
+ // between 1 and 10. The loop for (d_mant < 1.0) is needed
2447
+ // since the initial guess of the square root in tghe subroutine
2448
+ // calculate_root() might have been divided by 10 in order
2449
+ // to obtain an exponent value that is a multiple of 2.
2450
+
2451
+ while (d_mant < 1.0)
2452
+ {
2453
+ d_mant *= 10.0;
2454
+ --exp10_val;
2455
+ }
2456
+
2457
+ std::int32_t shift = static_cast<std::int32_t>(exp10_val % static_cast<std::int32_t>(cpp_dec_float_elem_digits10));
2458
+
2459
+ while (static_cast<std::int32_t>(shift-- % cpp_dec_float_elem_digits10) != static_cast<std::int32_t>(0))
2460
+ {
2461
+ d_mant *= 10.0;
2462
+ --exp10_val;
2463
+ }
2464
+
2465
+ exp = exp10_val;
2466
+ neg = b_neg;
2467
+
2468
+ constexpr std::int32_t digit_ratio = static_cast<std::int32_t>(static_cast<std::int32_t>(std::numeric_limits<double>::digits10) / static_cast<std::int32_t>(cpp_dec_float_elem_digits10));
2469
+ constexpr std::int32_t digit_loops = static_cast<std::int32_t>(digit_ratio + static_cast<std::int32_t>(2));
2470
+
2471
+ for (std::int32_t i = static_cast<std::int32_t>(0); i < digit_loops; i++)
2472
+ {
2473
+ std::uint32_t n = static_cast<std::uint32_t>(static_cast<std::uint64_t>(d_mant));
2474
+ data[static_cast<std::size_t>(i)] = static_cast<std::uint32_t>(n);
2475
+ d_mant -= static_cast<double>(n);
2476
+ d_mant *= static_cast<double>(cpp_dec_float_elem_mask);
2477
+ }
2478
+ }
2479
+ } // LCOV_EXCL_LINE This causes a false negative on lcov coverage test.
2480
+
2481
+ template <unsigned Digits10, class ExponentType, class Allocator>
2482
+ template <class Float>
2483
+ typename std::enable_if<std::is_floating_point<Float>::value, cpp_dec_float<Digits10, ExponentType, Allocator>&>::type cpp_dec_float<Digits10, ExponentType, Allocator>::operator=(Float a)
2484
+ {
2485
+ // Christopher Kormanyos's original code used a cast to long long here,
2486
+ // but that fails when long double has more digits than a long long.
2487
+
2488
+ BOOST_MP_FLOAT128_USING
2489
+
2490
+ using std::floor;
2491
+ using std::frexp;
2492
+ using std::ldexp;
2493
+
2494
+ if (a == 0)
2495
+ return *this = zero();
2496
+
2497
+ if (a == 1)
2498
+ return *this = one();
2499
+
2500
+ if (BOOST_MP_ISINF(a))
2501
+ {
2502
+ *this = inf();
2503
+ if (a < 0)
2504
+ this->negate();
2505
+ return *this;
2506
+ }
2507
+
2508
+ if (BOOST_MP_ISNAN(a))
2509
+ return *this = nan();
2510
+
2511
+ int e;
2512
+ Float f, term;
2513
+ *this = zero();
2514
+
2515
+ f = frexp(a, &e);
2516
+ // See https://svn.boost.org/trac/boost/ticket/10924 for an example of why this may go wrong:
2517
+ BOOST_MP_ASSERT(!BOOST_MP_ISNAN(f) && !BOOST_MP_ISINF(f));
2518
+
2519
+ constexpr int shift = std::numeric_limits<int>::digits - 1;
2520
+
2521
+ while (f != static_cast<Float>(0.0f))
2522
+ {
2523
+ // extract int sized bits from f:
2524
+ f = ldexp(f, shift);
2525
+ BOOST_MP_ASSERT(!BOOST_MP_ISNAN(f) && !BOOST_MP_ISINF(f));
2526
+ term = floor(f);
2527
+ e -= shift;
2528
+ *this *= pow2(shift);
2529
+ if (term > 0)
2530
+ add_unsigned_long_long(static_cast<unsigned>(term));
2531
+ else
2532
+ sub_unsigned_long_long(static_cast<unsigned>(-term));
2533
+ f -= term;
2534
+ }
2535
+
2536
+ if (e != 0)
2537
+ *this *= pow2(e);
2538
+
2539
+ return *this;
2540
+ }
2541
+
2542
+ template <unsigned Digits10, class ExponentType, class Allocator>
2543
+ void cpp_dec_float<Digits10, ExponentType, Allocator>::from_unsigned_long_long(const unsigned long long u)
2544
+ {
2545
+ std::fill(data.begin(), data.end(), static_cast<std::uint32_t>(0u));
2546
+
2547
+ exp = static_cast<exponent_type>(0);
2548
+ neg = false;
2549
+ fpclass = cpp_dec_float_finite;
2550
+ prec_elem = cpp_dec_float_elem_number;
2551
+
2552
+ if (u == 0)
2553
+ {
2554
+ return;
2555
+ }
2556
+
2557
+ std::size_t index { static_cast<std::size_t>(0u) };
2558
+
2559
+ unsigned long long uu { u };
2560
+
2561
+ constexpr std::size_t
2562
+ local_storage_size
2563
+ {
2564
+ static_cast<std::size_t>
2565
+ (
2566
+ (std::numeric_limits<unsigned long long>::digits10 / static_cast<int>(cpp_dec_float_elem_digits10)) + 3
2567
+ )
2568
+ };
2569
+
2570
+ using local_limb_type = std::uint32_t;
2571
+
2572
+ using local_tmp_array_type = std::array<local_limb_type, local_storage_size>;
2573
+
2574
+ local_tmp_array_type temp { };
2575
+
2576
+ while (uu != static_cast<unsigned long long>(0u))
2577
+ {
2578
+ temp[index] = static_cast<local_limb_type>(uu % static_cast<unsigned long long>(cpp_dec_float_elem_mask));
2579
+
2580
+ uu = static_cast<unsigned long long>(uu / static_cast<unsigned long long>(cpp_dec_float_elem_mask));
2581
+
2582
+ ++index;
2583
+ }
2584
+
2585
+ if (index > static_cast<std::size_t>(1u))
2586
+ {
2587
+ exp += static_cast<exponent_type>((index - 1u) * static_cast<std::size_t>(cpp_dec_float_elem_digits10));
2588
+ }
2589
+
2590
+ const std::size_t
2591
+ copy_size
2592
+ {
2593
+ (std::min)(index, static_cast<std::size_t>(cpp_dec_float_elem_number))
2594
+ };
2595
+
2596
+ using local_const_reverse_iterator_type = std::reverse_iterator<const local_limb_type*>;
2597
+
2598
+ std::copy
2599
+ (
2600
+ local_const_reverse_iterator_type(temp.data() + copy_size),
2601
+ local_const_reverse_iterator_type(temp.data()),
2602
+ data.begin()
2603
+ );
2604
+ }
2605
+
2606
+ template <unsigned Digits10, class ExponentType, class Allocator>
2607
+ template <typename InputIteratorTypeLeft, typename InputIteratorTypeRight>
2608
+ int cpp_dec_float<Digits10, ExponentType, Allocator>::compare_ranges(InputIteratorTypeLeft a,
2609
+ InputIteratorTypeRight b,
2610
+ const std::uint32_t count)
2611
+ {
2612
+ using local_iterator_left_type = InputIteratorTypeLeft;
2613
+ using local_iterator_right_type = InputIteratorTypeRight;
2614
+
2615
+ local_iterator_left_type begin_a(a);
2616
+ local_iterator_left_type end_a (a + static_cast<typename std::iterator_traits<local_iterator_left_type >::difference_type>(count));
2617
+ local_iterator_right_type begin_b(b);
2618
+ local_iterator_right_type end_b (b + static_cast<typename std::iterator_traits<local_iterator_right_type>::difference_type>(count));
2619
+
2620
+ const auto mismatch_pair = std::mismatch(begin_a, end_a, begin_b);
2621
+
2622
+ int n_return;
2623
+
2624
+ if((mismatch_pair.first != end_a) || (mismatch_pair.second != end_b))
2625
+ {
2626
+ const typename std::iterator_traits<local_iterator_left_type >::value_type left = *mismatch_pair.first;
2627
+ const typename std::iterator_traits<local_iterator_right_type>::value_type right = *mismatch_pair.second;
2628
+
2629
+ n_return = ((left > right) ? 1 : -1);
2630
+ }
2631
+ else
2632
+ {
2633
+ n_return = 0;
2634
+ }
2635
+
2636
+ return n_return;
2637
+ }
2638
+
2639
+ template <unsigned Digits10, class ExponentType, class Allocator>
2640
+ std::uint32_t cpp_dec_float<Digits10, ExponentType, Allocator>::eval_add_n( std::uint32_t* r,
2641
+ const std::uint32_t* u,
2642
+ const std::uint32_t* v,
2643
+ const std::int32_t count)
2644
+ {
2645
+ // Addition algorithm
2646
+ std::uint_fast8_t carry = static_cast<std::uint_fast8_t>(0U);
2647
+
2648
+ for(std::int32_t j = static_cast<std::int32_t>(count - static_cast<std::int32_t>(1)); j >= static_cast<std::int32_t>(0); --j)
2649
+ {
2650
+ const std::uint32_t t = static_cast<std::uint32_t>(static_cast<std::uint32_t>(u[j] + v[j]) + carry);
2651
+
2652
+ carry = ((t >= static_cast<std::uint32_t>(cpp_dec_float_elem_mask)) ? static_cast<std::uint_fast8_t>(1U)
2653
+ : static_cast<std::uint_fast8_t>(0U));
2654
+
2655
+ r[j] = static_cast<std::uint32_t>(t - ((carry != 0U) ? static_cast<std::uint32_t>(cpp_dec_float_elem_mask)
2656
+ : static_cast<std::uint32_t>(0U)));
2657
+ }
2658
+
2659
+ return static_cast<std::uint32_t>(carry);
2660
+ }
2661
+
2662
+ template <unsigned Digits10, class ExponentType, class Allocator>
2663
+ std::uint32_t cpp_dec_float<Digits10, ExponentType, Allocator>::eval_subtract_n( std::uint32_t* r,
2664
+ const std::uint32_t* u,
2665
+ const std::uint32_t* v,
2666
+ const std::int32_t count)
2667
+ {
2668
+ // Subtraction algorithm
2669
+ std::int_fast8_t borrow = static_cast<std::int_fast8_t>(0);
2670
+
2671
+ for(std::uint32_t j = static_cast<std::uint32_t>(count - static_cast<std::int32_t>(1)); static_cast<std::int32_t>(j) >= static_cast<std::int32_t>(0); --j)
2672
+ {
2673
+ std::int32_t t = static_cast<std::int32_t>( static_cast<std::int32_t>(u[j])
2674
+ - static_cast<std::int32_t>(v[j])) - borrow;
2675
+
2676
+ // Underflow? Borrow?
2677
+ if(t < 0)
2678
+ {
2679
+ // Yes, underflow and borrow
2680
+ t += static_cast<std::int32_t>(cpp_dec_float_elem_mask);
2681
+ borrow = static_cast<std::int_fast8_t>(1);
2682
+ }
2683
+ else
2684
+ {
2685
+ borrow = static_cast<std::int_fast8_t>(0);
2686
+ }
2687
+
2688
+ r[j] = static_cast<std::uint32_t>(t);
2689
+ }
2690
+
2691
+ return static_cast<std::uint32_t>(borrow);
2692
+ }
2693
+
2694
+ template <unsigned Digits10, class ExponentType, class Allocator>
2695
+ void cpp_dec_float<Digits10, ExponentType, Allocator>::eval_multiply_n_by_n_to_2n( std::uint32_t* r,
2696
+ const std::uint32_t* a,
2697
+ const std::uint32_t* b,
2698
+ const std::uint32_t count)
2699
+ {
2700
+ using local_limb_type = std::uint32_t;
2701
+
2702
+ using local_double_limb_type = std::uint64_t;
2703
+
2704
+ using local_reverse_iterator_type = std::reverse_iterator<local_limb_type*>;
2705
+
2706
+ local_reverse_iterator_type ir(r + (count * 2));
2707
+
2708
+ local_double_limb_type carry = 0U;
2709
+
2710
+ for(std::int32_t j = static_cast<std::int32_t>(count - 1); j >= static_cast<std::int32_t>(1); --j)
2711
+ {
2712
+ local_double_limb_type sum = carry;
2713
+
2714
+ for(std::int32_t i = static_cast<std::int32_t>(count - 1); i >= j; --i)
2715
+ {
2716
+ sum += local_double_limb_type(
2717
+ local_double_limb_type(a[i]) * b[ static_cast<std::int32_t>(count - 1)
2718
+ - static_cast<std::int32_t>(i - j)]);
2719
+ }
2720
+
2721
+ carry = static_cast<local_double_limb_type>(sum / static_cast<local_limb_type> (cpp_dec_float_elem_mask));
2722
+ *ir++ = static_cast<local_limb_type> (sum - static_cast<local_double_limb_type>(static_cast<local_double_limb_type>(carry) * static_cast<local_limb_type>(cpp_dec_float_elem_mask)));
2723
+ }
2724
+
2725
+ for(std::int32_t j = static_cast<std::int32_t>(count - 1); j >= static_cast<std::int32_t>(0); --j)
2726
+ {
2727
+ local_double_limb_type sum = carry;
2728
+
2729
+ for(std::int32_t i = j; i >= static_cast<std::int32_t>(0); --i)
2730
+ {
2731
+ sum += static_cast<local_double_limb_type>(a[j - i] * static_cast<local_double_limb_type>(b[i]));
2732
+ }
2733
+
2734
+ carry = static_cast<local_double_limb_type>(sum / static_cast<local_limb_type>(cpp_dec_float_elem_mask));
2735
+ *ir++ = static_cast<local_limb_type> (sum - static_cast<local_double_limb_type>(static_cast<local_double_limb_type>(carry) * static_cast<local_limb_type>(cpp_dec_float_elem_mask)));
2736
+ }
2737
+
2738
+ *ir = static_cast<local_limb_type>(carry);
2739
+ }
2740
+
2741
+ template <unsigned Digits10, class ExponentType, class Allocator>
2742
+ std::uint32_t cpp_dec_float<Digits10, ExponentType, Allocator>::mul_loop_n(std::uint32_t* const u, std::uint32_t n, const std::int32_t p)
2743
+ {
2744
+ std::uint64_t carry = static_cast<std::uint64_t>(0u);
2745
+
2746
+ // Multiplication loop.
2747
+ for (std::int32_t j = p - 1; j >= static_cast<std::int32_t>(0); j--)
2748
+ {
2749
+ const std::uint64_t t = static_cast<std::uint64_t>(carry + static_cast<std::uint64_t>(u[j] * static_cast<std::uint64_t>(n)));
2750
+ carry = static_cast<std::uint64_t>(t / static_cast<std::uint32_t>(cpp_dec_float_elem_mask));
2751
+ u[j] = static_cast<std::uint32_t>(t - static_cast<std::uint64_t>(static_cast<std::uint32_t>(cpp_dec_float_elem_mask) * static_cast<std::uint64_t>(carry)));
2752
+ }
2753
+
2754
+ return static_cast<std::uint32_t>(carry);
2755
+ }
2756
+
2757
+ template <unsigned Digits10, class ExponentType, class Allocator>
2758
+ std::uint32_t cpp_dec_float<Digits10, ExponentType, Allocator>::div_loop_n(std::uint32_t* const u, std::uint32_t n, const std::int32_t p)
2759
+ {
2760
+ std::uint64_t prev = static_cast<std::uint64_t>(0u);
2761
+
2762
+ for (std::int32_t j = static_cast<std::int32_t>(0); j < p; j++)
2763
+ {
2764
+ const std::uint64_t t = static_cast<std::uint64_t>(u[j] + static_cast<std::uint64_t>(prev * static_cast<std::uint32_t>(cpp_dec_float_elem_mask)));
2765
+ u[j] = static_cast<std::uint32_t>(t / n);
2766
+ prev = static_cast<std::uint64_t>(t - static_cast<std::uint64_t>(n * static_cast<std::uint64_t>(u[j])));
2767
+ }
2768
+
2769
+ return static_cast<std::uint32_t>(prev);
2770
+ }
2771
+
2772
+ template <unsigned Digits10, class ExponentType, class Allocator>
2773
+ void cpp_dec_float<Digits10, ExponentType, Allocator>::eval_multiply_kara_propagate_carry(std::uint32_t* t, const std::uint32_t n, const std::uint32_t carry)
2774
+ {
2775
+ std::uint_fast8_t carry_out = ((carry != 0U) ? static_cast<std::uint_fast8_t>(1U)
2776
+ : static_cast<std::uint_fast8_t>(0U));
2777
+
2778
+ using local_reverse_iterator_type = std::reverse_iterator<std::uint32_t*>;
2779
+
2780
+ local_reverse_iterator_type ri_t (t + n);
2781
+ local_reverse_iterator_type rend_t(t);
2782
+
2783
+ while((carry_out != 0U) && (ri_t != rend_t))
2784
+ {
2785
+ const std::uint64_t tt = *ri_t + carry_out;
2786
+
2787
+ carry_out = ((tt >= static_cast<std::uint32_t>(cpp_dec_float_elem_mask)) ? static_cast<std::uint_fast8_t>(1U)
2788
+ : static_cast<std::uint_fast8_t>(0U));
2789
+
2790
+ *ri_t++ = static_cast<std::uint32_t>(tt - ((carry_out != 0U) ? static_cast<std::uint32_t>(cpp_dec_float_elem_mask)
2791
+ : static_cast<std::uint32_t>(0U)));
2792
+ }
2793
+ }
2794
+
2795
+ template <unsigned Digits10, class ExponentType, class Allocator>
2796
+ void cpp_dec_float<Digits10, ExponentType, Allocator>::eval_multiply_kara_propagate_borrow(std::uint32_t* t, const std::uint32_t n, const bool has_borrow)
2797
+ {
2798
+ std::int_fast8_t borrow = (has_borrow ? static_cast<std::int_fast8_t>(1)
2799
+ : static_cast<std::int_fast8_t>(0));
2800
+
2801
+ using local_reverse_iterator_type = std::reverse_iterator<std::uint32_t*>;
2802
+
2803
+ local_reverse_iterator_type ri_t (t + n);
2804
+ local_reverse_iterator_type rend_t(t);
2805
+
2806
+ while((borrow != 0U) && (ri_t != rend_t))
2807
+ {
2808
+ std::int32_t tt = static_cast<std::int32_t>(static_cast<std::int32_t>(*ri_t) - borrow);
2809
+
2810
+ // Underflow? Borrow?
2811
+ if(tt < 0)
2812
+ {
2813
+ // Yes, underflow and borrow
2814
+ tt += static_cast<std::int32_t>(cpp_dec_float_elem_mask);
2815
+ borrow = static_cast<int_fast8_t>(1);
2816
+ }
2817
+ else
2818
+ {
2819
+ borrow = static_cast<int_fast8_t>(0);
2820
+ }
2821
+
2822
+ *ri_t++ = static_cast<std::uint32_t>(tt);
2823
+ }
2824
+ }
2825
+
2826
+ template <unsigned Digits10, class ExponentType, class Allocator>
2827
+ void cpp_dec_float<Digits10, ExponentType, Allocator>::eval_multiply_kara_n_by_n_to_2n( std::uint32_t* r,
2828
+ const std::uint32_t* a,
2829
+ const std::uint32_t* b,
2830
+ const std::uint32_t n,
2831
+ std::uint32_t* t)
2832
+ {
2833
+ if(n <= 32U)
2834
+ {
2835
+ static_cast<void>(t);
2836
+
2837
+ eval_multiply_n_by_n_to_2n(r, a, b, n);
2838
+ }
2839
+ else
2840
+ {
2841
+ // Based on "Algorithm 1.3 KaratsubaMultiply", Sect. 1.3.2, page 5
2842
+ // of R.P. Brent and P. Zimmermann, "Modern Computer Arithmetic",
2843
+ // Cambridge University Press (2011).
2844
+
2845
+ // The Karatsuba multipliation computes the product of a*b as:
2846
+ // [b^N + b^(N/2)] a1*b1 + [b^(N/2)](a1 - a0)(b0 - b1) + [b^(N/2) + 1] a0*b0
2847
+
2848
+ // Here we visualize a and b in two components 1,0 corresponding
2849
+ // to the high and low order parts, respectively.
2850
+
2851
+ // Step 1
2852
+ // Calculate a1*b1 and store it in the upper-order part of r.
2853
+ // Calculate a0*b0 and store it in the lower-order part of r.
2854
+ // copy r to t0.
2855
+
2856
+ // Step 2
2857
+ // Add a1*b1 (which is t2) to the middle two-quarters of r (which is r1)
2858
+ // Add a0*b0 (which is t0) to the middle two-quarters of r (which is r1)
2859
+
2860
+ // Step 3
2861
+ // Calculate |a1-a0| in t0 and note the sign (i.e., the borrow flag)
2862
+
2863
+ // Step 4
2864
+ // Calculate |b0-b1| in t1 and note the sign (i.e., the borrow flag)
2865
+
2866
+ // Step 5
2867
+ // Call kara mul to calculate |a1-a0|*|b0-b1| in (t2),
2868
+ // while using temporary storage in t4 along the way.
2869
+
2870
+ // Step 6
2871
+ // Check the borrow signs. If a1-a0 and b0-b1 have the same signs,
2872
+ // then add |a1-a0|*|b0-b1| to r1, otherwise subtract it from r1.
2873
+
2874
+ const std::uint_fast32_t nh = n / 2U;
2875
+
2876
+ const std::uint32_t* a0 = a + nh;
2877
+ const std::uint32_t* a1 = a + 0U;
2878
+
2879
+ const std::uint32_t* b0 = b + nh;
2880
+ const std::uint32_t* b1 = b + 0U;
2881
+
2882
+ std::uint32_t* r0 = r + 0U;
2883
+ std::uint32_t* r1 = r + nh;
2884
+ std::uint32_t* r2 = r + n;
2885
+
2886
+ std::uint32_t* t0 = t + 0U;
2887
+ std::uint32_t* t1 = t + nh;
2888
+ std::uint32_t* t2 = t + n;
2889
+ std::uint32_t* t4 = t + (n + n);
2890
+
2891
+ // Step 1
2892
+ eval_multiply_kara_n_by_n_to_2n(r0, a1, b1, static_cast<std::uint32_t>(nh), t);
2893
+ eval_multiply_kara_n_by_n_to_2n(r2, a0, b0, static_cast<std::uint32_t>(nh), t);
2894
+ std::copy(r0, r0 + (2U * n), t0);
2895
+
2896
+ // Step 2
2897
+ std::uint32_t carry;
2898
+ carry = eval_add_n(r1, r1, t0, static_cast<std::int32_t>(n));
2899
+ eval_multiply_kara_propagate_carry(r0, static_cast<std::uint32_t>(nh), carry);
2900
+ carry = eval_add_n(r1, r1, t2, static_cast<std::int32_t>(n));
2901
+ eval_multiply_kara_propagate_carry(r0, static_cast<std::uint32_t>(nh), carry);
2902
+
2903
+ // Step 3
2904
+ const int cmp_result_a1a0 = compare_ranges(a1, a0, static_cast<std::uint32_t>(nh));
2905
+
2906
+ if(cmp_result_a1a0 == 1)
2907
+ static_cast<void>(eval_subtract_n(t0, a1, a0, static_cast<std::int32_t>(nh)));
2908
+ else if(cmp_result_a1a0 == -1)
2909
+ static_cast<void>(eval_subtract_n(t0, a0, a1, static_cast<std::int32_t>(nh)));
2910
+
2911
+ // Step 4
2912
+ const int cmp_result_b0b1 = compare_ranges(b0, b1, static_cast<std::uint32_t>(nh));
2913
+
2914
+ if(cmp_result_b0b1 == 1)
2915
+ static_cast<void>(eval_subtract_n(t1, b0, b1, static_cast<std::int32_t>(nh)));
2916
+ else if(cmp_result_b0b1 == -1)
2917
+ static_cast<void>(eval_subtract_n(t1, b1, b0, static_cast<std::int32_t>(nh)));
2918
+
2919
+ // Step 5
2920
+ eval_multiply_kara_n_by_n_to_2n(t2, t0, t1, static_cast<std::uint32_t>(nh), t4);
2921
+
2922
+ // Step 6
2923
+ if((cmp_result_a1a0 * cmp_result_b0b1) == 1)
2924
+ {
2925
+ carry = eval_add_n(r1, r1, t2, static_cast<std::int32_t>(n));
2926
+
2927
+ eval_multiply_kara_propagate_carry(r0, static_cast<std::uint32_t>(nh), carry);
2928
+ }
2929
+ else if((cmp_result_a1a0 * cmp_result_b0b1) == -1)
2930
+ {
2931
+ const bool has_borrow = eval_subtract_n(r1, r1, t2, static_cast<std::int32_t>(n));
2932
+
2933
+ eval_multiply_kara_propagate_borrow(r0, static_cast<std::uint32_t>(nh), has_borrow);
2934
+ }
2935
+ }
2936
+ }
2937
+
2938
+ template <unsigned Digits10, class ExponentType, class Allocator>
2939
+ cpp_dec_float<Digits10, ExponentType, Allocator> cpp_dec_float<Digits10, ExponentType, Allocator>::pow2(const long long p)
2940
+ {
2941
+ static const std::array<cpp_dec_float<Digits10, ExponentType, Allocator>, 256u> local_pow2_data =
2942
+ {{
2943
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 29u, 38735877u, 5571876u, 99218413u, 43055614u, 19454666u, 38919302u, 18803771u, 87926569u, 60431486u, 36817932u, 12890625u }, -40 ),
2944
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 58u, 77471754u, 11143753u, 98436826u, 86111228u, 38909332u, 77838604u, 37607543u, 75853139u, 20862972u, 73635864u, 25781250u }, -40 ),
2945
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 117u, 54943508u, 22287507u, 96873653u, 72222456u, 77818665u, 55677208u, 75215087u, 51706278u, 41725945u, 47271728u, 51562500u }, -40 ),
2946
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 235u, 9887016u, 44575015u, 93747307u, 44444913u, 55637331u, 11354417u, 50430175u, 3412556u, 83451890u, 94543457u, 3125000u }, -40 ),
2947
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 470u, 19774032u, 89150031u, 87494614u, 88889827u, 11274662u, 22708835u, 860350u, 6825113u, 66903781u, 89086914u, 6250000u }, -40 ),
2948
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 940u, 39548065u, 78300063u, 74989229u, 77779654u, 22549324u, 45417670u, 1720700u, 13650227u, 33807563u, 78173828u, 12500000u }, -40 ),
2949
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1880u, 79096131u, 56600127u, 49978459u, 55559308u, 45098648u, 90835340u, 3441400u, 27300454u, 67615127u, 56347656u, 25000000u }, -40 ),
2950
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3761u, 58192263u, 13200254u, 99956919u, 11118616u, 90197297u, 81670680u, 6882800u, 54600909u, 35230255u, 12695312u, 50000000u }, -40 ),
2951
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 7523u, 16384526u, 26400509u, 99913838u, 22237233u, 80394595u, 63341360u, 13765601u, 9201818u, 70460510u, 25390625u }, -40 ),
2952
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 15046u, 32769052u, 52801019u, 99827676u, 44474467u, 60789191u, 26682720u, 27531202u, 18403637u, 40921020u, 50781250u }, -40 ),
2953
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 30092u, 65538105u, 5602039u, 99655352u, 88948935u, 21578382u, 53365440u, 55062404u, 36807274u, 81842041u, 1562500u }, -40 ),
2954
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 60185u, 31076210u, 11204079u, 99310705u, 77897870u, 43156765u, 6730881u, 10124808u, 73614549u, 63684082u, 3125000u }, -40 ),
2955
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 120370u, 62152420u, 22408159u, 98621411u, 55795740u, 86313530u, 13461762u, 20249617u, 47229099u, 27368164u, 6250000u }, -40 ),
2956
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 240741u, 24304840u, 44816319u, 97242823u, 11591481u, 72627060u, 26923524u, 40499234u, 94458198u, 54736328u, 12500000u }, -40 ),
2957
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 481482u, 48609680u, 89632639u, 94485646u, 23182963u, 45254120u, 53847048u, 80998469u, 88916397u, 9472656u, 25000000u }, -40 ),
2958
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 962964u, 97219361u, 79265279u, 88971292u, 46365926u, 90508241u, 7694097u, 61996939u, 77832794u, 18945312u, 50000000u }, -40 ),
2959
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1925929u, 94438723u, 58530559u, 77942584u, 92731853u, 81016482u, 15388195u, 23993879u, 55665588u, 37890625u }, -40 ),
2960
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3851859u, 88877447u, 17061119u, 55885169u, 85463707u, 62032964u, 30776390u, 47987759u, 11331176u, 75781250u }, -40 ),
2961
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 7703719u, 77754894u, 34122239u, 11770339u, 70927415u, 24065928u, 61552780u, 95975518u, 22662353u, 51562500u }, -40 ),
2962
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 15407439u, 55509788u, 68244478u, 23540679u, 41854830u, 48131857u, 23105561u, 91951036u, 45324707u, 3125000u }, -40 ),
2963
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 30814879u, 11019577u, 36488956u, 47081358u, 83709660u, 96263714u, 46211123u, 83902072u, 90649414u, 6250000u }, -40 ),
2964
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 61629758u, 22039154u, 72977912u, 94162717u, 67419321u, 92527428u, 92422247u, 67804145u, 81298828u, 12500000u }, -40 ),
2965
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1u, 23259516u, 44078309u, 45955825u, 88325435u, 34838643u, 85054857u, 84844495u, 35608291u, 62597656u, 25000000u }, -32 ),
2966
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2u, 46519032u, 88156618u, 91911651u, 76650870u, 69677287u, 70109715u, 69688990u, 71216583u, 25195312u, 50000000u }, -32 ),
2967
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 4u, 93038065u, 76313237u, 83823303u, 53301741u, 39354575u, 40219431u, 39377981u, 42433166u, 50390625u }, -32 ),
2968
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 9u, 86076131u, 52626475u, 67646607u, 6603482u, 78709150u, 80438862u, 78755962u, 84866333u, 781250u }, -32 ),
2969
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 19u, 72152263u, 5252951u, 35293214u, 13206965u, 57418301u, 60877725u, 57511925u, 69732666u, 1562500u }, -32 ),
2970
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 39u, 44304526u, 10505902u, 70586428u, 26413931u, 14836603u, 21755451u, 15023851u, 39465332u, 3125000u }, -32 ),
2971
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 78u, 88609052u, 21011805u, 41172856u, 52827862u, 29673206u, 43510902u, 30047702u, 78930664u, 6250000u }, -32 ),
2972
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 157u, 77218104u, 42023610u, 82345713u, 5655724u, 59346412u, 87021804u, 60095405u, 57861328u, 12500000u }, -32 ),
2973
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 315u, 54436208u, 84047221u, 64691426u, 11311449u, 18692825u, 74043609u, 20190811u, 15722656u, 25000000u }, -32 ),
2974
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 631u, 8872417u, 68094443u, 29382852u, 22622898u, 37385651u, 48087218u, 40381622u, 31445312u, 50000000u }, -32 ),
2975
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1262u, 17744835u, 36188886u, 58765704u, 45245796u, 74771302u, 96174436u, 80763244u, 62890625u }, -32 ),
2976
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2524u, 35489670u, 72377773u, 17531408u, 90491593u, 49542605u, 92348873u, 61526489u, 25781250u }, -32 ),
2977
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 5048u, 70979341u, 44755546u, 35062817u, 80983186u, 99085211u, 84697747u, 23052978u, 51562500u }, -32 ),
2978
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 10097u, 41958682u, 89511092u, 70125635u, 61966373u, 98170423u, 69395494u, 46105957u, 3125000u }, -32 ),
2979
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 20194u, 83917365u, 79022185u, 40251271u, 23932747u, 96340847u, 38790988u, 92211914u, 6250000u }, -32 ),
2980
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 40389u, 67834731u, 58044370u, 80502542u, 47865495u, 92681694u, 77581977u, 84423828u, 12500000u }, -32 ),
2981
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 80779u, 35669463u, 16088741u, 61005084u, 95730991u, 85363389u, 55163955u, 68847656u, 25000000u }, -32 ),
2982
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 161558u, 71338926u, 32177483u, 22010169u, 91461983u, 70726779u, 10327911u, 37695312u, 50000000u }, -32 ),
2983
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 323117u, 42677852u, 64354966u, 44020339u, 82923967u, 41453558u, 20655822u, 75390625u }, -32 ),
2984
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 646234u, 85355705u, 28709932u, 88040679u, 65847934u, 82907116u, 41311645u, 50781250u }, -32 ),
2985
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1292469u, 70711410u, 57419865u, 76081359u, 31695869u, 65814232u, 82623291u, 1562500u }, -32 ),
2986
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2584939u, 41422821u, 14839731u, 52162718u, 63391739u, 31628465u, 65246582u, 3125000u }, -32 ),
2987
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 5169878u, 82845642u, 29679463u, 4325437u, 26783478u, 63256931u, 30493164u, 6250000u }, -32 ),
2988
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 10339757u, 65691284u, 59358926u, 8650874u, 53566957u, 26513862u, 60986328u, 12500000u }, -32 ),
2989
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 20679515u, 31382569u, 18717852u, 17301749u, 7133914u, 53027725u, 21972656u, 25000000u }, -32 ),
2990
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 41359030u, 62765138u, 37435704u, 34603498u, 14267829u, 6055450u, 43945312u, 50000000u }, -32 ),
2991
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 82718061u, 25530276u, 74871408u, 69206996u, 28535658u, 12110900u, 87890625u }, -32 ),
2992
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1u, 65436122u, 51060553u, 49742817u, 38413992u, 57071316u, 24221801u, 75781250u }, -24 ),
2993
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3u, 30872245u, 2121106u, 99485634u, 76827985u, 14142632u, 48443603u, 51562500u }, -24 ),
2994
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 6u, 61744490u, 4242213u, 98971269u, 53655970u, 28285264u, 96887207u, 3125000u }, -24 ),
2995
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 13u, 23488980u, 8484427u, 97942539u, 7311940u, 56570529u, 93774414u, 6250000u }, -24 ),
2996
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 26u, 46977960u, 16968855u, 95885078u, 14623881u, 13141059u, 87548828u, 12500000u }, -24 ),
2997
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 52u, 93955920u, 33937711u, 91770156u, 29247762u, 26282119u, 75097656u, 25000000u }, -24 ),
2998
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 105u, 87911840u, 67875423u, 83540312u, 58495524u, 52564239u, 50195312u, 50000000u }, -24 ),
2999
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 211u, 75823681u, 35750847u, 67080625u, 16991049u, 5128479u, 390625u }, -24 ),
3000
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 423u, 51647362u, 71501695u, 34161250u, 33982098u, 10256958u, 781250u }, -24 ),
3001
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 847u, 3294725u, 43003390u, 68322500u, 67964196u, 20513916u, 1562500u }, -24 ),
3002
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1694u, 6589450u, 86006781u, 36645001u, 35928392u, 41027832u, 3125000u }, -24 ),
3003
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3388u, 13178901u, 72013562u, 73290002u, 71856784u, 82055664u, 6250000u }, -24 ),
3004
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 6776u, 26357803u, 44027125u, 46580005u, 43713569u, 64111328u, 12500000u }, -24 ),
3005
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 13552u, 52715606u, 88054250u, 93160010u, 87427139u, 28222656u, 25000000u }, -24 ),
3006
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 27105u, 5431213u, 76108501u, 86320021u, 74854278u, 56445312u, 50000000u }, -24 ),
3007
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 54210u, 10862427u, 52217003u, 72640043u, 49708557u, 12890625u }, -24 ),
3008
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 108420u, 21724855u, 4434007u, 45280086u, 99417114u, 25781250u }, -24 ),
3009
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 216840u, 43449710u, 8868014u, 90560173u, 98834228u, 51562500u }, -24 ),
3010
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 433680u, 86899420u, 17736029u, 81120347u, 97668457u, 3125000u }, -24 ),
3011
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 867361u, 73798840u, 35472059u, 62240695u, 95336914u, 6250000u }, -24 ),
3012
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1734723u, 47597680u, 70944119u, 24481391u, 90673828u, 12500000u }, -24 ),
3013
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3469446u, 95195361u, 41888238u, 48962783u, 81347656u, 25000000u }, -24 ),
3014
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 6938893u, 90390722u, 83776476u, 97925567u, 62695312u, 50000000u }, -24 ),
3015
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 13877787u, 80781445u, 67552953u, 95851135u, 25390625u }, -24 ),
3016
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 27755575u, 61562891u, 35105907u, 91702270u, 50781250u }, -24 ),
3017
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 55511151u, 23125782u, 70211815u, 83404541u, 1562500u }, -24 ),
3018
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1u, 11022302u, 46251565u, 40423631u, 66809082u, 3125000u }, -16 ),
3019
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2u, 22044604u, 92503130u, 80847263u, 33618164u, 6250000u }, -16 ),
3020
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 4u, 44089209u, 85006261u, 61694526u, 67236328u, 12500000u }, -16 ),
3021
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 8u, 88178419u, 70012523u, 23389053u, 34472656u, 25000000u }, -16 ),
3022
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 17u, 76356839u, 40025046u, 46778106u, 68945312u, 50000000u }, -16 ),
3023
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 35u, 52713678u, 80050092u, 93556213u, 37890625u }, -16 ),
3024
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 71u, 5427357u, 60100185u, 87112426u, 75781250u }, -16 ),
3025
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 142u, 10854715u, 20200371u, 74224853u, 51562500u }, -16 ),
3026
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 284u, 21709430u, 40400743u, 48449707u, 3125000u }, -16 ),
3027
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 568u, 43418860u, 80801486u, 96899414u, 6250000u }, -16 ),
3028
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1136u, 86837721u, 61602973u, 93798828u, 12500000u }, -16 ),
3029
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2273u, 73675443u, 23205947u, 87597656u, 25000000u }, -16 ),
3030
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 4547u, 47350886u, 46411895u, 75195312u, 50000000u }, -16 ),
3031
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 9094u, 94701772u, 92823791u, 50390625u }, -16 ),
3032
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 18189u, 89403545u, 85647583u, 781250u }, -16 ),
3033
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 36379u, 78807091u, 71295166u, 1562500u }, -16 ),
3034
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 72759u, 57614183u, 42590332u, 3125000u }, -16 ),
3035
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 145519u, 15228366u, 85180664u, 6250000u }, -16 ),
3036
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 291038u, 30456733u, 70361328u, 12500000u }, -16 ),
3037
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 582076u, 60913467u, 40722656u, 25000000u }, -16 ),
3038
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1164153u, 21826934u, 81445312u, 50000000u }, -16 ),
3039
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2328306u, 43653869u, 62890625u }, -16 ),
3040
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 4656612u, 87307739u, 25781250u }, -16 ),
3041
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 9313225u, 74615478u, 51562500u }, -16 ),
3042
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 18626451u, 49230957u, 3125000u }, -16 ),
3043
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 37252902u, 98461914u, 6250000u }, -16 ),
3044
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 74505805u, 96923828u, 12500000u }, -16 ),
3045
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1u, 49011611u, 93847656u, 25000000u }, -8 ),
3046
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2u, 98023223u, 87695312u, 50000000u }, -8 ),
3047
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 5u, 96046447u, 75390625u }, -8 ),
3048
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 11u, 92092895u, 50781250u }, -8 ),
3049
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 23u, 84185791u, 1562500u }, -8 ),
3050
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 47u, 68371582u, 3125000u }, -8 ),
3051
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 95u, 36743164u, 6250000u }, -8 ),
3052
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 190u, 73486328u, 12500000u }, -8 ),
3053
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 381u, 46972656u, 25000000u }, -8 ),
3054
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 762u, 93945312u, 50000000u }, -8 ),
3055
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1525u, 87890625u }, -8 ),
3056
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3051u, 75781250u }, -8 ),
3057
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 6103u, 51562500u }, -8 ),
3058
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 12207u, 3125000u }, -8 ),
3059
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 24414u, 6250000u }, -8 ),
3060
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 48828u, 12500000u }, -8 ),
3061
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 97656u, 25000000u }, -8 ),
3062
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 195312u, 50000000u }, -8 ),
3063
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 390625u }, -8 ),
3064
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 781250u }, -8 ),
3065
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1562500u }, -8 ),
3066
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3125000u }, -8 ),
3067
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 6250000u }, -8 ),
3068
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 12500000u }, -8 ),
3069
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 25000000u }, -8 ),
3070
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 50000000u }, -8 ),
3071
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1u }, 0 ),
3072
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2u }, 0 ),
3073
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 4u }, 0 ),
3074
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 8u }, 0 ),
3075
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 16u }, 0 ),
3076
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 32u }, 0 ),
3077
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 64u }, 0 ),
3078
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 128u }, 0 ),
3079
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 256u }, 0 ),
3080
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 512u }, 0 ),
3081
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1024u }, 0 ),
3082
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2048u }, 0 ),
3083
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 4096u }, 0 ),
3084
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 8192u }, 0 ),
3085
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 16384u }, 0 ),
3086
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 32768u }, 0 ),
3087
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 65536u }, 0 ),
3088
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 131072u }, 0 ),
3089
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 262144u }, 0 ),
3090
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 524288u }, 0 ),
3091
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1048576u }, 0 ),
3092
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2097152u }, 0 ),
3093
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 4194304u }, 0 ),
3094
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 8388608u }, 0 ),
3095
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 16777216u }, 0 ),
3096
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 33554432u }, 0 ),
3097
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 67108864u }, 0 ),
3098
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1u, 34217728u }, 8 ),
3099
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2u, 68435456u }, 8 ),
3100
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 5u, 36870912u }, 8 ),
3101
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 10u, 73741824u }, 8 ),
3102
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 21u, 47483648u }, 8 ),
3103
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 42u, 94967296u }, 8 ),
3104
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 85u, 89934592u }, 8 ),
3105
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 171u, 79869184u }, 8 ),
3106
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 343u, 59738368u }, 8 ),
3107
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 687u, 19476736u }, 8 ),
3108
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1374u, 38953472u }, 8 ),
3109
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2748u, 77906944u }, 8 ),
3110
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 5497u, 55813888u }, 8 ),
3111
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 10995u, 11627776u }, 8 ),
3112
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 21990u, 23255552u }, 8 ),
3113
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 43980u, 46511104u }, 8 ),
3114
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 87960u, 93022208u }, 8 ),
3115
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 175921u, 86044416u }, 8 ),
3116
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 351843u, 72088832u }, 8 ),
3117
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 703687u, 44177664u }, 8 ),
3118
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1407374u, 88355328u }, 8 ),
3119
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2814749u, 76710656u }, 8 ),
3120
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 5629499u, 53421312u }, 8 ),
3121
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 11258999u, 6842624u }, 8 ),
3122
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 22517998u, 13685248u }, 8 ),
3123
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 45035996u, 27370496u }, 8 ),
3124
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 90071992u, 54740992u }, 8 ),
3125
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1u, 80143985u, 9481984u }, 16 ),
3126
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3u, 60287970u, 18963968u }, 16 ),
3127
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 7u, 20575940u, 37927936u }, 16 ),
3128
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 14u, 41151880u, 75855872u }, 16 ),
3129
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 28u, 82303761u, 51711744u }, 16 ),
3130
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 57u, 64607523u, 3423488u }, 16 ),
3131
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 115u, 29215046u, 6846976u }, 16 ),
3132
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 230u, 58430092u, 13693952u }, 16 ),
3133
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 461u, 16860184u, 27387904u }, 16 ),
3134
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 922u, 33720368u, 54775808u }, 16 ),
3135
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1844u, 67440737u, 9551616u }, 16 ),
3136
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3689u, 34881474u, 19103232u }, 16 ),
3137
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 7378u, 69762948u, 38206464u }, 16 ),
3138
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 14757u, 39525896u, 76412928u }, 16 ),
3139
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 29514u, 79051793u, 52825856u }, 16 ),
3140
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 59029u, 58103587u, 5651712u }, 16 ),
3141
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 118059u, 16207174u, 11303424u }, 16 ),
3142
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 236118u, 32414348u, 22606848u }, 16 ),
3143
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 472236u, 64828696u, 45213696u }, 16 ),
3144
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 944473u, 29657392u, 90427392u }, 16 ),
3145
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1888946u, 59314785u, 80854784u }, 16 ),
3146
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3777893u, 18629571u, 61709568u }, 16 ),
3147
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 7555786u, 37259143u, 23419136u }, 16 ),
3148
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 15111572u, 74518286u, 46838272u }, 16 ),
3149
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 30223145u, 49036572u, 93676544u }, 16 ),
3150
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 60446290u, 98073145u, 87353088u }, 16 ),
3151
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1u, 20892581u, 96146291u, 74706176u }, 24 ),
3152
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2u, 41785163u, 92292583u, 49412352u }, 24 ),
3153
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 4u, 83570327u, 84585166u, 98824704u }, 24 ),
3154
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 9u, 67140655u, 69170333u, 97649408u }, 24 ),
3155
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 19u, 34281311u, 38340667u, 95298816u }, 24 ),
3156
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 38u, 68562622u, 76681335u, 90597632u }, 24 ),
3157
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 77u, 37125245u, 53362671u, 81195264u }, 24 ),
3158
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 154u, 74250491u, 6725343u, 62390528u }, 24 ),
3159
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 309u, 48500982u, 13450687u, 24781056u }, 24 ),
3160
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 618u, 97001964u, 26901374u, 49562112u }, 24 ),
3161
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1237u, 94003928u, 53802748u, 99124224u }, 24 ),
3162
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2475u, 88007857u, 7605497u, 98248448u }, 24 ),
3163
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 4951u, 76015714u, 15210995u, 96496896u }, 24 ),
3164
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 9903u, 52031428u, 30421991u, 92993792u }, 24 ),
3165
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 19807u, 4062856u, 60843983u, 85987584u }, 24 ),
3166
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 39614u, 8125713u, 21687967u, 71975168u }, 24 ),
3167
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 79228u, 16251426u, 43375935u, 43950336u }, 24 ),
3168
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 158456u, 32502852u, 86751870u, 87900672u }, 24 ),
3169
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 316912u, 65005705u, 73503741u, 75801344u }, 24 ),
3170
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 633825u, 30011411u, 47007483u, 51602688u }, 24 ),
3171
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1267650u, 60022822u, 94014967u, 3205376u }, 24 ),
3172
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 2535301u, 20045645u, 88029934u, 6410752u }, 24 ),
3173
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 5070602u, 40091291u, 76059868u, 12821504u }, 24 ),
3174
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 10141204u, 80182583u, 52119736u, 25643008u }, 24 ),
3175
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 20282409u, 60365167u, 4239472u, 51286016u }, 24 ),
3176
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 40564819u, 20730334u, 8478945u, 2572032u }, 24 ),
3177
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 81129638u, 41460668u, 16957890u, 5144064u }, 24 ),
3178
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1u, 62259276u, 82921336u, 33915780u, 10288128u }, 32 ),
3179
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3u, 24518553u, 65842672u, 67831560u, 20576256u }, 32 ),
3180
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 6u, 49037107u, 31685345u, 35663120u, 41152512u }, 32 ),
3181
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 12u, 98074214u, 63370690u, 71326240u, 82305024u }, 32 ),
3182
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 25u, 96148429u, 26741381u, 42652481u, 64610048u }, 32 ),
3183
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 51u, 92296858u, 53482762u, 85304963u, 29220096u }, 32 ),
3184
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 103u, 84593717u, 6965525u, 70609926u, 58440192u }, 32 ),
3185
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 207u, 69187434u, 13931051u, 41219853u, 16880384u }, 32 ),
3186
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 415u, 38374868u, 27862102u, 82439706u, 33760768u }, 32 ),
3187
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 830u, 76749736u, 55724205u, 64879412u, 67521536u }, 32 ),
3188
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1661u, 53499473u, 11448411u, 29758825u, 35043072u }, 32 ),
3189
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 3323u, 6998946u, 22896822u, 59517650u, 70086144u }, 32 ),
3190
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 6646u, 13997892u, 45793645u, 19035301u, 40172288u }, 32 ),
3191
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 13292u, 27995784u, 91587290u, 38070602u, 80344576u }, 32 ),
3192
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 26584u, 55991569u, 83174580u, 76141205u, 60689152u }, 32 ),
3193
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 53169u, 11983139u, 66349161u, 52282411u, 21378304u }, 32 ),
3194
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 106338u, 23966279u, 32698323u, 4564822u, 42756608u }, 32 ),
3195
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 212676u, 47932558u, 65396646u, 9129644u, 85513216u }, 32 ),
3196
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 425352u, 95865117u, 30793292u, 18259289u, 71026432u }, 32 ),
3197
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 850705u, 91730234u, 61586584u, 36518579u, 42052864u }, 32 ),
3198
+ cpp_dec_float<Digits10, ExponentType, Allocator>::from_lst( { 1701411u, 83460469u, 23173168u, 73037158u, 84105728u }, 32 ),
3199
+ }};
3200
+
3201
+ cpp_dec_float<Digits10, ExponentType, Allocator> t;
3202
+
3203
+ if(p < -128L)
3204
+ default_ops::detail::pow_imp(t, cpp_dec_float<Digits10, ExponentType, Allocator>::half(), static_cast<unsigned long long>(-p), std::integral_constant<bool, false>());
3205
+ else if ((p >= -128L) && (p <= 127L))
3206
+ t = local_pow2_data[std::size_t(p + 128)];
3207
+ else
3208
+ default_ops::detail::pow_imp(t, cpp_dec_float<Digits10, ExponentType, Allocator>::two(), static_cast<unsigned long long>(p), std::integral_constant<bool, false>());
3209
+
3210
+ return t;
3211
+ } // LCOV_EXCL_LINE This causes a false negative on lcov coverage test.
3212
+
3213
+ template <unsigned Digits10, class ExponentType, class Allocator>
3214
+ inline void eval_add(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& o)
3215
+ {
3216
+ result += o;
3217
+ }
3218
+ template <unsigned Digits10, class ExponentType, class Allocator>
3219
+ inline void eval_add(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& a, const cpp_dec_float<Digits10, ExponentType, Allocator>& b)
3220
+ {
3221
+ result = cpp_dec_float<Digits10, ExponentType, Allocator>(a) += b;
3222
+ }
3223
+ template <unsigned Digits10, class ExponentType, class Allocator>
3224
+ inline void eval_subtract(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& o)
3225
+ {
3226
+ result -= o;
3227
+ }
3228
+ template <unsigned Digits10, class ExponentType, class Allocator>
3229
+ inline void eval_subtract(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& a, const cpp_dec_float<Digits10, ExponentType, Allocator>& b)
3230
+ {
3231
+ result = cpp_dec_float<Digits10, ExponentType, Allocator>(a) -= b;
3232
+ }
3233
+ template <unsigned Digits10, class ExponentType, class Allocator>
3234
+ inline void eval_multiply(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& o)
3235
+ {
3236
+ result *= o;
3237
+ }
3238
+ template <unsigned Digits10, class ExponentType, class Allocator>
3239
+ inline void eval_multiply(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& a, const cpp_dec_float<Digits10, ExponentType, Allocator>& b)
3240
+ {
3241
+ result = cpp_dec_float<Digits10, ExponentType, Allocator>(a) *= b;
3242
+ }
3243
+ template <unsigned Digits10, class ExponentType, class Allocator>
3244
+ inline void eval_divide(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& o)
3245
+ {
3246
+ result /= o;
3247
+ }
3248
+ template <unsigned Digits10, class ExponentType, class Allocator>
3249
+ inline void eval_divide(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& a, const cpp_dec_float<Digits10, ExponentType, Allocator>& b)
3250
+ {
3251
+ result = cpp_dec_float<Digits10, ExponentType, Allocator>(a) /= b;
3252
+ }
3253
+
3254
+ template <unsigned Digits10, class ExponentType, class Allocator>
3255
+ inline void eval_add(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const unsigned long long& o)
3256
+ {
3257
+ result.add_unsigned_long_long(o);
3258
+ }
3259
+ template <unsigned Digits10, class ExponentType, class Allocator>
3260
+ inline void eval_subtract(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const unsigned long long& o)
3261
+ {
3262
+ result.sub_unsigned_long_long(o);
3263
+ }
3264
+ template <unsigned Digits10, class ExponentType, class Allocator>
3265
+ inline void eval_multiply(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const unsigned long long& o)
3266
+ {
3267
+ result.mul_unsigned_long_long(o);
3268
+ }
3269
+ template <unsigned Digits10, class ExponentType, class Allocator>
3270
+ inline void eval_divide(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const unsigned long long& o)
3271
+ {
3272
+ result.div_unsigned_long_long(o);
3273
+ }
3274
+
3275
+ template <unsigned Digits10, class ExponentType, class Allocator>
3276
+ inline void eval_add(cpp_dec_float<Digits10, ExponentType, Allocator>& result, long long o)
3277
+ {
3278
+ if (o < 0)
3279
+ result.sub_unsigned_long_long(boost::multiprecision::detail::unsigned_abs(o));
3280
+ else
3281
+ {
3282
+ using local_ulonglong_type = typename boost::multiprecision::detail::make_unsigned<long long>::type;
3283
+
3284
+ result.add_unsigned_long_long(static_cast<local_ulonglong_type>(o));
3285
+ }
3286
+ }
3287
+ template <unsigned Digits10, class ExponentType, class Allocator>
3288
+ inline void eval_subtract(cpp_dec_float<Digits10, ExponentType, Allocator>& result, long long o)
3289
+ {
3290
+ if (o < 0)
3291
+ result.add_unsigned_long_long(boost::multiprecision::detail::unsigned_abs(o));
3292
+ else
3293
+ {
3294
+ using local_ulonglong_type = typename boost::multiprecision::detail::make_unsigned<long long>::type;
3295
+
3296
+ result.sub_unsigned_long_long(static_cast<local_ulonglong_type>(o));
3297
+ }
3298
+ }
3299
+ template <unsigned Digits10, class ExponentType, class Allocator>
3300
+ inline void eval_multiply(cpp_dec_float<Digits10, ExponentType, Allocator>& result, long long o)
3301
+ {
3302
+ if (o < 0)
3303
+ {
3304
+ result.mul_unsigned_long_long(boost::multiprecision::detail::unsigned_abs(o));
3305
+ result.negate();
3306
+ }
3307
+ else
3308
+ {
3309
+ using local_ulonglong_type = typename boost::multiprecision::detail::make_unsigned<long long>::type;
3310
+
3311
+ result.mul_unsigned_long_long(static_cast<local_ulonglong_type>(o));
3312
+ }
3313
+ }
3314
+ template <unsigned Digits10, class ExponentType, class Allocator>
3315
+ inline void eval_divide(cpp_dec_float<Digits10, ExponentType, Allocator>& result, long long o)
3316
+ {
3317
+ if (o < 0)
3318
+ {
3319
+ result.div_unsigned_long_long(boost::multiprecision::detail::unsigned_abs(o));
3320
+ result.negate();
3321
+ }
3322
+ else
3323
+ {
3324
+ using local_ulonglong_type = typename boost::multiprecision::detail::make_unsigned<long long>::type;
3325
+
3326
+ result.div_unsigned_long_long(static_cast<local_ulonglong_type>(o));
3327
+ }
3328
+ }
3329
+
3330
+ template <unsigned Digits10, class ExponentType, class Allocator>
3331
+ inline void eval_convert_to(unsigned long long* result, const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3332
+ {
3333
+ *result = val.extract_unsigned_long_long();
3334
+ }
3335
+ template <unsigned Digits10, class ExponentType, class Allocator>
3336
+ inline void eval_convert_to(long long* result, const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3337
+ {
3338
+ *result = val.extract_signed_long_long();
3339
+ }
3340
+ #ifdef BOOST_HAS_INT128
3341
+ template <unsigned Digits10, class ExponentType, class Allocator>
3342
+ inline void eval_convert_to(uint128_type* result, const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3343
+ {
3344
+ *result = val.extract_unsigned_int128();
3345
+ }
3346
+ template <unsigned Digits10, class ExponentType, class Allocator>
3347
+ inline void eval_convert_to(int128_type* result, const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3348
+ {
3349
+ *result = val.extract_signed_int128();
3350
+ }
3351
+ #endif
3352
+ template <unsigned Digits10, class ExponentType, class Allocator>
3353
+ inline void eval_convert_to(long double* result, const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3354
+ {
3355
+ *result = val.extract_long_double();
3356
+ }
3357
+ template <unsigned Digits10, class ExponentType, class Allocator>
3358
+ inline void eval_convert_to(double* result, const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3359
+ {
3360
+ *result = val.extract_double();
3361
+ }
3362
+ #if defined(BOOST_HAS_FLOAT128)
3363
+ template <unsigned Digits10, class ExponentType, class Allocator>
3364
+ inline void eval_convert_to(float128_type* result, const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3365
+ {
3366
+ *result = float128_procs::strtoflt128(val.str(0, std::ios_base::scientific).c_str(), nullptr);
3367
+ }
3368
+ #endif
3369
+
3370
+ //
3371
+ // Non member function support:
3372
+ //
3373
+ template <unsigned Digits10, class ExponentType, class Allocator>
3374
+ inline int eval_fpclassify(const cpp_dec_float<Digits10, ExponentType, Allocator>& x)
3375
+ {
3376
+ if ((x.isinf)())
3377
+ return FP_INFINITE;
3378
+ if ((x.isnan)())
3379
+ return FP_NAN;
3380
+ if (x.iszero())
3381
+ return FP_ZERO;
3382
+ return FP_NORMAL;
3383
+ }
3384
+
3385
+ template <unsigned Digits10, class ExponentType, class Allocator>
3386
+ inline void eval_abs(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& x)
3387
+ {
3388
+ result = x;
3389
+ if (x.isneg())
3390
+ result.negate();
3391
+ }
3392
+
3393
+ template <unsigned Digits10, class ExponentType, class Allocator>
3394
+ inline void eval_fabs(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& x)
3395
+ {
3396
+ result = x;
3397
+ if (x.isneg())
3398
+ result.negate();
3399
+ }
3400
+
3401
+ template <unsigned Digits10, class ExponentType, class Allocator>
3402
+ inline void eval_sqrt(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& x)
3403
+ {
3404
+ result = x;
3405
+ result.calculate_sqrt();
3406
+ }
3407
+
3408
+ template <unsigned Digits10, class ExponentType, class Allocator>
3409
+ inline void eval_floor(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& x)
3410
+ {
3411
+ result = x;
3412
+ if (!(x.isfinite)() || x.isint())
3413
+ {
3414
+ if ((x.isnan)())
3415
+ errno = EDOM;
3416
+ return;
3417
+ }
3418
+
3419
+ if (x.isneg())
3420
+ result -= cpp_dec_float<Digits10, ExponentType, Allocator>::one();
3421
+ result = result.extract_integer_part();
3422
+ }
3423
+
3424
+ template <unsigned Digits10, class ExponentType, class Allocator>
3425
+ inline void eval_ceil(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& x)
3426
+ {
3427
+ result = x;
3428
+ if (!(x.isfinite)() || x.isint())
3429
+ {
3430
+ if ((x.isnan)())
3431
+ errno = EDOM;
3432
+ return;
3433
+ }
3434
+
3435
+ if (!x.isneg())
3436
+ result += cpp_dec_float<Digits10, ExponentType, Allocator>::one();
3437
+ result = result.extract_integer_part();
3438
+ }
3439
+
3440
+ template <unsigned Digits10, class ExponentType, class Allocator>
3441
+ inline void eval_trunc(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& x)
3442
+ {
3443
+ if (x.isint() || !(x.isfinite)())
3444
+ {
3445
+ result = x;
3446
+ if ((x.isnan)())
3447
+ errno = EDOM;
3448
+ return;
3449
+ }
3450
+ result = x.extract_integer_part();
3451
+ }
3452
+
3453
+ template <unsigned Digits10, class ExponentType, class Allocator>
3454
+ inline ExponentType eval_ilogb(const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3455
+ {
3456
+ if (val.iszero())
3457
+ return (std::numeric_limits<typename cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type>::min)();
3458
+ if ((val.isinf)())
3459
+ return INT_MAX;
3460
+ if ((val.isnan)())
3461
+ #ifdef FP_ILOGBNAN
3462
+ return FP_ILOGBNAN;
3463
+ #else
3464
+ return INT_MAX;
3465
+ #endif
3466
+ // Set result, to the exponent of val:
3467
+ return val.order();
3468
+ }
3469
+ template <unsigned Digits10, class ExponentType, class Allocator, class ArgType>
3470
+ inline void eval_scalbn(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& val, ArgType e_)
3471
+ {
3472
+ using default_ops::eval_multiply;
3473
+ const typename cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type e = static_cast<typename cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type>(e_);
3474
+ cpp_dec_float<Digits10, ExponentType, Allocator> t(1.0, e);
3475
+ eval_multiply(result, val, t);
3476
+ }
3477
+
3478
+ template <unsigned Digits10, class ExponentType, class Allocator, class ArgType>
3479
+ inline void eval_ldexp(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& x, ArgType e)
3480
+ {
3481
+ const long long the_exp = static_cast<long long>(e);
3482
+
3483
+ using local_cpp_dec_float_type = cpp_dec_float<Digits10, ExponentType, Allocator>;
3484
+ using local_exponent_type = typename local_cpp_dec_float_type::exponent_type;
3485
+
3486
+ using local_common_type = typename std::common_type<local_exponent_type, long long>::type;
3487
+
3488
+ if ( (static_cast<local_common_type>(the_exp) > static_cast<local_common_type>((std::numeric_limits<local_exponent_type>::max)()))
3489
+ || (static_cast<local_common_type>(the_exp) < static_cast<local_common_type>((std::numeric_limits<local_exponent_type>::min)())))
3490
+ {
3491
+ BOOST_MP_THROW_EXCEPTION(std::runtime_error(std::string("Exponent value is out of range."))); // LCOV_EXCL_LINE
3492
+ }
3493
+
3494
+ result = x;
3495
+
3496
+ if ( (static_cast<local_common_type>(the_exp) > static_cast<local_common_type>(-std::numeric_limits<long long>::digits))
3497
+ && (static_cast<local_common_type>(the_exp) < static_cast<local_common_type>(0)))
3498
+ {
3499
+ result.div_unsigned_long_long(1ULL << static_cast<long long>(-the_exp));
3500
+ }
3501
+ else if ( (static_cast<local_common_type>(the_exp) < static_cast<local_common_type>(std::numeric_limits<long long>::digits))
3502
+ && (static_cast<local_common_type>(the_exp) > static_cast<local_common_type>(0)))
3503
+ {
3504
+ result.mul_unsigned_long_long(1ULL << the_exp);
3505
+ }
3506
+ else if (the_exp != static_cast<long long>(0))
3507
+ {
3508
+ if ((the_exp < local_cpp_dec_float_type::cpp_dec_float_min_exp / 2) && (x.order() > 0))
3509
+ {
3510
+ long long half_exp = e / 2;
3511
+ local_cpp_dec_float_type t { local_cpp_dec_float_type::pow2(half_exp) };
3512
+ result *= t;
3513
+ if (2 * half_exp != e)
3514
+ t *= 2;
3515
+ result *= t;
3516
+ } // LCOV_EXCL_LINE This causes a false negative on lcov coverage test.
3517
+ else
3518
+ result *= local_cpp_dec_float_type::pow2(e);
3519
+ }
3520
+ }
3521
+
3522
+ template <unsigned Digits10, class ExponentType, class Allocator>
3523
+ inline void eval_frexp(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& x, ExponentType* e)
3524
+ {
3525
+ const bool b_neg { x.isneg() };
3526
+
3527
+ result = x;
3528
+
3529
+ if (result.iszero() || (result.isinf)() || (result.isnan)())
3530
+ {
3531
+ *e = 0;
3532
+ return;
3533
+ }
3534
+
3535
+ if (b_neg)
3536
+ result.negate();
3537
+
3538
+ using local_cpp_dec_float_type = cpp_dec_float<Digits10, ExponentType, Allocator>;
3539
+ using local_exponent_type = typename local_cpp_dec_float_type::exponent_type;
3540
+
3541
+ local_exponent_type t { result.order() };
3542
+
3543
+ BOOST_MP_USING_ABS
3544
+ if (abs(t) < ((std::numeric_limits<local_exponent_type>::max)() / 1000))
3545
+ {
3546
+ t *= 1000;
3547
+ t /= 301;
3548
+ }
3549
+ else
3550
+ {
3551
+ t /= 301;
3552
+ t *= 1000;
3553
+ }
3554
+
3555
+ result *= local_cpp_dec_float_type::pow2(-t);
3556
+
3557
+ if (result.iszero() || (result.isinf)() || (result.isnan)())
3558
+ {
3559
+ // pow2 overflowed, slip the calculation up:
3560
+ result = x;
3561
+ if (b_neg)
3562
+ result.negate();
3563
+ t /= 2;
3564
+ result *= local_cpp_dec_float_type::pow2(-t);
3565
+ }
3566
+ BOOST_MP_USING_ABS
3567
+ if (abs(result.order()) > 5)
3568
+ {
3569
+ // If our first estimate doesn't get close enough then try recursion until we do:
3570
+ local_exponent_type e2;
3571
+ cpp_dec_float<Digits10, ExponentType, Allocator> r2;
3572
+ eval_frexp(r2, result, &e2);
3573
+ // overflow protection:
3574
+ if ((t > 0) && (e2 > 0) && (t > (std::numeric_limits<local_exponent_type>::max)() - e2))
3575
+ BOOST_MP_THROW_EXCEPTION(std::runtime_error("Exponent is too large to be represented as a power of 2.")); // LCOV_EXCL_LINE
3576
+ if ((t < 0) && (e2 < 0) && (t < (std::numeric_limits<local_exponent_type>::min)() - e2))
3577
+ BOOST_MP_THROW_EXCEPTION(std::runtime_error("Exponent is too large to be represented as a power of 2.")); // LCOV_EXCL_LINE
3578
+ t += e2;
3579
+ result = r2;
3580
+ }
3581
+
3582
+ while (result.compare(local_cpp_dec_float_type::one()) >= 0)
3583
+ {
3584
+ result.div_unsigned_long_long(2ULL);
3585
+ ++t;
3586
+ }
3587
+ while (result.compare(local_cpp_dec_float_type::half()) < 0)
3588
+ {
3589
+ result.mul_unsigned_long_long(2ULL);
3590
+ --t;
3591
+ }
3592
+ *e = t;
3593
+ if (b_neg)
3594
+ result.negate();
3595
+ }
3596
+
3597
+ template <unsigned Digits10, class ExponentType, class Allocator>
3598
+ inline typename std::enable_if< !std::is_same<ExponentType, int>::value>::type eval_frexp(cpp_dec_float<Digits10, ExponentType, Allocator>& result, const cpp_dec_float<Digits10, ExponentType, Allocator>& x, int* e)
3599
+ {
3600
+ using local_exponent_type = typename cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type;
3601
+
3602
+ local_exponent_type t { };
3603
+
3604
+ eval_frexp(result, x, &t);
3605
+
3606
+ using local_common_type = typename std::common_type<local_exponent_type, int>::type;
3607
+
3608
+ if ( (static_cast<local_common_type>(t) > static_cast<local_common_type>((std::numeric_limits<int>::max)()))
3609
+ || (static_cast<local_common_type>(t) < static_cast<local_common_type>((std::numeric_limits<int>::min)())))
3610
+ {
3611
+ BOOST_MP_THROW_EXCEPTION(std::runtime_error("Exponent is outside the range of an int")); // LCOV_EXCL_LINE
3612
+ }
3613
+
3614
+ *e = static_cast<int>(t);
3615
+ }
3616
+
3617
+ template <unsigned Digits10, class ExponentType, class Allocator>
3618
+ inline bool eval_is_zero(const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3619
+ {
3620
+ return val.iszero();
3621
+ }
3622
+ template <unsigned Digits10, class ExponentType, class Allocator>
3623
+ inline int eval_get_sign(const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3624
+ {
3625
+ return (val.iszero() ? 0 : (val.isneg() ? -1 : 1));
3626
+ }
3627
+
3628
+ template <unsigned Digits10, class ExponentType, class Allocator>
3629
+ inline int eval_signbit(const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3630
+ {
3631
+ return ((eval_get_sign(val) == -1) ? 1 : 0);
3632
+ }
3633
+
3634
+ template <unsigned Digits10, class ExponentType, class Allocator>
3635
+ inline std::size_t hash_value(const cpp_dec_float<Digits10, ExponentType, Allocator>& val)
3636
+ {
3637
+ return val.hash();
3638
+ }
3639
+
3640
+ } // namespace backends
3641
+
3642
+ namespace detail {
3643
+
3644
+ template <unsigned Digits10, class ExponentType, class Allocator>
3645
+ struct transcendental_reduction_type<boost::multiprecision::backends::cpp_dec_float<Digits10, ExponentType, Allocator> >
3646
+ {
3647
+ //
3648
+ // The type used for trigonometric reduction needs 3 times the precision of the base type.
3649
+ // This is double the precision of the original type, plus the largest exponent supported.
3650
+ // As a practical measure the largest argument supported is 1/eps, as supporting larger
3651
+ // arguments requires the division of argument by PI/2 to also be done at higher precision,
3652
+ // otherwise the result (an integer) can not be represented exactly.
3653
+ //
3654
+ // See ARGUMENT REDUCTION FOR HUGE ARGUMENTS. K C Ng.
3655
+ //
3656
+ using type = boost::multiprecision::backends::cpp_dec_float<Digits10 * 3, ExponentType, Allocator>;
3657
+ };
3658
+
3659
+ } // namespace detail
3660
+
3661
+
3662
+ }} // namespace boost::multiprecision
3663
+
3664
+ namespace std {
3665
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3666
+ class numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >
3667
+ {
3668
+ public:
3669
+ static constexpr bool is_specialized = true;
3670
+ static constexpr bool is_signed = true;
3671
+ static constexpr bool is_integer = false;
3672
+ static constexpr bool is_exact = false;
3673
+ static constexpr bool is_bounded = true;
3674
+ static constexpr bool is_modulo = false;
3675
+ static constexpr bool is_iec559 = false;
3676
+ static constexpr int digits = boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_digits10;
3677
+ static constexpr int digits10 = boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_digits10;
3678
+ static constexpr int max_digits10 = boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_max_digits10;
3679
+ static constexpr typename boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type min_exponent = boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_min_exp; // Type differs from int.
3680
+ static constexpr typename boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type min_exponent10 = boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_min_exp10; // Type differs from int.
3681
+ static constexpr typename boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type max_exponent = boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_max_exp; // Type differs from int.
3682
+ static constexpr typename boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type max_exponent10 = boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_max_exp10; // Type differs from int.
3683
+ static constexpr int radix = boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_radix;
3684
+ static constexpr float_round_style round_style = round_indeterminate;
3685
+ static constexpr bool has_infinity = true;
3686
+ static constexpr bool has_quiet_NaN = true;
3687
+ static constexpr bool has_signaling_NaN = false;
3688
+ #ifdef _MSC_VER
3689
+ # pragma warning(push)
3690
+ # pragma warning(disable : 4996)
3691
+ #elif (defined(__clang__) && (__clang_major__ >= 17))
3692
+ # pragma clang diagnostic push
3693
+ # pragma clang diagnostic ignored "-Wdeprecated-declarations"
3694
+ #endif
3695
+ static constexpr float_denorm_style has_denorm = denorm_absent;
3696
+ #ifdef _MSC_VER
3697
+ #pragma warning(pop)
3698
+ #elif (defined(__clang__) && (__clang_major__ >= 17))
3699
+ # pragma clang diagnostic pop
3700
+ #endif
3701
+ static constexpr bool has_denorm_loss = false;
3702
+ static constexpr bool traps = false;
3703
+ static constexpr bool tinyness_before = false;
3704
+
3705
+ static constexpr boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates>(min)() { return (boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::min)(); }
3706
+ static constexpr boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates>(max)() { return (boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::max)(); }
3707
+ static constexpr boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> lowest() { return -(max)(); }
3708
+ static constexpr boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> epsilon() { return boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::eps(); }
3709
+ static constexpr boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> round_error() { return 0.5L; }
3710
+ static constexpr boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> infinity() { return boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::inf(); }
3711
+ static constexpr boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> quiet_NaN() { return boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::nan(); }
3712
+ static constexpr boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> signaling_NaN() { return boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::zero(); }
3713
+ static constexpr boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> denorm_min() { return (boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::min)(); }
3714
+ };
3715
+
3716
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3717
+ constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::digits;
3718
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3719
+ constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::digits10;
3720
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3721
+ constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::max_digits10;
3722
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3723
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::is_signed;
3724
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3725
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::is_integer;
3726
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3727
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::is_exact;
3728
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3729
+ constexpr int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::radix;
3730
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3731
+ constexpr typename boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::min_exponent;
3732
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3733
+ constexpr typename boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::min_exponent10;
3734
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3735
+ constexpr typename boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::max_exponent;
3736
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3737
+ constexpr typename boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::max_exponent10;
3738
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3739
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::has_infinity;
3740
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3741
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::has_quiet_NaN;
3742
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3743
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::has_signaling_NaN;
3744
+ #ifdef _MSC_VER
3745
+ # pragma warning(push)
3746
+ # pragma warning(disable : 4996)
3747
+ #elif (defined(__clang__) && (__clang_major__ >= 17))
3748
+ # pragma clang diagnostic push
3749
+ # pragma clang diagnostic ignored "-Wdeprecated-declarations"
3750
+ #endif
3751
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3752
+ constexpr float_denorm_style numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::has_denorm;
3753
+ #ifdef _MSC_VER
3754
+ #pragma warning(pop)
3755
+ #elif (defined(__clang__) && (__clang_major__ >= 17))
3756
+ # pragma clang diagnostic pop
3757
+ #endif
3758
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3759
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::has_denorm_loss;
3760
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3761
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::is_iec559;
3762
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3763
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::is_bounded;
3764
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3765
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::is_modulo;
3766
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3767
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::traps;
3768
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3769
+ constexpr bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::tinyness_before;
3770
+ template <unsigned Digits10, class ExponentType, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
3771
+ constexpr float_round_style numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates> >::round_style;
3772
+
3773
+ } // namespace std
3774
+
3775
+ #ifdef BOOST_MP_MATH_AVAILABLE
3776
+ namespace boost {
3777
+ namespace math {
3778
+
3779
+ namespace policies {
3780
+
3781
+ template <unsigned Digits10, class ExponentType, class Allocator, class Policy, boost::multiprecision::expression_template_option ExpressionTemplates>
3782
+ struct precision<boost::multiprecision::number<boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>, ExpressionTemplates>, Policy>
3783
+ {
3784
+ // Define a local copy of cpp_dec_float_digits10 because it might differ
3785
+ // from the template parameter Digits10 for small or large digit counts.
3786
+ static constexpr std::int32_t cpp_dec_float_digits10 = boost::multiprecision::cpp_dec_float<Digits10, ExponentType, Allocator>::cpp_dec_float_digits10;
3787
+
3788
+ using precision_type = typename Policy::precision_type ;
3789
+ using digits_2 = digits2<static_cast<int>(((cpp_dec_float_digits10 + 1LL) * 1000LL) / 301LL)>;
3790
+ using type = typename std::conditional<
3791
+ ((digits_2::value <= precision_type::value) || (Policy::precision_type::value <= 0)),
3792
+ // Default case, full precision for RealType:
3793
+ digits_2,
3794
+ // User customized precision:
3795
+ precision_type>::type;
3796
+ };
3797
+
3798
+ }
3799
+
3800
+ }} // namespace boost::math::policies
3801
+ #endif
3802
+
3803
+ #ifdef BOOST_MSVC
3804
+ #pragma warning(pop)
3805
+ #endif
3806
+
3807
+ #endif