@lakutata/math 0.0.0-stage → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/README.md +954 -2
- package/README.zh-CN.md +578 -0
- package/THIRD_PARTY_NOTICES.md +553 -0
- package/binding.gyp +89 -0
- package/dist/cjs/exceptions/MathArgumentException.d.ts +11 -0
- package/dist/cjs/exceptions/MathArgumentException.js +18 -0
- package/dist/cjs/exceptions/MathCancelledException.d.ts +10 -0
- package/dist/cjs/exceptions/MathCancelledException.js +17 -0
- package/dist/cjs/exceptions/MathDefinitionException.d.ts +11 -0
- package/dist/cjs/exceptions/MathDefinitionException.js +18 -0
- package/dist/cjs/exceptions/MathDivisionByZeroException.d.ts +10 -0
- package/dist/cjs/exceptions/MathDivisionByZeroException.js +17 -0
- package/dist/cjs/exceptions/MathDomainException.d.ts +11 -0
- package/dist/cjs/exceptions/MathDomainException.js +18 -0
- package/dist/cjs/exceptions/MathException.d.ts +19 -0
- package/dist/cjs/exceptions/MathException.js +22 -0
- package/dist/cjs/exceptions/MathNotSupportedException.d.ts +11 -0
- package/dist/cjs/exceptions/MathNotSupportedException.js +18 -0
- package/dist/cjs/exceptions/MathSyntaxException.d.ts +11 -0
- package/dist/cjs/exceptions/MathSyntaxException.js +18 -0
- package/dist/cjs/exceptions/MathTimeoutException.d.ts +10 -0
- package/dist/cjs/exceptions/MathTimeoutException.js +17 -0
- package/dist/cjs/exceptions/MathUnitException.d.ts +11 -0
- package/dist/cjs/exceptions/MathUnitException.js +18 -0
- package/dist/cjs/exceptions/MathUnknownFunctionException.d.ts +12 -0
- package/dist/cjs/exceptions/MathUnknownFunctionException.js +19 -0
- package/dist/cjs/exports/Math.d.ts +28 -0
- package/dist/cjs/exports/Math.js +84 -0
- package/dist/cjs/lib/Addon.d.ts +5 -0
- package/dist/cjs/lib/Addon.js +9 -0
- package/dist/cjs/lib/Context.d.ts +90 -0
- package/dist/cjs/lib/Context.js +134 -0
- package/dist/cjs/lib/Decimal.d.ts +276 -0
- package/dist/cjs/lib/Decimal.js +402 -0
- package/dist/cjs/lib/Defaults.d.ts +273 -0
- package/dist/cjs/lib/Defaults.js +308 -0
- package/dist/cjs/lib/Distribution.d.ts +177 -0
- package/dist/cjs/lib/Distribution.js +195 -0
- package/dist/cjs/lib/Expression.d.ts +791 -0
- package/dist/cjs/lib/Expression.js +991 -0
- package/dist/cjs/lib/ExpressionMatrix.d.ts +284 -0
- package/dist/cjs/lib/ExpressionMatrix.js +412 -0
- package/dist/cjs/lib/LinearAlgebra.d.ts +613 -0
- package/dist/cjs/lib/LinearAlgebra.js +712 -0
- package/dist/cjs/lib/MathScope.d.ts +268 -0
- package/dist/cjs/lib/MathScope.js +316 -0
- package/dist/cjs/lib/MathSet.d.ts +139 -0
- package/dist/cjs/lib/MathSet.js +376 -0
- package/dist/cjs/lib/Matrix.d.ts +212 -0
- package/dist/cjs/lib/Matrix.js +393 -0
- package/dist/cjs/lib/Native.d.ts +80 -0
- package/dist/cjs/lib/Native.js +61 -0
- package/dist/cjs/lib/NumberTheory.d.ts +356 -0
- package/dist/cjs/lib/NumberTheory.js +524 -0
- package/dist/cjs/lib/Numeric.d.ts +363 -0
- package/dist/cjs/lib/Numeric.js +243 -0
- package/dist/cjs/lib/Polynomials.d.ts +140 -0
- package/dist/cjs/lib/Polynomials.js +167 -0
- package/dist/cjs/lib/SparseMatrix.d.ts +125 -0
- package/dist/cjs/lib/SparseMatrix.js +341 -0
- package/dist/cjs/lib/Statistics.d.ts +366 -0
- package/dist/cjs/lib/Statistics.js +380 -0
- package/dist/cjs/lib/Unit.d.ts +342 -0
- package/dist/cjs/lib/Unit.js +1027 -0
- package/dist/cjs/lib/UnitTable.d.ts +39 -0
- package/dist/cjs/lib/UnitTable.js +634 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/exceptions/MathArgumentException.js +14 -0
- package/dist/esm/exceptions/MathCancelledException.js +13 -0
- package/dist/esm/exceptions/MathDefinitionException.js +14 -0
- package/dist/esm/exceptions/MathDivisionByZeroException.js +13 -0
- package/dist/esm/exceptions/MathDomainException.js +14 -0
- package/dist/esm/exceptions/MathException.js +18 -0
- package/dist/esm/exceptions/MathNotSupportedException.js +14 -0
- package/dist/esm/exceptions/MathSyntaxException.js +14 -0
- package/dist/esm/exceptions/MathTimeoutException.js +13 -0
- package/dist/esm/exceptions/MathUnitException.js +14 -0
- package/dist/esm/exceptions/MathUnknownFunctionException.js +15 -0
- package/dist/esm/exports/Math.js +26 -0
- package/dist/esm/lib/Addon.js +10 -0
- package/dist/esm/lib/Context.js +128 -0
- package/dist/esm/lib/Decimal.js +397 -0
- package/dist/esm/lib/Defaults.js +290 -0
- package/dist/esm/lib/Distribution.js +190 -0
- package/dist/esm/lib/Expression.js +979 -0
- package/dist/esm/lib/ExpressionMatrix.js +407 -0
- package/dist/esm/lib/LinearAlgebra.js +708 -0
- package/dist/esm/lib/MathScope.js +311 -0
- package/dist/esm/lib/MathSet.js +370 -0
- package/dist/esm/lib/Matrix.js +382 -0
- package/dist/esm/lib/Native.js +56 -0
- package/dist/esm/lib/NumberTheory.js +520 -0
- package/dist/esm/lib/Numeric.js +239 -0
- package/dist/esm/lib/Polynomials.js +163 -0
- package/dist/esm/lib/SparseMatrix.js +332 -0
- package/dist/esm/lib/Statistics.js +376 -0
- package/dist/esm/lib/Unit.js +1018 -0
- package/dist/esm/lib/UnitTable.js +631 -0
- package/dist/types/exceptions/MathArgumentException.d.ts +11 -0
- package/dist/types/exceptions/MathCancelledException.d.ts +10 -0
- package/dist/types/exceptions/MathDefinitionException.d.ts +11 -0
- package/dist/types/exceptions/MathDivisionByZeroException.d.ts +10 -0
- package/dist/types/exceptions/MathDomainException.d.ts +11 -0
- package/dist/types/exceptions/MathException.d.ts +19 -0
- package/dist/types/exceptions/MathNotSupportedException.d.ts +11 -0
- package/dist/types/exceptions/MathSyntaxException.d.ts +11 -0
- package/dist/types/exceptions/MathTimeoutException.d.ts +10 -0
- package/dist/types/exceptions/MathUnitException.d.ts +11 -0
- package/dist/types/exceptions/MathUnknownFunctionException.d.ts +12 -0
- package/dist/types/exports/Math.d.ts +28 -0
- package/dist/types/lib/Addon.d.ts +5 -0
- package/dist/types/lib/Context.d.ts +90 -0
- package/dist/types/lib/Decimal.d.ts +276 -0
- package/dist/types/lib/Defaults.d.ts +273 -0
- package/dist/types/lib/Distribution.d.ts +177 -0
- package/dist/types/lib/Expression.d.ts +791 -0
- package/dist/types/lib/ExpressionMatrix.d.ts +284 -0
- package/dist/types/lib/LinearAlgebra.d.ts +613 -0
- package/dist/types/lib/MathScope.d.ts +268 -0
- package/dist/types/lib/MathSet.d.ts +139 -0
- package/dist/types/lib/Matrix.d.ts +212 -0
- package/dist/types/lib/Native.d.ts +80 -0
- package/dist/types/lib/NumberTheory.d.ts +356 -0
- package/dist/types/lib/Numeric.d.ts +363 -0
- package/dist/types/lib/Polynomials.d.ts +140 -0
- package/dist/types/lib/SparseMatrix.d.ts +125 -0
- package/dist/types/lib/Statistics.d.ts +366 -0
- package/dist/types/lib/Unit.d.ts +342 -0
- package/dist/types/lib/UnitTable.d.ts +39 -0
- package/native/addon.cpp +1374 -0
- package/native/async/Pool.cpp +133 -0
- package/native/async/Pool.h +59 -0
- package/native/config/boost_math_policy.h +26 -0
- package/native/config/mpdecimal/mpdecimal.h +809 -0
- package/native/config/symengine/symengine_config.h +44 -0
- package/native/config/symengine/symengine_export.h +19 -0
- package/native/core/Errors.cpp +77 -0
- package/native/core/Errors.h +72 -0
- package/native/core/Handle.cpp +109 -0
- package/native/core/Handle.h +72 -0
- package/native/core/Scope.cpp +122 -0
- package/native/core/Scope.h +36 -0
- package/native/functions/Functions.cpp +468 -0
- package/native/functions/Functions.h +115 -0
- package/native/functions/Gosper.cpp +429 -0
- package/native/functions/Gosper.h +20 -0
- package/native/functions/SpecialIntegrals.cpp +329 -0
- package/native/functions/SpecialIntegrals.h +53 -0
- package/native/functions/Summation.cpp +645 -0
- package/native/functions/Summation.h +42 -0
- package/native/integrals/Integrals.cpp +1428 -0
- package/native/integrals/Integrals.h +32 -0
- package/native/limits/Gruntz.cpp +1332 -0
- package/native/limits/Gruntz.h +24 -0
- package/native/linalg/Decompositions.cpp +159 -0
- package/native/linalg/Functions.cpp +199 -0
- package/native/linalg/Linalg.cpp +123 -0
- package/native/linalg/Linalg.h +67 -0
- package/native/linalg/LinalgSupport.h +69 -0
- package/native/linalg/Sparse.cpp +172 -0
- package/native/matrix/Matrices.cpp +766 -0
- package/native/matrix/Matrices.h +74 -0
- package/native/ntheory/NumberTheory.cpp +754 -0
- package/native/ntheory/NumberTheory.h +56 -0
- package/native/numeric/Compiled.cpp +93 -0
- package/native/numeric/Compiled.h +49 -0
- package/native/numeric/Integrate.cpp +718 -0
- package/native/numeric/Numeric.h +95 -0
- package/native/numeric/ODE.cpp +542 -0
- package/native/numeric/Roots.cpp +402 -0
- package/native/ops/Decimal.cpp +776 -0
- package/native/ops/Decimal.h +182 -0
- package/native/ops/DecimalComplex.cpp +738 -0
- package/native/ops/DecimalEvaluator.h +79 -0
- package/native/ops/DecimalFunctions.cpp +439 -0
- package/native/ops/DecimalOperations.cpp +236 -0
- package/native/ops/DecimalSpecial.cpp +1028 -0
- package/native/ops/DecimalSupport.h +109 -0
- package/native/ops/Operations.cpp +969 -0
- package/native/ops/Operations.h +120 -0
- package/native/ops/Piecewise.cpp +195 -0
- package/native/ops/Piecewise.h +40 -0
- package/native/parser/Parser.cpp +853 -0
- package/native/parser/Parser.h +56 -0
- package/native/poly/Convert.cpp +210 -0
- package/native/poly/Convert.h +40 -0
- package/native/poly/Dense.cpp +1008 -0
- package/native/poly/Dense.h +136 -0
- package/native/poly/Euclid.cpp +446 -0
- package/native/poly/Euclid.h +44 -0
- package/native/poly/Factor.cpp +919 -0
- package/native/poly/Factor.h +36 -0
- package/native/poly/Galois.cpp +439 -0
- package/native/poly/Galois.h +86 -0
- package/native/poly/Inequalities.cpp +227 -0
- package/native/poly/Inequalities.h +21 -0
- package/native/poly/Poly.cpp +338 -0
- package/native/poly/Poly.h +46 -0
- package/native/poly/Rational.cpp +403 -0
- package/native/poly/Rational.h +33 -0
- package/native/poly/RealRoots.cpp +136 -0
- package/native/poly/RealRoots.h +35 -0
- package/native/printer/Printer.cpp +973 -0
- package/native/printer/Printer.h +23 -0
- package/native/simplify/Simplify.cpp +921 -0
- package/native/simplify/Simplify.h +21 -0
- package/native/stats/Distributions.cpp +392 -0
- package/native/stats/Distributions.h +33 -0
- package/native/stats/Statistics.cpp +255 -0
- package/native/stats/Statistics.h +25 -0
- package/package.json +85 -4
- package/scripts/sources.mjs +35 -0
- package/vendor/PATCHES.md +169 -0
- package/vendor/boost/config/README.md +43 -0
- package/vendor/boost/config/include/boost/config/abi/borland_prefix.hpp +27 -0
- package/vendor/boost/config/include/boost/config/abi/borland_suffix.hpp +12 -0
- package/vendor/boost/config/include/boost/config/abi/msvc_prefix.hpp +22 -0
- package/vendor/boost/config/include/boost/config/abi/msvc_suffix.hpp +8 -0
- package/vendor/boost/config/include/boost/config/abi_prefix.hpp +25 -0
- package/vendor/boost/config/include/boost/config/abi_suffix.hpp +25 -0
- package/vendor/boost/config/include/boost/config/assert_cxx03.hpp +211 -0
- package/vendor/boost/config/include/boost/config/assert_cxx11.hpp +212 -0
- package/vendor/boost/config/include/boost/config/assert_cxx14.hpp +47 -0
- package/vendor/boost/config/include/boost/config/assert_cxx17.hpp +65 -0
- package/vendor/boost/config/include/boost/config/assert_cxx20.hpp +59 -0
- package/vendor/boost/config/include/boost/config/assert_cxx23.hpp +41 -0
- package/vendor/boost/config/include/boost/config/assert_cxx98.hpp +23 -0
- package/vendor/boost/config/include/boost/config/auto_link.hpp +530 -0
- package/vendor/boost/config/include/boost/config/compiler/borland.hpp +342 -0
- package/vendor/boost/config/include/boost/config/compiler/clang.hpp +370 -0
- package/vendor/boost/config/include/boost/config/compiler/clang_version.hpp +98 -0
- package/vendor/boost/config/include/boost/config/compiler/codegear.hpp +389 -0
- package/vendor/boost/config/include/boost/config/compiler/comeau.hpp +59 -0
- package/vendor/boost/config/include/boost/config/compiler/common_edg.hpp +185 -0
- package/vendor/boost/config/include/boost/config/compiler/compaq_cxx.hpp +19 -0
- package/vendor/boost/config/include/boost/config/compiler/cray.hpp +446 -0
- package/vendor/boost/config/include/boost/config/compiler/diab.hpp +26 -0
- package/vendor/boost/config/include/boost/config/compiler/digitalmars.hpp +146 -0
- package/vendor/boost/config/include/boost/config/compiler/gcc.hpp +386 -0
- package/vendor/boost/config/include/boost/config/compiler/gcc_xml.hpp +115 -0
- package/vendor/boost/config/include/boost/config/compiler/greenhills.hpp +28 -0
- package/vendor/boost/config/include/boost/config/compiler/hp_acc.hpp +153 -0
- package/vendor/boost/config/include/boost/config/compiler/intel.hpp +577 -0
- package/vendor/boost/config/include/boost/config/compiler/kai.hpp +33 -0
- package/vendor/boost/config/include/boost/config/compiler/metrowerks.hpp +201 -0
- package/vendor/boost/config/include/boost/config/compiler/mpw.hpp +143 -0
- package/vendor/boost/config/include/boost/config/compiler/nvcc.hpp +64 -0
- package/vendor/boost/config/include/boost/config/compiler/pathscale.hpp +141 -0
- package/vendor/boost/config/include/boost/config/compiler/pgi.hpp +23 -0
- package/vendor/boost/config/include/boost/config/compiler/sgi_mipspro.hpp +29 -0
- package/vendor/boost/config/include/boost/config/compiler/sunpro_cc.hpp +225 -0
- package/vendor/boost/config/include/boost/config/compiler/vacpp.hpp +189 -0
- package/vendor/boost/config/include/boost/config/compiler/visualc.hpp +400 -0
- package/vendor/boost/config/include/boost/config/compiler/xlcpp.hpp +303 -0
- package/vendor/boost/config/include/boost/config/compiler/xlcpp_zos.hpp +174 -0
- package/vendor/boost/config/include/boost/config/detail/cxx_composite.hpp +218 -0
- package/vendor/boost/config/include/boost/config/detail/posix_features.hpp +95 -0
- package/vendor/boost/config/include/boost/config/detail/select_compiler_config.hpp +157 -0
- package/vendor/boost/config/include/boost/config/detail/select_platform_config.hpp +147 -0
- package/vendor/boost/config/include/boost/config/detail/select_stdlib_config.hpp +121 -0
- package/vendor/boost/config/include/boost/config/detail/suffix.hpp +1334 -0
- package/vendor/boost/config/include/boost/config/header_deprecated.hpp +26 -0
- package/vendor/boost/config/include/boost/config/helper_macros.hpp +37 -0
- package/vendor/boost/config/include/boost/config/no_tr1/cmath.hpp +28 -0
- package/vendor/boost/config/include/boost/config/no_tr1/complex.hpp +28 -0
- package/vendor/boost/config/include/boost/config/no_tr1/functional.hpp +28 -0
- package/vendor/boost/config/include/boost/config/no_tr1/memory.hpp +28 -0
- package/vendor/boost/config/include/boost/config/no_tr1/utility.hpp +28 -0
- package/vendor/boost/config/include/boost/config/platform/aix.hpp +33 -0
- package/vendor/boost/config/include/boost/config/platform/amigaos.hpp +15 -0
- package/vendor/boost/config/include/boost/config/platform/beos.hpp +26 -0
- package/vendor/boost/config/include/boost/config/platform/bsd.hpp +83 -0
- package/vendor/boost/config/include/boost/config/platform/cloudabi.hpp +18 -0
- package/vendor/boost/config/include/boost/config/platform/cray.hpp +18 -0
- package/vendor/boost/config/include/boost/config/platform/cygwin.hpp +71 -0
- package/vendor/boost/config/include/boost/config/platform/haiku.hpp +31 -0
- package/vendor/boost/config/include/boost/config/platform/hpux.hpp +87 -0
- package/vendor/boost/config/include/boost/config/platform/irix.hpp +31 -0
- package/vendor/boost/config/include/boost/config/platform/linux.hpp +106 -0
- package/vendor/boost/config/include/boost/config/platform/macos.hpp +87 -0
- package/vendor/boost/config/include/boost/config/platform/qnxnto.hpp +31 -0
- package/vendor/boost/config/include/boost/config/platform/solaris.hpp +31 -0
- package/vendor/boost/config/include/boost/config/platform/symbian.hpp +97 -0
- package/vendor/boost/config/include/boost/config/platform/vms.hpp +25 -0
- package/vendor/boost/config/include/boost/config/platform/vxworks.hpp +422 -0
- package/vendor/boost/config/include/boost/config/platform/wasm.hpp +23 -0
- package/vendor/boost/config/include/boost/config/platform/win32.hpp +90 -0
- package/vendor/boost/config/include/boost/config/platform/zos.hpp +32 -0
- package/vendor/boost/config/include/boost/config/pragma_message.hpp +31 -0
- package/vendor/boost/config/include/boost/config/requires_threads.hpp +92 -0
- package/vendor/boost/config/include/boost/config/stdlib/dinkumware.hpp +324 -0
- package/vendor/boost/config/include/boost/config/stdlib/libcomo.hpp +93 -0
- package/vendor/boost/config/include/boost/config/stdlib/libcpp.hpp +185 -0
- package/vendor/boost/config/include/boost/config/stdlib/libstdcpp3.hpp +482 -0
- package/vendor/boost/config/include/boost/config/stdlib/modena.hpp +79 -0
- package/vendor/boost/config/include/boost/config/stdlib/msl.hpp +98 -0
- package/vendor/boost/config/include/boost/config/stdlib/roguewave.hpp +208 -0
- package/vendor/boost/config/include/boost/config/stdlib/sgi.hpp +168 -0
- package/vendor/boost/config/include/boost/config/stdlib/stlport.hpp +258 -0
- package/vendor/boost/config/include/boost/config/stdlib/vacpp.hpp +74 -0
- package/vendor/boost/config/include/boost/config/stdlib/xlcpp_zos.hpp +61 -0
- package/vendor/boost/config/include/boost/config/user.hpp +133 -0
- package/vendor/boost/config/include/boost/config/warning_disable.hpp +47 -0
- package/vendor/boost/config/include/boost/config/workaround.hpp +310 -0
- package/vendor/boost/config/include/boost/config.hpp +67 -0
- package/vendor/boost/config/include/boost/cstdint.hpp +556 -0
- package/vendor/boost/config/include/boost/cxx11_char_types.hpp +70 -0
- package/vendor/boost/config/include/boost/detail/workaround.hpp +10 -0
- package/vendor/boost/config/include/boost/limits.hpp +146 -0
- package/vendor/boost/config/include/boost/static_assert.hpp +179 -0
- package/vendor/boost/config/include/boost/version.hpp +32 -0
- package/vendor/boost/math/LICENSE +23 -0
- package/vendor/boost/math/README.md +184 -0
- package/vendor/boost/math/include/boost/cstdfloat.hpp +58 -0
- package/vendor/boost/math/include/boost/math/bindings/detail/big_digamma.hpp +297 -0
- package/vendor/boost/math/include/boost/math/bindings/detail/big_lanczos.hpp +777 -0
- package/vendor/boost/math/include/boost/math/bindings/mpfr.hpp +974 -0
- package/vendor/boost/math/include/boost/math/bindings/mpreal.hpp +921 -0
- package/vendor/boost/math/include/boost/math/bindings/rr.hpp +876 -0
- package/vendor/boost/math/include/boost/math/ccmath/abs.hpp +89 -0
- package/vendor/boost/math/include/boost/math/ccmath/ccmath.hpp +45 -0
- package/vendor/boost/math/include/boost/math/ccmath/ceil.hpp +78 -0
- package/vendor/boost/math/include/boost/math/ccmath/copysign.hpp +81 -0
- package/vendor/boost/math/include/boost/math/ccmath/detail/config.hpp +52 -0
- package/vendor/boost/math/include/boost/math/ccmath/detail/swap.hpp +21 -0
- package/vendor/boost/math/include/boost/math/ccmath/div.hpp +86 -0
- package/vendor/boost/math/include/boost/math/ccmath/fabs.hpp +41 -0
- package/vendor/boost/math/include/boost/math/ccmath/fdim.hpp +93 -0
- package/vendor/boost/math/include/boost/math/ccmath/floor.hpp +131 -0
- package/vendor/boost/math/include/boost/math/ccmath/fma.hpp +130 -0
- package/vendor/boost/math/include/boost/math/ccmath/fmax.hpp +89 -0
- package/vendor/boost/math/include/boost/math/ccmath/fmin.hpp +89 -0
- package/vendor/boost/math/include/boost/math/ccmath/fmod.hpp +114 -0
- package/vendor/boost/math/include/boost/math/ccmath/fpclassify.hpp +48 -0
- package/vendor/boost/math/include/boost/math/ccmath/frexp.hpp +101 -0
- package/vendor/boost/math/include/boost/math/ccmath/hypot.hpp +116 -0
- package/vendor/boost/math/include/boost/math/ccmath/ilogb.hpp +60 -0
- package/vendor/boost/math/include/boost/math/ccmath/isfinite.hpp +53 -0
- package/vendor/boost/math/include/boost/math/ccmath/isgreater.hpp +42 -0
- package/vendor/boost/math/include/boost/math/ccmath/isgreaterequal.hpp +42 -0
- package/vendor/boost/math/include/boost/math/ccmath/isinf.hpp +61 -0
- package/vendor/boost/math/include/boost/math/ccmath/isless.hpp +42 -0
- package/vendor/boost/math/include/boost/math/ccmath/islessequal.hpp +42 -0
- package/vendor/boost/math/include/boost/math/ccmath/isnan.hpp +42 -0
- package/vendor/boost/math/include/boost/math/ccmath/isnormal.hpp +47 -0
- package/vendor/boost/math/include/boost/math/ccmath/isunordered.hpp +35 -0
- package/vendor/boost/math/include/boost/math/ccmath/ldexp.hpp +81 -0
- package/vendor/boost/math/include/boost/math/ccmath/logb.hpp +86 -0
- package/vendor/boost/math/include/boost/math/ccmath/modf.hpp +79 -0
- package/vendor/boost/math/include/boost/math/ccmath/next.hpp +458 -0
- package/vendor/boost/math/include/boost/math/ccmath/remainder.hpp +106 -0
- package/vendor/boost/math/include/boost/math/ccmath/round.hpp +179 -0
- package/vendor/boost/math/include/boost/math/ccmath/scalbln.hpp +60 -0
- package/vendor/boost/math/include/boost/math/ccmath/scalbn.hpp +81 -0
- package/vendor/boost/math/include/boost/math/ccmath/signbit.hpp +218 -0
- package/vendor/boost/math/include/boost/math/ccmath/sqrt.hpp +80 -0
- package/vendor/boost/math/include/boost/math/ccmath/trunc.hpp +70 -0
- package/vendor/boost/math/include/boost/math/common_factor.hpp +23 -0
- package/vendor/boost/math/include/boost/math/common_factor_ct.hpp +34 -0
- package/vendor/boost/math/include/boost/math/common_factor_rt.hpp +30 -0
- package/vendor/boost/math/include/boost/math/complex/acos.hpp +245 -0
- package/vendor/boost/math/include/boost/math/complex/acosh.hpp +34 -0
- package/vendor/boost/math/include/boost/math/complex/asin.hpp +252 -0
- package/vendor/boost/math/include/boost/math/complex/asinh.hpp +32 -0
- package/vendor/boost/math/include/boost/math/complex/atan.hpp +36 -0
- package/vendor/boost/math/include/boost/math/complex/atanh.hpp +214 -0
- package/vendor/boost/math/include/boost/math/complex/details.hpp +68 -0
- package/vendor/boost/math/include/boost/math/complex/fabs.hpp +23 -0
- package/vendor/boost/math/include/boost/math/complex.hpp +32 -0
- package/vendor/boost/math/include/boost/math/concepts/distributions.hpp +497 -0
- package/vendor/boost/math/include/boost/math/concepts/real_concept.hpp +400 -0
- package/vendor/boost/math/include/boost/math/concepts/real_type_concept.hpp +119 -0
- package/vendor/boost/math/include/boost/math/concepts/std_real_concept.hpp +427 -0
- package/vendor/boost/math/include/boost/math/constants/calculate_constants.hpp +1117 -0
- package/vendor/boost/math/include/boost/math/constants/constants.hpp +360 -0
- package/vendor/boost/math/include/boost/math/constants/info.hpp +169 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_cmath.hpp +1012 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_complex.hpp +38 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_complex_std.hpp +813 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_iostream.hpp +822 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_limits.hpp +87 -0
- package/vendor/boost/math/include/boost/math/cstdfloat/cstdfloat_types.hpp +441 -0
- package/vendor/boost/math/include/boost/math/differentiation/autodiff.hpp +2061 -0
- package/vendor/boost/math/include/boost/math/differentiation/autodiff_cpp11.hpp +387 -0
- package/vendor/boost/math/include/boost/math/differentiation/autodiff_reverse.hpp +811 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_basic_operator_expressions.hpp +276 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_basic_ops_et.hpp +160 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_basic_ops_no_et.hpp +154 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_comparison_operator_overloads.hpp +167 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_erf_overloads.hpp +234 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_expression_template_base.hpp +258 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_helper_functions.hpp +18 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_memory_management.hpp +462 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_stl_et.hpp +275 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_stl_expressions.hpp +852 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_stl_no_et.hpp +266 -0
- package/vendor/boost/math/include/boost/math/differentiation/detail/reverse_mode_autodiff_utilities.hpp +51 -0
- package/vendor/boost/math/include/boost/math/differentiation/finite_difference.hpp +266 -0
- package/vendor/boost/math/include/boost/math/differentiation/lanczos_smoothing.hpp +591 -0
- package/vendor/boost/math/include/boost/math/distributions/arcsine.hpp +593 -0
- package/vendor/boost/math/include/boost/math/distributions/bernoulli.hpp +349 -0
- package/vendor/boost/math/include/boost/math/distributions/beta.hpp +584 -0
- package/vendor/boost/math/include/boost/math/distributions/binomial.hpp +729 -0
- package/vendor/boost/math/include/boost/math/distributions/cauchy.hpp +379 -0
- package/vendor/boost/math/include/boost/math/distributions/chi_squared.hpp +345 -0
- package/vendor/boost/math/include/boost/math/distributions/complement.hpp +198 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/common_error_handling.hpp +228 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/derived_accessors.hpp +190 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/generic_mode.hpp +145 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/generic_quantile.hpp +100 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/hypergeometric_cdf.hpp +101 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/hypergeometric_pdf.hpp +490 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/hypergeometric_quantile.hpp +245 -0
- package/vendor/boost/math/include/boost/math/distributions/detail/inv_discrete_quantile.hpp +583 -0
- package/vendor/boost/math/include/boost/math/distributions/empirical_cumulative_distribution_function.hpp +73 -0
- package/vendor/boost/math/include/boost/math/distributions/exponential.hpp +352 -0
- package/vendor/boost/math/include/boost/math/distributions/extreme_value.hpp +388 -0
- package/vendor/boost/math/include/boost/math/distributions/find_location.hpp +141 -0
- package/vendor/boost/math/include/boost/math/distributions/find_scale.hpp +200 -0
- package/vendor/boost/math/include/boost/math/distributions/fisher_f.hpp +393 -0
- package/vendor/boost/math/include/boost/math/distributions/fwd.hpp +171 -0
- package/vendor/boost/math/include/boost/math/distributions/gamma.hpp +396 -0
- package/vendor/boost/math/include/boost/math/distributions/geometric.hpp +571 -0
- package/vendor/boost/math/include/boost/math/distributions/holtsmark.hpp +2518 -0
- package/vendor/boost/math/include/boost/math/distributions/hyperexponential.hpp +641 -0
- package/vendor/boost/math/include/boost/math/distributions/hypergeometric.hpp +313 -0
- package/vendor/boost/math/include/boost/math/distributions/inverse_chi_squared.hpp +398 -0
- package/vendor/boost/math/include/boost/math/distributions/inverse_gamma.hpp +504 -0
- package/vendor/boost/math/include/boost/math/distributions/inverse_gaussian.hpp +566 -0
- package/vendor/boost/math/include/boost/math/distributions/kolmogorov_smirnov.hpp +511 -0
- package/vendor/boost/math/include/boost/math/distributions/landau.hpp +4642 -0
- package/vendor/boost/math/include/boost/math/distributions/laplace.hpp +494 -0
- package/vendor/boost/math/include/boost/math/distributions/logistic.hpp +377 -0
- package/vendor/boost/math/include/boost/math/distributions/lognormal.hpp +361 -0
- package/vendor/boost/math/include/boost/math/distributions/mapairy.hpp +4220 -0
- package/vendor/boost/math/include/boost/math/distributions/negative_binomial.hpp +609 -0
- package/vendor/boost/math/include/boost/math/distributions/non_central_beta.hpp +981 -0
- package/vendor/boost/math/include/boost/math/distributions/non_central_chi_squared.hpp +998 -0
- package/vendor/boost/math/include/boost/math/distributions/non_central_f.hpp +712 -0
- package/vendor/boost/math/include/boost/math/distributions/non_central_t.hpp +1324 -0
- package/vendor/boost/math/include/boost/math/distributions/normal.hpp +368 -0
- package/vendor/boost/math/include/boost/math/distributions/pareto.hpp +508 -0
- package/vendor/boost/math/include/boost/math/distributions/poisson.hpp +563 -0
- package/vendor/boost/math/include/boost/math/distributions/rayleigh.hpp +381 -0
- package/vendor/boost/math/include/boost/math/distributions/saspoint5.hpp +2796 -0
- package/vendor/boost/math/include/boost/math/distributions/skew_normal.hpp +760 -0
- package/vendor/boost/math/include/boost/math/distributions/students_t.hpp +721 -0
- package/vendor/boost/math/include/boost/math/distributions/triangular.hpp +548 -0
- package/vendor/boost/math/include/boost/math/distributions/uniform.hpp +398 -0
- package/vendor/boost/math/include/boost/math/distributions/weibull.hpp +487 -0
- package/vendor/boost/math/include/boost/math/distributions.hpp +58 -0
- package/vendor/boost/math/include/boost/math/filters/daubechies.hpp +99 -0
- package/vendor/boost/math/include/boost/math/interpolators/barycentric_rational.hpp +99 -0
- package/vendor/boost/math/include/boost/math/interpolators/bezier_polynomial.hpp +60 -0
- package/vendor/boost/math/include/boost/math/interpolators/bilinear_uniform.hpp +54 -0
- package/vendor/boost/math/include/boost/math/interpolators/cardinal_cubic_b_spline.hpp +87 -0
- package/vendor/boost/math/include/boost/math/interpolators/cardinal_quadratic_b_spline.hpp +57 -0
- package/vendor/boost/math/include/boost/math/interpolators/cardinal_quintic_b_spline.hpp +62 -0
- package/vendor/boost/math/include/boost/math/interpolators/cardinal_trigonometric.hpp +58 -0
- package/vendor/boost/math/include/boost/math/interpolators/catmull_rom.hpp +310 -0
- package/vendor/boost/math/include/boost/math/interpolators/cubic_b_spline.hpp +90 -0
- package/vendor/boost/math/include/boost/math/interpolators/cubic_hermite.hpp +142 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/barycentric_rational_detail.hpp +215 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/bezier_polynomial_detail.hpp +167 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/bilinear_uniform_detail.hpp +137 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_cubic_b_spline_detail.hpp +331 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_quadratic_b_spline_detail.hpp +208 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_quintic_b_spline_detail.hpp +241 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cardinal_trigonometric_detail.hpp +684 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cubic_b_spline_detail.hpp +330 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/cubic_hermite_detail.hpp +439 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/quintic_hermite_detail.hpp +586 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/septic_hermite_detail.hpp +653 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/vector_barycentric_rational_detail.hpp +196 -0
- package/vendor/boost/math/include/boost/math/interpolators/detail/whittaker_shannon_detail.hpp +128 -0
- package/vendor/boost/math/include/boost/math/interpolators/makima.hpp +178 -0
- package/vendor/boost/math/include/boost/math/interpolators/pchip.hpp +136 -0
- package/vendor/boost/math/include/boost/math/interpolators/quintic_hermite.hpp +143 -0
- package/vendor/boost/math/include/boost/math/interpolators/septic_hermite.hpp +147 -0
- package/vendor/boost/math/include/boost/math/interpolators/vector_barycentric_rational.hpp +82 -0
- package/vendor/boost/math/include/boost/math/interpolators/whittaker_shannon.hpp +47 -0
- package/vendor/boost/math/include/boost/math/octonion.hpp +4254 -0
- package/vendor/boost/math/include/boost/math/optimization/cma_es.hpp +392 -0
- package/vendor/boost/math/include/boost/math/optimization/detail/common.hpp +200 -0
- package/vendor/boost/math/include/boost/math/optimization/detail/differentiable_opt_utilties.hpp +157 -0
- package/vendor/boost/math/include/boost/math/optimization/detail/gradient_opt_base.hpp +92 -0
- package/vendor/boost/math/include/boost/math/optimization/detail/line_search_policies.hpp +206 -0
- package/vendor/boost/math/include/boost/math/optimization/detail/rdiff_optimization_policies.hpp +134 -0
- package/vendor/boost/math/include/boost/math/optimization/differential_evolution.hpp +236 -0
- package/vendor/boost/math/include/boost/math/optimization/gradient_descent.hpp +202 -0
- package/vendor/boost/math/include/boost/math/optimization/gradient_optimizers.hpp +18 -0
- package/vendor/boost/math/include/boost/math/optimization/jso.hpp +465 -0
- package/vendor/boost/math/include/boost/math/optimization/lbfgs.hpp +382 -0
- package/vendor/boost/math/include/boost/math/optimization/minimizer.hpp +336 -0
- package/vendor/boost/math/include/boost/math/optimization/nesterov.hpp +208 -0
- package/vendor/boost/math/include/boost/math/optimization/random_search.hpp +145 -0
- package/vendor/boost/math/include/boost/math/policies/error_handling.hpp +1062 -0
- package/vendor/boost/math/include/boost/math/policies/policy.hpp +1034 -0
- package/vendor/boost/math/include/boost/math/quadrature/detail/exp_sinh_detail.hpp +2002 -0
- package/vendor/boost/math/include/boost/math/quadrature/detail/ooura_fourier_integrals_detail.hpp +692 -0
- package/vendor/boost/math/include/boost/math/quadrature/detail/sinh_sinh_detail.hpp +1353 -0
- package/vendor/boost/math/include/boost/math/quadrature/detail/tanh_sinh_detail.hpp +879 -0
- package/vendor/boost/math/include/boost/math/quadrature/exp_sinh.hpp +180 -0
- package/vendor/boost/math/include/boost/math/quadrature/gauss.hpp +904 -0
- package/vendor/boost/math/include/boost/math/quadrature/gauss_kronrod.hpp +1317 -0
- package/vendor/boost/math/include/boost/math/quadrature/naive_monte_carlo.hpp +469 -0
- package/vendor/boost/math/include/boost/math/quadrature/ooura_fourier_integrals.hpp +68 -0
- package/vendor/boost/math/include/boost/math/quadrature/sinh_sinh.hpp +72 -0
- package/vendor/boost/math/include/boost/math/quadrature/tanh_sinh.hpp +289 -0
- package/vendor/boost/math/include/boost/math/quadrature/trapezoidal.hpp +125 -0
- package/vendor/boost/math/include/boost/math/quadrature/wavelet_transforms.hpp +47 -0
- package/vendor/boost/math/include/boost/math/quaternion.hpp +1190 -0
- package/vendor/boost/math/include/boost/math/special_functions/acosh.hpp +102 -0
- package/vendor/boost/math/include/boost/math/special_functions/airy.hpp +475 -0
- package/vendor/boost/math/include/boost/math/special_functions/asinh.hpp +110 -0
- package/vendor/boost/math/include/boost/math/special_functions/atanh.hpp +116 -0
- package/vendor/boost/math/include/boost/math/special_functions/bernoulli.hpp +149 -0
- package/vendor/boost/math/include/boost/math/special_functions/bessel.hpp +795 -0
- package/vendor/boost/math/include/boost/math/special_functions/bessel_iterators.hpp +187 -0
- package/vendor/boost/math/include/boost/math/special_functions/bessel_prime.hpp +343 -0
- package/vendor/boost/math/include/boost/math/special_functions/beta.hpp +1870 -0
- package/vendor/boost/math/include/boost/math/special_functions/binomial.hpp +87 -0
- package/vendor/boost/math/include/boost/math/special_functions/cardinal_b_spline.hpp +218 -0
- package/vendor/boost/math/include/boost/math/special_functions/cbrt.hpp +215 -0
- package/vendor/boost/math/include/boost/math/special_functions/chebyshev.hpp +314 -0
- package/vendor/boost/math/include/boost/math/special_functions/chebyshev_transform.hpp +237 -0
- package/vendor/boost/math/include/boost/math/special_functions/cos_pi.hpp +128 -0
- package/vendor/boost/math/include/boost/math/special_functions/daubechies_scaling.hpp +491 -0
- package/vendor/boost/math/include/boost/math/special_functions/daubechies_wavelet.hpp +266 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/airy_ai_bi_zero.hpp +222 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bernoulli_details.hpp +629 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_derivatives_linear.hpp +107 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_i0.hpp +550 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_i1.hpp +556 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_ik.hpp +447 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_j0.hpp +192 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_j1.hpp +179 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jn.hpp +127 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy.hpp +603 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_asym.hpp +230 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_derivatives_asym.hpp +141 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_derivatives_series.hpp +219 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_series.hpp +267 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_jy_zero.hpp +643 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_k0.hpp +485 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_k1.hpp +526 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_kn.hpp +91 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_y0.hpp +205 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_y1.hpp +183 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/bessel_yn.hpp +113 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/daubechies_scaling_integer_grid.hpp +244 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/erf_inv.hpp +559 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/fp_traits.hpp +562 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/gamma_inva.hpp +241 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_0F1_bessel.hpp +46 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_addition_theorems_on_z.hpp +293 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_bessel.hpp +768 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_by_ratios.hpp +678 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_cf.hpp +50 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_large_a.hpp +35 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_large_abz.hpp +492 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_negative_b_regions.hpp +521 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_recurrence.hpp +522 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_scaled_series.hpp +60 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_1F1_small_a_negative_b_by_ratio.hpp +70 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_asym.hpp +179 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_cf.hpp +228 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_pFq_checked_series.hpp +687 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_pade.hpp +131 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_rational.hpp +167 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_separated_series.hpp +50 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/hypergeometric_series.hpp +434 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/ibeta_inv_ab.hpp +331 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/ibeta_inverse.hpp +1122 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/iconv.hpp +43 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/igamma_inverse.hpp +587 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/igamma_large.hpp +823 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/lambert_w_lookup_table.ipp +162 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/lanczos_sse2.hpp +238 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/lgamma_small.hpp +569 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/polygamma.hpp +538 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/round_fwd.hpp +87 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/t_distribution_inv.hpp +567 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/unchecked_bernoulli.hpp +1305 -0
- package/vendor/boost/math/include/boost/math/special_functions/detail/unchecked_factorial.hpp +1727 -0
- package/vendor/boost/math/include/boost/math/special_functions/digamma.hpp +631 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_1.hpp +815 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_2.hpp +756 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_3.hpp +374 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_d.hpp +183 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_rc.hpp +112 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_rd.hpp +207 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_rf.hpp +169 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_rg.hpp +130 -0
- package/vendor/boost/math/include/boost/math/special_functions/ellint_rj.hpp +299 -0
- package/vendor/boost/math/include/boost/math/special_functions/erf.hpp +1334 -0
- package/vendor/boost/math/include/boost/math/special_functions/expint.hpp +1614 -0
- package/vendor/boost/math/include/boost/math/special_functions/expm1.hpp +416 -0
- package/vendor/boost/math/include/boost/math/special_functions/factorials.hpp +276 -0
- package/vendor/boost/math/include/boost/math/special_functions/fibonacci.hpp +92 -0
- package/vendor/boost/math/include/boost/math/special_functions/fourier_transform_daubechies.hpp +248 -0
- package/vendor/boost/math/include/boost/math/special_functions/fpclassify.hpp +797 -0
- package/vendor/boost/math/include/boost/math/special_functions/gamma.hpp +2628 -0
- package/vendor/boost/math/include/boost/math/special_functions/gegenbauer.hpp +84 -0
- package/vendor/boost/math/include/boost/math/special_functions/hankel.hpp +186 -0
- package/vendor/boost/math/include/boost/math/special_functions/hermite.hpp +79 -0
- package/vendor/boost/math/include/boost/math/special_functions/heuman_lambda.hpp +97 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_0F1.hpp +116 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_1F0.hpp +69 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_1F1.hpp +822 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_2F0.hpp +163 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypergeometric_pFq.hpp +205 -0
- package/vendor/boost/math/include/boost/math/special_functions/hypot.hpp +148 -0
- package/vendor/boost/math/include/boost/math/special_functions/jacobi.hpp +69 -0
- package/vendor/boost/math/include/boost/math/special_functions/jacobi_elliptic.hpp +319 -0
- package/vendor/boost/math/include/boost/math/special_functions/jacobi_theta.hpp +802 -0
- package/vendor/boost/math/include/boost/math/special_functions/jacobi_zeta.hpp +83 -0
- package/vendor/boost/math/include/boost/math/special_functions/laguerre.hpp +139 -0
- package/vendor/boost/math/include/boost/math/special_functions/lambert_w.hpp +2171 -0
- package/vendor/boost/math/include/boost/math/special_functions/lanczos.hpp +2760 -0
- package/vendor/boost/math/include/boost/math/special_functions/legendre.hpp +380 -0
- package/vendor/boost/math/include/boost/math/special_functions/legendre_stieltjes.hpp +234 -0
- package/vendor/boost/math/include/boost/math/special_functions/log1p.hpp +417 -0
- package/vendor/boost/math/include/boost/math/special_functions/logaddexp.hpp +41 -0
- package/vendor/boost/math/include/boost/math/special_functions/logistic_sigmoid.hpp +46 -0
- package/vendor/boost/math/include/boost/math/special_functions/logit.hpp +56 -0
- package/vendor/boost/math/include/boost/math/special_functions/logsumexp.hpp +60 -0
- package/vendor/boost/math/include/boost/math/special_functions/math_fwd.hpp +1927 -0
- package/vendor/boost/math/include/boost/math/special_functions/modf.hpp +74 -0
- package/vendor/boost/math/include/boost/math/special_functions/next.hpp +886 -0
- package/vendor/boost/math/include/boost/math/special_functions/nonfinite_num_facets.hpp +588 -0
- package/vendor/boost/math/include/boost/math/special_functions/owens_t.hpp +1067 -0
- package/vendor/boost/math/include/boost/math/special_functions/polygamma.hpp +83 -0
- package/vendor/boost/math/include/boost/math/special_functions/pow.hpp +144 -0
- package/vendor/boost/math/include/boost/math/special_functions/powm1.hpp +101 -0
- package/vendor/boost/math/include/boost/math/special_functions/prime.hpp +2433 -0
- package/vendor/boost/math/include/boost/math/special_functions/relative_difference.hpp +134 -0
- package/vendor/boost/math/include/boost/math/special_functions/round.hpp +353 -0
- package/vendor/boost/math/include/boost/math/special_functions/rsqrt.hpp +52 -0
- package/vendor/boost/math/include/boost/math/special_functions/sign.hpp +241 -0
- package/vendor/boost/math/include/boost/math/special_functions/sin_pi.hpp +135 -0
- package/vendor/boost/math/include/boost/math/special_functions/sinc.hpp +123 -0
- package/vendor/boost/math/include/boost/math/special_functions/sinhc.hpp +142 -0
- package/vendor/boost/math/include/boost/math/special_functions/spherical_harmonic.hpp +205 -0
- package/vendor/boost/math/include/boost/math/special_functions/sqrt1pm1.hpp +49 -0
- package/vendor/boost/math/include/boost/math/special_functions/trigamma.hpp +448 -0
- package/vendor/boost/math/include/boost/math/special_functions/trunc.hpp +385 -0
- package/vendor/boost/math/include/boost/math/special_functions/ulp.hpp +102 -0
- package/vendor/boost/math/include/boost/math/special_functions/zeta.hpp +1081 -0
- package/vendor/boost/math/include/boost/math/special_functions.hpp +86 -0
- package/vendor/boost/math/include/boost/math/statistics/anderson_darling.hpp +112 -0
- package/vendor/boost/math/include/boost/math/statistics/bivariate_statistics.hpp +470 -0
- package/vendor/boost/math/include/boost/math/statistics/chatterjee_correlation.hpp +159 -0
- package/vendor/boost/math/include/boost/math/statistics/detail/rank.hpp +140 -0
- package/vendor/boost/math/include/boost/math/statistics/detail/single_pass.hpp +401 -0
- package/vendor/boost/math/include/boost/math/statistics/linear_regression.hpp +133 -0
- package/vendor/boost/math/include/boost/math/statistics/ljung_box.hpp +70 -0
- package/vendor/boost/math/include/boost/math/statistics/runs_test.hpp +121 -0
- package/vendor/boost/math/include/boost/math/statistics/signal_statistics.hpp +350 -0
- package/vendor/boost/math/include/boost/math/statistics/t_test.hpp +275 -0
- package/vendor/boost/math/include/boost/math/statistics/univariate_statistics.hpp +1184 -0
- package/vendor/boost/math/include/boost/math/statistics/z_test.hpp +161 -0
- package/vendor/boost/math/include/boost/math/tools/agm.hpp +47 -0
- package/vendor/boost/math/include/boost/math/tools/array.hpp +41 -0
- package/vendor/boost/math/include/boost/math/tools/assert.hpp +49 -0
- package/vendor/boost/math/include/boost/math/tools/atomic.hpp +50 -0
- package/vendor/boost/math/include/boost/math/tools/big_constant.hpp +110 -0
- package/vendor/boost/math/include/boost/math/tools/bivariate_statistics.hpp +96 -0
- package/vendor/boost/math/include/boost/math/tools/centered_continued_fraction.hpp +173 -0
- package/vendor/boost/math/include/boost/math/tools/cohen_acceleration.hpp +51 -0
- package/vendor/boost/math/include/boost/math/tools/color_maps.hpp +1943 -0
- package/vendor/boost/math/include/boost/math/tools/complex.hpp +115 -0
- package/vendor/boost/math/include/boost/math/tools/concepts.hpp +24 -0
- package/vendor/boost/math/include/boost/math/tools/condition_numbers.hpp +144 -0
- package/vendor/boost/math/include/boost/math/tools/config.hpp +856 -0
- package/vendor/boost/math/include/boost/math/tools/convert_from_string.hpp +85 -0
- package/vendor/boost/math/include/boost/math/tools/cstdint.hpp +107 -0
- package/vendor/boost/math/include/boost/math/tools/cubic_roots.hpp +198 -0
- package/vendor/boost/math/include/boost/math/tools/cxx03_warn.hpp +95 -0
- package/vendor/boost/math/include/boost/math/tools/detail/is_const_iterable.hpp +38 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_10.hpp +84 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_11.hpp +90 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_12.hpp +96 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_13.hpp +102 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_14.hpp +108 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_15.hpp +114 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_16.hpp +120 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_17.hpp +126 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_18.hpp +132 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_19.hpp +138 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_2.hpp +36 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_20.hpp +144 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_3.hpp +42 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_4.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_5.hpp +54 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_6.hpp +60 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_7.hpp +66 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_8.hpp +72 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner1_9.hpp +78 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_10.hpp +90 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_11.hpp +97 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_12.hpp +104 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_13.hpp +111 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_14.hpp +118 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_15.hpp +125 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_16.hpp +132 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_17.hpp +139 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_18.hpp +146 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_19.hpp +153 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_2.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_20.hpp +160 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_3.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_4.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_5.hpp +55 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_6.hpp +62 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_7.hpp +69 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_8.hpp +76 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner2_9.hpp +83 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_10.hpp +156 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_11.hpp +181 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_12.hpp +208 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_13.hpp +237 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_14.hpp +268 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_15.hpp +301 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_16.hpp +336 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_17.hpp +373 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_18.hpp +412 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_19.hpp +453 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_2.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_20.hpp +496 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_3.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_4.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_5.hpp +61 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_6.hpp +76 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_7.hpp +93 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_8.hpp +112 -0
- package/vendor/boost/math/include/boost/math/tools/detail/polynomial_horner3_9.hpp +133 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_10.hpp +138 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_11.hpp +150 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_12.hpp +162 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_13.hpp +174 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_14.hpp +186 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_15.hpp +198 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_16.hpp +210 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_17.hpp +222 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_18.hpp +234 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_19.hpp +246 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_2.hpp +42 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_20.hpp +258 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_3.hpp +54 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_4.hpp +66 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_5.hpp +78 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_6.hpp +90 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_7.hpp +102 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_8.hpp +114 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner1_9.hpp +126 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_10.hpp +144 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_11.hpp +160 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_12.hpp +176 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_13.hpp +192 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_14.hpp +208 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_15.hpp +224 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_16.hpp +240 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_17.hpp +256 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_18.hpp +272 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_19.hpp +288 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_2.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_20.hpp +304 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_3.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_4.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_5.hpp +64 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_6.hpp +80 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_7.hpp +96 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_8.hpp +112 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner2_9.hpp +128 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_10.hpp +396 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_11.hpp +482 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_12.hpp +576 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_13.hpp +678 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_14.hpp +788 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_15.hpp +906 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_16.hpp +1032 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_17.hpp +1166 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_18.hpp +1308 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_19.hpp +1458 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_2.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_20.hpp +1616 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_3.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_4.hpp +48 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_5.hpp +86 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_6.hpp +132 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_7.hpp +186 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_8.hpp +248 -0
- package/vendor/boost/math/include/boost/math/tools/detail/rational_horner3_9.hpp +318 -0
- package/vendor/boost/math/include/boost/math/tools/engel_expansion.hpp +124 -0
- package/vendor/boost/math/include/boost/math/tools/estrin.hpp +72 -0
- package/vendor/boost/math/include/boost/math/tools/fraction.hpp +354 -0
- package/vendor/boost/math/include/boost/math/tools/header_deprecated.hpp +27 -0
- package/vendor/boost/math/include/boost/math/tools/is_constant_evaluated.hpp +51 -0
- package/vendor/boost/math/include/boost/math/tools/is_detected.hpp +56 -0
- package/vendor/boost/math/include/boost/math/tools/is_standalone.hpp +18 -0
- package/vendor/boost/math/include/boost/math/tools/luroth_expansion.hpp +147 -0
- package/vendor/boost/math/include/boost/math/tools/minima.hpp +164 -0
- package/vendor/boost/math/include/boost/math/tools/mp.hpp +423 -0
- package/vendor/boost/math/include/boost/math/tools/norms.hpp +638 -0
- package/vendor/boost/math/include/boost/math/tools/nothrow.hpp +27 -0
- package/vendor/boost/math/include/boost/math/tools/numeric_limits.hpp +888 -0
- package/vendor/boost/math/include/boost/math/tools/numerical_differentiation.hpp +12 -0
- package/vendor/boost/math/include/boost/math/tools/polynomial.hpp +862 -0
- package/vendor/boost/math/include/boost/math/tools/polynomial_gcd.hpp +268 -0
- package/vendor/boost/math/include/boost/math/tools/precision.hpp +418 -0
- package/vendor/boost/math/include/boost/math/tools/promotion.hpp +135 -0
- package/vendor/boost/math/include/boost/math/tools/quartic_roots.hpp +157 -0
- package/vendor/boost/math/include/boost/math/tools/random_vector.hpp +101 -0
- package/vendor/boost/math/include/boost/math/tools/rational.hpp +346 -0
- package/vendor/boost/math/include/boost/math/tools/real_cast.hpp +31 -0
- package/vendor/boost/math/include/boost/math/tools/recurrence.hpp +330 -0
- package/vendor/boost/math/include/boost/math/tools/roots.hpp +1072 -0
- package/vendor/boost/math/include/boost/math/tools/series.hpp +221 -0
- package/vendor/boost/math/include/boost/math/tools/signal_statistics.hpp +353 -0
- package/vendor/boost/math/include/boost/math/tools/simple_continued_fraction.hpp +177 -0
- package/vendor/boost/math/include/boost/math/tools/stats.hpp +87 -0
- package/vendor/boost/math/include/boost/math/tools/test_value.hpp +143 -0
- package/vendor/boost/math/include/boost/math/tools/throw_exception.hpp +43 -0
- package/vendor/boost/math/include/boost/math/tools/toms748_solve.hpp +636 -0
- package/vendor/boost/math/include/boost/math/tools/traits.hpp +140 -0
- package/vendor/boost/math/include/boost/math/tools/tuple.hpp +88 -0
- package/vendor/boost/math/include/boost/math/tools/type_traits.hpp +489 -0
- package/vendor/boost/math/include/boost/math/tools/ulps_plot.hpp +598 -0
- package/vendor/boost/math/include/boost/math/tools/univariate_statistics.hpp +437 -0
- package/vendor/boost/math/include/boost/math/tools/user.hpp +105 -0
- package/vendor/boost/math/include/boost/math/tools/utility.hpp +69 -0
- package/vendor/boost/math/include/boost/math/tools/workaround.hpp +42 -0
- package/vendor/boost/math/include/boost/math/tr1.hpp +1121 -0
- package/vendor/boost/math/include/boost/math/tr1_c_macros.ipp +810 -0
- package/vendor/boost/math/include/boost/math_fwd.hpp +42 -0
- package/vendor/boost/multiprecision/LICENSE +23 -0
- package/vendor/boost/multiprecision/README.md +168 -0
- package/vendor/boost/multiprecision/include/boost/config/abi/borland_prefix.hpp +27 -0
- package/vendor/boost/multiprecision/include/boost/config/abi/borland_suffix.hpp +12 -0
- package/vendor/boost/multiprecision/include/boost/config/abi/msvc_prefix.hpp +22 -0
- package/vendor/boost/multiprecision/include/boost/config/abi/msvc_suffix.hpp +8 -0
- package/vendor/boost/multiprecision/include/boost/config/abi_prefix.hpp +25 -0
- package/vendor/boost/multiprecision/include/boost/config/abi_suffix.hpp +25 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx03.hpp +211 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx11.hpp +212 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx14.hpp +47 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx17.hpp +65 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx20.hpp +59 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx23.hpp +41 -0
- package/vendor/boost/multiprecision/include/boost/config/assert_cxx98.hpp +23 -0
- package/vendor/boost/multiprecision/include/boost/config/auto_link.hpp +530 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/borland.hpp +342 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/clang.hpp +370 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/clang_version.hpp +98 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/codegear.hpp +389 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/comeau.hpp +59 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/common_edg.hpp +185 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/compaq_cxx.hpp +19 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/cray.hpp +446 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/diab.hpp +26 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/digitalmars.hpp +146 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/gcc.hpp +386 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/gcc_xml.hpp +115 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/greenhills.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/hp_acc.hpp +153 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/intel.hpp +577 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/kai.hpp +33 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/metrowerks.hpp +201 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/mpw.hpp +143 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/nvcc.hpp +64 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/pathscale.hpp +141 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/pgi.hpp +23 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/sgi_mipspro.hpp +29 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/sunpro_cc.hpp +225 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/vacpp.hpp +189 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/visualc.hpp +400 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/xlcpp.hpp +303 -0
- package/vendor/boost/multiprecision/include/boost/config/compiler/xlcpp_zos.hpp +174 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/cxx_composite.hpp +218 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/posix_features.hpp +95 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/select_compiler_config.hpp +157 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/select_platform_config.hpp +147 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/select_stdlib_config.hpp +121 -0
- package/vendor/boost/multiprecision/include/boost/config/detail/suffix.hpp +1334 -0
- package/vendor/boost/multiprecision/include/boost/config/header_deprecated.hpp +26 -0
- package/vendor/boost/multiprecision/include/boost/config/helper_macros.hpp +37 -0
- package/vendor/boost/multiprecision/include/boost/config/no_tr1/cmath.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/no_tr1/complex.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/no_tr1/functional.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/no_tr1/memory.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/no_tr1/utility.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/aix.hpp +33 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/amigaos.hpp +15 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/beos.hpp +26 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/bsd.hpp +83 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/cloudabi.hpp +18 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/cray.hpp +18 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/cygwin.hpp +71 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/haiku.hpp +31 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/hpux.hpp +87 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/irix.hpp +31 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/linux.hpp +106 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/macos.hpp +87 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/qnxnto.hpp +31 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/solaris.hpp +31 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/symbian.hpp +97 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/vms.hpp +25 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/vxworks.hpp +422 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/wasm.hpp +23 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/win32.hpp +90 -0
- package/vendor/boost/multiprecision/include/boost/config/platform/zos.hpp +32 -0
- package/vendor/boost/multiprecision/include/boost/config/pragma_message.hpp +31 -0
- package/vendor/boost/multiprecision/include/boost/config/requires_threads.hpp +92 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/dinkumware.hpp +324 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/libcomo.hpp +93 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/libcpp.hpp +185 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/libstdcpp3.hpp +482 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/modena.hpp +79 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/msl.hpp +98 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/roguewave.hpp +208 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/sgi.hpp +168 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/stlport.hpp +258 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/vacpp.hpp +74 -0
- package/vendor/boost/multiprecision/include/boost/config/stdlib/xlcpp_zos.hpp +61 -0
- package/vendor/boost/multiprecision/include/boost/config/user.hpp +133 -0
- package/vendor/boost/multiprecision/include/boost/config/warning_disable.hpp +47 -0
- package/vendor/boost/multiprecision/include/boost/config/workaround.hpp +310 -0
- package/vendor/boost/multiprecision/include/boost/config.hpp +67 -0
- package/vendor/boost/multiprecision/include/boost/cstdint.hpp +556 -0
- package/vendor/boost/multiprecision/include/boost/cxx11_char_types.hpp +70 -0
- package/vendor/boost/multiprecision/include/boost/detail/workaround.hpp +10 -0
- package/vendor/boost/multiprecision/include/boost/limits.hpp +146 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/complex128.hpp +24 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/complex_adaptor.hpp +1049 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/concepts/mp_number_archetypes.hpp +257 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_bin_float/io.hpp +700 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_bin_float/transcendental.hpp +157 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_bin_float.hpp +2374 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_complex.hpp +12 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_dec_float.hpp +3807 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail.hpp +177 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath.hpp +25 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_fabs.hpp +27 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_floor.hpp +116 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_fma.hpp +65 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_fpclassify.hpp +52 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_frexp.hpp +93 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_isinf.hpp +24 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_isnan.hpp +21 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_ldexp.hpp +71 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_limits.hpp +218 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_log.hpp +172 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_ccmath_sqrt.hpp +57 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail_constants.hpp +80 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_double_fp.hpp +2690 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/add.hpp +368 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/add_unsigned.hpp +387 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/bitwise.hpp +896 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/checked.hpp +178 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/comparison.hpp +374 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/cpp_int_config.hpp +161 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/divide.hpp +703 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/import_export.hpp +248 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/intel_intrinsics.hpp +138 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/limits.hpp +292 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/literals.hpp +296 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/misc.hpp +1462 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/multiply.hpp +848 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/serialize.hpp +209 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int/value_pack.hpp +42 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/cpp_int.hpp +2360 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/debug_adaptor.hpp +760 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/assert.hpp +29 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/atomic.hpp +62 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/bitscan.hpp +317 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/check_cpp11_config.hpp +64 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/constexpr.hpp +88 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/default_ops.hpp +4077 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/digits.hpp +49 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/dynamic_array.hpp +44 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/empty_value.hpp +87 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/endian.hpp +35 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/et_ops.hpp +1831 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/float128_functions.hpp +95 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/float_string_cvt.hpp +333 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/fpclassify.hpp +101 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/constants.hpp +289 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/pow.hpp +941 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/trig.hpp +1064 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/functions/trunc.hpp +82 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/generic_interconvert.hpp +687 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/hash.hpp +56 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/integer_ops.hpp +474 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/itos.hpp +39 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/min_max.hpp +106 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/no_et_ops.hpp +661 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/no_exceptions_support.hpp +55 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/number_base.hpp +1656 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/number_compare.hpp +848 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/precision.hpp +313 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/rebind.hpp +19 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/standalone_config.hpp +165 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/static_array.hpp +42 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/string_helpers.hpp +48 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/tables.hpp +80 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/ublas_interop.hpp +75 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/uniform_int_distribution.hpp +212 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/detail/utype_helper.hpp +374 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/eigen.hpp +248 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/float128.hpp +960 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/fwd.hpp +268 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/gmp.hpp +4100 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/integer.hpp +363 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/logged_adaptor.hpp +834 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/miller_rabin.hpp +221 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/mpc.hpp +1721 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/mpfi.hpp +2579 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/mpfr.hpp +3668 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/number.hpp +2491 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/random.hpp +23 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/rational_adaptor.hpp +1289 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/tommath.hpp +1044 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/explicit_conversion.hpp +67 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/extract_exponent_type.hpp +28 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_backend.hpp +91 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_byte_container.hpp +51 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_complex.hpp +22 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_convertible_arithmetic.hpp +51 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_restricted_conversion.hpp +47 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/is_variable_precision.hpp +25 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/max_digits10.hpp +79 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/std_integer_traits.hpp +95 -0
- package/vendor/boost/multiprecision/include/boost/multiprecision/traits/transcendental_reduction_type.hpp +21 -0
- package/vendor/boost/multiprecision/include/boost/static_assert.hpp +179 -0
- package/vendor/boost/multiprecision/include/boost/version.hpp +32 -0
- package/vendor/eigen/COPYING.APACHE +203 -0
- package/vendor/eigen/COPYING.BSD +26 -0
- package/vendor/eigen/COPYING.MPL2 +373 -0
- package/vendor/eigen/COPYING.README +6 -0
- package/vendor/eigen/Eigen/AccelerateSupport +52 -0
- package/vendor/eigen/Eigen/Cholesky +43 -0
- package/vendor/eigen/Eigen/CholmodSupport +48 -0
- package/vendor/eigen/Eigen/Core +451 -0
- package/vendor/eigen/Eigen/Dense +7 -0
- package/vendor/eigen/Eigen/Eigen +2 -0
- package/vendor/eigen/Eigen/Eigenvalues +63 -0
- package/vendor/eigen/Eigen/Geometry +59 -0
- package/vendor/eigen/Eigen/Householder +31 -0
- package/vendor/eigen/Eigen/IterativeLinearSolvers +52 -0
- package/vendor/eigen/Eigen/Jacobi +33 -0
- package/vendor/eigen/Eigen/KLUSupport +43 -0
- package/vendor/eigen/Eigen/LU +46 -0
- package/vendor/eigen/Eigen/MetisSupport +35 -0
- package/vendor/eigen/Eigen/OrderingMethods +73 -0
- package/vendor/eigen/Eigen/PaStiXSupport +51 -0
- package/vendor/eigen/Eigen/PardisoSupport +38 -0
- package/vendor/eigen/Eigen/QR +48 -0
- package/vendor/eigen/Eigen/QtAlignedMalloc +32 -0
- package/vendor/eigen/Eigen/SPQRSupport +41 -0
- package/vendor/eigen/Eigen/SVD +56 -0
- package/vendor/eigen/Eigen/Sparse +33 -0
- package/vendor/eigen/Eigen/SparseCholesky +40 -0
- package/vendor/eigen/Eigen/SparseCore +70 -0
- package/vendor/eigen/Eigen/SparseLU +50 -0
- package/vendor/eigen/Eigen/SparseQR +38 -0
- package/vendor/eigen/Eigen/StdDeque +30 -0
- package/vendor/eigen/Eigen/StdList +29 -0
- package/vendor/eigen/Eigen/StdVector +30 -0
- package/vendor/eigen/Eigen/SuperLUSupport +70 -0
- package/vendor/eigen/Eigen/ThreadPool +80 -0
- package/vendor/eigen/Eigen/UmfPackSupport +42 -0
- package/vendor/eigen/Eigen/Version +14 -0
- package/vendor/eigen/Eigen/src/AccelerateSupport/AccelerateSupport.h +423 -0
- package/vendor/eigen/Eigen/src/AccelerateSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Cholesky/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Cholesky/LDLT.h +649 -0
- package/vendor/eigen/Eigen/src/Cholesky/LLT.h +514 -0
- package/vendor/eigen/Eigen/src/Cholesky/LLT_LAPACKE.h +124 -0
- package/vendor/eigen/Eigen/src/CholmodSupport/CholmodSupport.h +738 -0
- package/vendor/eigen/Eigen/src/CholmodSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Core/ArithmeticSequence.h +239 -0
- package/vendor/eigen/Eigen/src/Core/Array.h +376 -0
- package/vendor/eigen/Eigen/src/Core/ArrayBase.h +213 -0
- package/vendor/eigen/Eigen/src/Core/ArrayWrapper.h +165 -0
- package/vendor/eigen/Eigen/src/Core/Assign.h +80 -0
- package/vendor/eigen/Eigen/src/Core/AssignEvaluator.h +1057 -0
- package/vendor/eigen/Eigen/src/Core/Assign_MKL.h +183 -0
- package/vendor/eigen/Eigen/src/Core/BandMatrix.h +338 -0
- package/vendor/eigen/Eigen/src/Core/Block.h +429 -0
- package/vendor/eigen/Eigen/src/Core/CommaInitializer.h +149 -0
- package/vendor/eigen/Eigen/src/Core/ConditionEstimator.h +173 -0
- package/vendor/eigen/Eigen/src/Core/CoreEvaluators.h +2018 -0
- package/vendor/eigen/Eigen/src/Core/CoreIterators.h +141 -0
- package/vendor/eigen/Eigen/src/Core/CwiseBinaryOp.h +166 -0
- package/vendor/eigen/Eigen/src/Core/CwiseNullaryOp.h +975 -0
- package/vendor/eigen/Eigen/src/Core/CwiseTernaryOp.h +171 -0
- package/vendor/eigen/Eigen/src/Core/CwiseUnaryOp.h +91 -0
- package/vendor/eigen/Eigen/src/Core/CwiseUnaryView.h +167 -0
- package/vendor/eigen/Eigen/src/Core/DenseBase.h +673 -0
- package/vendor/eigen/Eigen/src/Core/DenseCoeffsBase.h +568 -0
- package/vendor/eigen/Eigen/src/Core/DenseStorage.h +573 -0
- package/vendor/eigen/Eigen/src/Core/DeviceWrapper.h +153 -0
- package/vendor/eigen/Eigen/src/Core/Diagonal.h +219 -0
- package/vendor/eigen/Eigen/src/Core/DiagonalMatrix.h +420 -0
- package/vendor/eigen/Eigen/src/Core/DiagonalProduct.h +30 -0
- package/vendor/eigen/Eigen/src/Core/Dot.h +268 -0
- package/vendor/eigen/Eigen/src/Core/EigenBase.h +149 -0
- package/vendor/eigen/Eigen/src/Core/Fill.h +138 -0
- package/vendor/eigen/Eigen/src/Core/FindCoeff.h +464 -0
- package/vendor/eigen/Eigen/src/Core/ForceAlignedAccess.h +127 -0
- package/vendor/eigen/Eigen/src/Core/Fuzzy.h +132 -0
- package/vendor/eigen/Eigen/src/Core/GeneralProduct.h +519 -0
- package/vendor/eigen/Eigen/src/Core/GenericPacketMath.h +1702 -0
- package/vendor/eigen/Eigen/src/Core/GlobalFunctions.h +230 -0
- package/vendor/eigen/Eigen/src/Core/IO.h +233 -0
- package/vendor/eigen/Eigen/src/Core/IndexedView.h +321 -0
- package/vendor/eigen/Eigen/src/Core/InnerProduct.h +260 -0
- package/vendor/eigen/Eigen/src/Core/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Core/Inverse.h +108 -0
- package/vendor/eigen/Eigen/src/Core/Map.h +153 -0
- package/vendor/eigen/Eigen/src/Core/MapBase.h +283 -0
- package/vendor/eigen/Eigen/src/Core/MathFunctions.h +2103 -0
- package/vendor/eigen/Eigen/src/Core/MathFunctionsImpl.h +263 -0
- package/vendor/eigen/Eigen/src/Core/Matrix.h +534 -0
- package/vendor/eigen/Eigen/src/Core/MatrixBase.h +545 -0
- package/vendor/eigen/Eigen/src/Core/NestByValue.h +91 -0
- package/vendor/eigen/Eigen/src/Core/NoAlias.h +102 -0
- package/vendor/eigen/Eigen/src/Core/NumTraits.h +335 -0
- package/vendor/eigen/Eigen/src/Core/PartialReduxEvaluator.h +253 -0
- package/vendor/eigen/Eigen/src/Core/PermutationMatrix.h +555 -0
- package/vendor/eigen/Eigen/src/Core/PlainObjectBase.h +1014 -0
- package/vendor/eigen/Eigen/src/Core/Product.h +307 -0
- package/vendor/eigen/Eigen/src/Core/ProductEvaluators.h +1287 -0
- package/vendor/eigen/Eigen/src/Core/Random.h +207 -0
- package/vendor/eigen/Eigen/src/Core/RandomImpl.h +262 -0
- package/vendor/eigen/Eigen/src/Core/RealView.h +250 -0
- package/vendor/eigen/Eigen/src/Core/Redux.h +535 -0
- package/vendor/eigen/Eigen/src/Core/Ref.h +383 -0
- package/vendor/eigen/Eigen/src/Core/Replicate.h +130 -0
- package/vendor/eigen/Eigen/src/Core/Reshaped.h +398 -0
- package/vendor/eigen/Eigen/src/Core/ReturnByValue.h +111 -0
- package/vendor/eigen/Eigen/src/Core/Reverse.h +202 -0
- package/vendor/eigen/Eigen/src/Core/Select.h +92 -0
- package/vendor/eigen/Eigen/src/Core/SelfAdjointView.h +329 -0
- package/vendor/eigen/Eigen/src/Core/SelfCwiseBinaryOp.h +50 -0
- package/vendor/eigen/Eigen/src/Core/SkewSymmetricMatrix3.h +382 -0
- package/vendor/eigen/Eigen/src/Core/Solve.h +174 -0
- package/vendor/eigen/Eigen/src/Core/SolveTriangular.h +237 -0
- package/vendor/eigen/Eigen/src/Core/SolverBase.h +167 -0
- package/vendor/eigen/Eigen/src/Core/StableNorm.h +217 -0
- package/vendor/eigen/Eigen/src/Core/StlIterators.h +619 -0
- package/vendor/eigen/Eigen/src/Core/Stride.h +114 -0
- package/vendor/eigen/Eigen/src/Core/Swap.h +99 -0
- package/vendor/eigen/Eigen/src/Core/Transpose.h +427 -0
- package/vendor/eigen/Eigen/src/Core/Transpositions.h +323 -0
- package/vendor/eigen/Eigen/src/Core/TriangularMatrix.h +900 -0
- package/vendor/eigen/Eigen/src/Core/VectorBlock.h +83 -0
- package/vendor/eigen/Eigen/src/Core/VectorwiseOp.h +733 -0
- package/vendor/eigen/Eigen/src/Core/Visitor.h +537 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX/Complex.h +565 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX/MathFunctions.h +130 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX/PacketMath.h +3081 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX/Reductions.h +353 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h +308 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/Complex.h +472 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/GemmKernel.h +1245 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctions.h +141 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/MathFunctionsFP16.h +75 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMath.h +3146 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/PacketMathFP16.h +1413 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/Reductions.h +297 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/TrsmKernel.h +1167 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/TrsmUnrolls.inc +1219 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/TypeCasting.h +277 -0
- package/vendor/eigen/Eigen/src/Core/arch/AVX512/TypeCastingFP16.h +130 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/Complex.h +653 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MathFunctions.h +81 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProduct.h +3686 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductCommon.h +205 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMA.h +901 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixProductMMAbfloat16.h +742 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/MatrixVectorProduct.inc +2818 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/PacketMath.h +3729 -0
- package/vendor/eigen/Eigen/src/Core/arch/AltiVec/TypeCasting.h +153 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/BFloat16.h +866 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/ConjHelper.h +128 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +2634 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/GenericPacketMathFunctionsFwd.h +227 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/Half.h +1091 -0
- package/vendor/eigen/Eigen/src/Core/arch/Default/Settings.h +47 -0
- package/vendor/eigen/Eigen/src/Core/arch/GPU/Complex.h +244 -0
- package/vendor/eigen/Eigen/src/Core/arch/GPU/MathFunctions.h +104 -0
- package/vendor/eigen/Eigen/src/Core/arch/GPU/PacketMath.h +1712 -0
- package/vendor/eigen/Eigen/src/Core/arch/GPU/Tuple.h +268 -0
- package/vendor/eigen/Eigen/src/Core/arch/GPU/TypeCasting.h +77 -0
- package/vendor/eigen/Eigen/src/Core/arch/HIP/hcc/math_constants.h +23 -0
- package/vendor/eigen/Eigen/src/Core/arch/HVX/PacketMath.h +1088 -0
- package/vendor/eigen/Eigen/src/Core/arch/LSX/Complex.h +520 -0
- package/vendor/eigen/Eigen/src/Core/arch/LSX/GeneralBlockPanelKernel.h +23 -0
- package/vendor/eigen/Eigen/src/Core/arch/LSX/MathFunctions.h +43 -0
- package/vendor/eigen/Eigen/src/Core/arch/LSX/PacketMath.h +2866 -0
- package/vendor/eigen/Eigen/src/Core/arch/LSX/TypeCasting.h +526 -0
- package/vendor/eigen/Eigen/src/Core/arch/MSA/Complex.h +620 -0
- package/vendor/eigen/Eigen/src/Core/arch/MSA/MathFunctions.h +379 -0
- package/vendor/eigen/Eigen/src/Core/arch/MSA/PacketMath.h +1237 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/Complex.h +732 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/GeneralBlockPanelKernel.h +243 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/MathFunctions.h +68 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/PacketMath.h +6096 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/TypeCasting.h +1642 -0
- package/vendor/eigen/Eigen/src/Core/arch/NEON/UnaryFunctors.h +57 -0
- package/vendor/eigen/Eigen/src/Core/arch/SSE/Complex.h +503 -0
- package/vendor/eigen/Eigen/src/Core/arch/SSE/MathFunctions.h +88 -0
- package/vendor/eigen/Eigen/src/Core/arch/SSE/PacketMath.h +2384 -0
- package/vendor/eigen/Eigen/src/Core/arch/SSE/Reductions.h +324 -0
- package/vendor/eigen/Eigen/src/Core/arch/SSE/TypeCasting.h +230 -0
- package/vendor/eigen/Eigen/src/Core/arch/SVE/MathFunctions.h +48 -0
- package/vendor/eigen/Eigen/src/Core/arch/SVE/PacketMath.h +674 -0
- package/vendor/eigen/Eigen/src/Core/arch/SVE/TypeCasting.h +52 -0
- package/vendor/eigen/Eigen/src/Core/arch/SYCL/InteropHeaders.h +227 -0
- package/vendor/eigen/Eigen/src/Core/arch/SYCL/MathFunctions.h +303 -0
- package/vendor/eigen/Eigen/src/Core/arch/SYCL/PacketMath.h +576 -0
- package/vendor/eigen/Eigen/src/Core/arch/SYCL/TypeCasting.h +83 -0
- package/vendor/eigen/Eigen/src/Core/arch/ZVector/Complex.h +570 -0
- package/vendor/eigen/Eigen/src/Core/arch/ZVector/MathFunctions.h +244 -0
- package/vendor/eigen/Eigen/src/Core/arch/ZVector/PacketMath.h +1413 -0
- package/vendor/eigen/Eigen/src/Core/functors/AssignmentFunctors.h +174 -0
- package/vendor/eigen/Eigen/src/Core/functors/BinaryFunctors.h +747 -0
- package/vendor/eigen/Eigen/src/Core/functors/NullaryFunctors.h +274 -0
- package/vendor/eigen/Eigen/src/Core/functors/StlFunctors.h +149 -0
- package/vendor/eigen/Eigen/src/Core/functors/TernaryFunctors.h +52 -0
- package/vendor/eigen/Eigen/src/Core/functors/UnaryFunctors.h +1420 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralBlockPanelKernel.h +3153 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix.h +459 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h +330 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h +148 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h +205 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector.h +473 -0
- package/vendor/eigen/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h +139 -0
- package/vendor/eigen/Eigen/src/Core/products/Parallelizer.h +282 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix.h +483 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h +277 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector.h +253 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h +115 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointProduct.h +133 -0
- package/vendor/eigen/Eigen/src/Core/products/SelfadjointRank2Update.h +95 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix.h +397 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h +325 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixVector.h +347 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h +275 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix.h +388 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h +166 -0
- package/vendor/eigen/Eigen/src/Core/products/TriangularSolverVector.h +122 -0
- package/vendor/eigen/Eigen/src/Core/util/Assert.h +158 -0
- package/vendor/eigen/Eigen/src/Core/util/BlasUtil.h +622 -0
- package/vendor/eigen/Eigen/src/Core/util/ConfigureVectorization.h +543 -0
- package/vendor/eigen/Eigen/src/Core/util/Constants.h +598 -0
- package/vendor/eigen/Eigen/src/Core/util/DisableStupidWarnings.h +146 -0
- package/vendor/eigen/Eigen/src/Core/util/EmulateArray.h +270 -0
- package/vendor/eigen/Eigen/src/Core/util/ForwardDeclarations.h +524 -0
- package/vendor/eigen/Eigen/src/Core/util/GpuHipCudaDefines.inc +101 -0
- package/vendor/eigen/Eigen/src/Core/util/GpuHipCudaUndefines.inc +45 -0
- package/vendor/eigen/Eigen/src/Core/util/IndexedViewHelper.h +487 -0
- package/vendor/eigen/Eigen/src/Core/util/IntegralConstant.h +279 -0
- package/vendor/eigen/Eigen/src/Core/util/MKL_support.h +139 -0
- package/vendor/eigen/Eigen/src/Core/util/Macros.h +1346 -0
- package/vendor/eigen/Eigen/src/Core/util/MaxSizeVector.h +139 -0
- package/vendor/eigen/Eigen/src/Core/util/Memory.h +1385 -0
- package/vendor/eigen/Eigen/src/Core/util/Meta.h +760 -0
- package/vendor/eigen/Eigen/src/Core/util/MoreMeta.h +638 -0
- package/vendor/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h +44 -0
- package/vendor/eigen/Eigen/src/Core/util/ReshapedHelper.h +51 -0
- package/vendor/eigen/Eigen/src/Core/util/Serializer.h +209 -0
- package/vendor/eigen/Eigen/src/Core/util/StaticAssert.h +105 -0
- package/vendor/eigen/Eigen/src/Core/util/SymbolicIndex.h +445 -0
- package/vendor/eigen/Eigen/src/Core/util/XprHelper.h +1093 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/ComplexEigenSolver.h +315 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur.h +442 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h +95 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/EigenSolver.h +579 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h +402 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h +212 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/HessenbergDecomposition.h +356 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h +142 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/RealQZ.h +587 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/RealSchur.h +519 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h +83 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +850 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h +90 -0
- package/vendor/eigen/Eigen/src/Eigenvalues/Tridiagonalization.h +529 -0
- package/vendor/eigen/Eigen/src/Geometry/AlignedBox.h +485 -0
- package/vendor/eigen/Eigen/src/Geometry/AngleAxis.h +245 -0
- package/vendor/eigen/Eigen/src/Geometry/EulerAngles.h +203 -0
- package/vendor/eigen/Eigen/src/Geometry/Homogeneous.h +453 -0
- package/vendor/eigen/Eigen/src/Geometry/Hyperplane.h +273 -0
- package/vendor/eigen/Eigen/src/Geometry/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Geometry/OrthoMethods.h +257 -0
- package/vendor/eigen/Eigen/src/Geometry/ParametrizedLine.h +232 -0
- package/vendor/eigen/Eigen/src/Geometry/Quaternion.h +930 -0
- package/vendor/eigen/Eigen/src/Geometry/Rotation2D.h +201 -0
- package/vendor/eigen/Eigen/src/Geometry/RotationBase.h +209 -0
- package/vendor/eigen/Eigen/src/Geometry/Scaling.h +195 -0
- package/vendor/eigen/Eigen/src/Geometry/Transform.h +1485 -0
- package/vendor/eigen/Eigen/src/Geometry/Translation.h +204 -0
- package/vendor/eigen/Eigen/src/Geometry/Umeyama.h +161 -0
- package/vendor/eigen/Eigen/src/Geometry/arch/Geometry_SIMD.h +154 -0
- package/vendor/eigen/Eigen/src/Householder/BlockHouseholder.h +115 -0
- package/vendor/eigen/Eigen/src/Householder/Householder.h +154 -0
- package/vendor/eigen/Eigen/src/Householder/HouseholderSequence.h +504 -0
- package/vendor/eigen/Eigen/src/Householder/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +213 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h +220 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +217 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h +402 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h +449 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +395 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h +193 -0
- package/vendor/eigen/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h +111 -0
- package/vendor/eigen/Eigen/src/Jacobi/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/Jacobi/Jacobi.h +427 -0
- package/vendor/eigen/Eigen/src/KLUSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/KLUSupport/KLUSupport.h +339 -0
- package/vendor/eigen/Eigen/src/LU/Determinant.h +98 -0
- package/vendor/eigen/Eigen/src/LU/FullPivLU.h +826 -0
- package/vendor/eigen/Eigen/src/LU/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/LU/InverseImpl.h +353 -0
- package/vendor/eigen/Eigen/src/LU/PartialPivLU.h +586 -0
- package/vendor/eigen/Eigen/src/LU/PartialPivLU_LAPACKE.h +97 -0
- package/vendor/eigen/Eigen/src/LU/arch/InverseSize4.h +353 -0
- package/vendor/eigen/Eigen/src/MetisSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/MetisSupport/MetisSupport.h +125 -0
- package/vendor/eigen/Eigen/src/OrderingMethods/Amd.h +413 -0
- package/vendor/eigen/Eigen/src/OrderingMethods/Eigen_Colamd.h +1690 -0
- package/vendor/eigen/Eigen/src/OrderingMethods/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/OrderingMethods/Ordering.h +146 -0
- package/vendor/eigen/Eigen/src/PaStiXSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/PaStiXSupport/PaStiXSupport.h +632 -0
- package/vendor/eigen/Eigen/src/PardisoSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/PardisoSupport/PardisoSupport.h +500 -0
- package/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR.h +674 -0
- package/vendor/eigen/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h +161 -0
- package/vendor/eigen/Eigen/src/QR/CompleteOrthogonalDecomposition.h +648 -0
- package/vendor/eigen/Eigen/src/QR/FullPivHouseholderQR.h +733 -0
- package/vendor/eigen/Eigen/src/QR/HouseholderQR.h +543 -0
- package/vendor/eigen/Eigen/src/QR/HouseholderQR_LAPACKE.h +77 -0
- package/vendor/eigen/Eigen/src/QR/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SPQRSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h +315 -0
- package/vendor/eigen/Eigen/src/SVD/BDCSVD.h +1470 -0
- package/vendor/eigen/Eigen/src/SVD/BDCSVD_LAPACKE.h +174 -0
- package/vendor/eigen/Eigen/src/SVD/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SVD/JacobiSVD.h +846 -0
- package/vendor/eigen/Eigen/src/SVD/JacobiSVD_LAPACKE.h +127 -0
- package/vendor/eigen/Eigen/src/SVD/SVDBase.h +436 -0
- package/vendor/eigen/Eigen/src/SVD/UpperBidiagonalization.h +379 -0
- package/vendor/eigen/Eigen/src/SparseCholesky/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky.h +868 -0
- package/vendor/eigen/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h +388 -0
- package/vendor/eigen/Eigen/src/SparseCore/AmbiVector.h +329 -0
- package/vendor/eigen/Eigen/src/SparseCore/CompressedStorage.h +206 -0
- package/vendor/eigen/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h +308 -0
- package/vendor/eigen/Eigen/src/SparseCore/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseAssign.h +279 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseBlock.h +534 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseColEtree.h +194 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseCompressedBase.h +592 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseCwiseBinaryOp.h +938 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseCwiseUnaryOp.h +142 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseDenseProduct.h +314 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseDiagonalProduct.h +138 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseDot.h +100 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseFuzzy.h +31 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseMap.h +295 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseMatrix.h +1876 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseMatrixBase.h +451 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparsePermutation.h +249 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseProduct.h +178 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseRedux.h +47 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseRef.h +370 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseSelfAdjointView.h +613 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseSolverBase.h +115 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseSparseProductWithPruning.h +184 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseTranspose.h +83 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseTriangularView.h +177 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseUtil.h +209 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseVector.h +532 -0
- package/vendor/eigen/Eigen/src/SparseCore/SparseView.h +225 -0
- package/vendor/eigen/Eigen/src/SparseCore/TriangularSolver.h +274 -0
- package/vendor/eigen/Eigen/src/SparseLU/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU.h +969 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLUImpl.h +79 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_Memory.h +210 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_Structs.h +113 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h +319 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_Utils.h +75 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_bmod.h +177 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_column_dfs.h +168 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h +106 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h +114 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_kernel_bmod.h +133 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_bmod.h +215 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_panel_dfs.h +235 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_pivotL.h +136 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_pruneL.h +130 -0
- package/vendor/eigen/Eigen/src/SparseLU/SparseLU_relax_snode.h +81 -0
- package/vendor/eigen/Eigen/src/SparseQR/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SparseQR/SparseQR.h +706 -0
- package/vendor/eigen/Eigen/src/StlSupport/StdDeque.h +51 -0
- package/vendor/eigen/Eigen/src/StlSupport/StdList.h +50 -0
- package/vendor/eigen/Eigen/src/StlSupport/StdVector.h +51 -0
- package/vendor/eigen/Eigen/src/StlSupport/details.h +82 -0
- package/vendor/eigen/Eigen/src/SuperLUSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/SuperLUSupport/SuperLUSupport.h +929 -0
- package/vendor/eigen/Eigen/src/ThreadPool/Barrier.h +70 -0
- package/vendor/eigen/Eigen/src/ThreadPool/CoreThreadPoolDevice.h +336 -0
- package/vendor/eigen/Eigen/src/ThreadPool/EventCount.h +241 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ForkJoin.h +140 -0
- package/vendor/eigen/Eigen/src/ThreadPool/InternalHeaderCheck.h +4 -0
- package/vendor/eigen/Eigen/src/ThreadPool/NonBlockingThreadPool.h +587 -0
- package/vendor/eigen/Eigen/src/ThreadPool/RunQueue.h +230 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ThreadCancel.h +21 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ThreadEnvironment.h +43 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ThreadLocal.h +289 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ThreadPoolInterface.h +50 -0
- package/vendor/eigen/Eigen/src/ThreadPool/ThreadYield.h +16 -0
- package/vendor/eigen/Eigen/src/UmfPackSupport/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/UmfPackSupport/UmfPackSupport.h +606 -0
- package/vendor/eigen/Eigen/src/misc/Image.h +80 -0
- package/vendor/eigen/Eigen/src/misc/InternalHeaderCheck.h +3 -0
- package/vendor/eigen/Eigen/src/misc/Kernel.h +77 -0
- package/vendor/eigen/Eigen/src/misc/RealSvd2x2.h +53 -0
- package/vendor/eigen/Eigen/src/misc/blas.h +97 -0
- package/vendor/eigen/Eigen/src/misc/lapacke.h +10085 -0
- package/vendor/eigen/Eigen/src/misc/lapacke_helpers.h +163 -0
- package/vendor/eigen/Eigen/src/misc/lapacke_mangling.h +16 -0
- package/vendor/eigen/Eigen/src/plugins/ArrayCwiseBinaryOps.inc +344 -0
- package/vendor/eigen/Eigen/src/plugins/ArrayCwiseUnaryOps.inc +544 -0
- package/vendor/eigen/Eigen/src/plugins/BlockMethods.inc +1370 -0
- package/vendor/eigen/Eigen/src/plugins/CommonCwiseBinaryOps.inc +116 -0
- package/vendor/eigen/Eigen/src/plugins/CommonCwiseUnaryOps.inc +167 -0
- package/vendor/eigen/Eigen/src/plugins/IndexedViewMethods.inc +192 -0
- package/vendor/eigen/Eigen/src/plugins/InternalHeaderCheck.inc +3 -0
- package/vendor/eigen/Eigen/src/plugins/MatrixCwiseBinaryOps.inc +331 -0
- package/vendor/eigen/Eigen/src/plugins/MatrixCwiseUnaryOps.inc +118 -0
- package/vendor/eigen/Eigen/src/plugins/ReshapedMethods.inc +133 -0
- package/vendor/eigen/README.md +5 -0
- package/vendor/mpdecimal/COPYRIGHT.txt +23 -0
- package/vendor/mpdecimal/README.txt +53 -0
- package/vendor/mpdecimal/libmpdec/.objs/README.txt +8 -0
- package/vendor/mpdecimal/libmpdec/.objs/symbols32.exp +343 -0
- package/vendor/mpdecimal/libmpdec/.objs/symbols64.exp +347 -0
- package/vendor/mpdecimal/libmpdec/.pc/libmpdec.pc.in +11 -0
- package/vendor/mpdecimal/libmpdec/.profile/train.sh +35 -0
- package/vendor/mpdecimal/libmpdec/README.txt +84 -0
- package/vendor/mpdecimal/libmpdec/basearith.c +649 -0
- package/vendor/mpdecimal/libmpdec/basearith.h +217 -0
- package/vendor/mpdecimal/libmpdec/bits.h +188 -0
- package/vendor/mpdecimal/libmpdec/constants.c +129 -0
- package/vendor/mpdecimal/libmpdec/constants.h +88 -0
- package/vendor/mpdecimal/libmpdec/context.c +285 -0
- package/vendor/mpdecimal/libmpdec/convolute.c +172 -0
- package/vendor/mpdecimal/libmpdec/convolute.h +48 -0
- package/vendor/mpdecimal/libmpdec/crt.c +178 -0
- package/vendor/mpdecimal/libmpdec/crt.h +45 -0
- package/vendor/mpdecimal/libmpdec/difradix2.c +171 -0
- package/vendor/mpdecimal/libmpdec/difradix2.h +46 -0
- package/vendor/mpdecimal/libmpdec/fnt.c +77 -0
- package/vendor/mpdecimal/libmpdec/fnt.h +46 -0
- package/vendor/mpdecimal/libmpdec/fourstep.c +242 -0
- package/vendor/mpdecimal/libmpdec/fourstep.h +46 -0
- package/vendor/mpdecimal/libmpdec/io.c +1610 -0
- package/vendor/mpdecimal/libmpdec/io.h +61 -0
- package/vendor/mpdecimal/libmpdec/mpalloc.c +347 -0
- package/vendor/mpdecimal/libmpdec/mpalloc.h +53 -0
- package/vendor/mpdecimal/libmpdec/mpdecimal.c +9155 -0
- package/vendor/mpdecimal/libmpdec/mpdecimal.h.in +804 -0
- package/vendor/mpdecimal/libmpdec/mpsignal.c +966 -0
- package/vendor/mpdecimal/libmpdec/numbertheory.c +129 -0
- package/vendor/mpdecimal/libmpdec/numbertheory.h +75 -0
- package/vendor/mpdecimal/libmpdec/sixstep.c +212 -0
- package/vendor/mpdecimal/libmpdec/sixstep.h +46 -0
- package/vendor/mpdecimal/libmpdec/transpose.c +275 -0
- package/vendor/mpdecimal/libmpdec/transpose.h +60 -0
- package/vendor/mpdecimal/libmpdec/typearith.h +661 -0
- package/vendor/mpdecimal/libmpdec/umodarith.h +645 -0
- package/vendor/symengine/AUTHORS +101 -0
- package/vendor/symengine/LICENSE +254 -0
- package/vendor/symengine/README.md +199 -0
- package/vendor/symengine/symengine/add.cpp +508 -0
- package/vendor/symengine/symengine/add.h +187 -0
- package/vendor/symengine/symengine/as_real_imag.cpp +289 -0
- package/vendor/symengine/symengine/assumptions.cpp +202 -0
- package/vendor/symengine/symengine/assumptions.h +47 -0
- package/vendor/symengine/symengine/basic-inl.h +152 -0
- package/vendor/symengine/symengine/basic-methods.inc +9 -0
- package/vendor/symengine/symengine/basic.cpp +110 -0
- package/vendor/symengine/symengine/basic.h +356 -0
- package/vendor/symengine/symengine/complex.cpp +198 -0
- package/vendor/symengine/symengine/complex.h +396 -0
- package/vendor/symengine/symengine/complex_double.cpp +72 -0
- package/vendor/symengine/symengine/complex_double.h +570 -0
- package/vendor/symengine/symengine/complex_mpc.h +406 -0
- package/vendor/symengine/symengine/constants.cpp +130 -0
- package/vendor/symengine/symengine/constants.h +81 -0
- package/vendor/symengine/symengine/cse.cpp +556 -0
- package/vendor/symengine/symengine/cwrapper.h +949 -0
- package/vendor/symengine/symengine/dense_matrix.cpp +2100 -0
- package/vendor/symengine/symengine/derivative.cpp +841 -0
- package/vendor/symengine/symengine/derivative.h +137 -0
- package/vendor/symengine/symengine/dict.cpp +125 -0
- package/vendor/symengine/symengine/dict.h +333 -0
- package/vendor/symengine/symengine/diophantine.cpp +139 -0
- package/vendor/symengine/symengine/diophantine.h +20 -0
- package/vendor/symengine/symengine/eval.cpp +109 -0
- package/vendor/symengine/symengine/eval.h +40 -0
- package/vendor/symengine/symengine/eval_arb.h +31 -0
- package/vendor/symengine/symengine/eval_double.cpp +959 -0
- package/vendor/symengine/symengine/eval_double.h +28 -0
- package/vendor/symengine/symengine/eval_mpc.h +29 -0
- package/vendor/symengine/symengine/eval_mpfr.h +26 -0
- package/vendor/symengine/symengine/expand.cpp +379 -0
- package/vendor/symengine/symengine/expression.cpp +24 -0
- package/vendor/symengine/symengine/expression.h +375 -0
- package/vendor/symengine/symengine/fields.cpp +861 -0
- package/vendor/symengine/symengine/fields.h +647 -0
- package/vendor/symengine/symengine/finitediff.cpp +70 -0
- package/vendor/symengine/symengine/finitediff.h +21 -0
- package/vendor/symengine/symengine/flint_wrapper.h +1010 -0
- package/vendor/symengine/symengine/functions.cpp +3913 -0
- package/vendor/symengine/symengine/functions.h +1321 -0
- package/vendor/symengine/symengine/infinity.cpp +537 -0
- package/vendor/symengine/symengine/infinity.h +118 -0
- package/vendor/symengine/symengine/integer.cpp +153 -0
- package/vendor/symengine/symengine/integer.h +227 -0
- package/vendor/symengine/symengine/interruption.cpp +9 -0
- package/vendor/symengine/symengine/interruption.h +19 -0
- package/vendor/symengine/symengine/lambda_double.h +918 -0
- package/vendor/symengine/symengine/limits.h +35 -0
- package/vendor/symengine/symengine/llvm_double.h +201 -0
- package/vendor/symengine/symengine/logic.cpp +812 -0
- package/vendor/symengine/symengine/logic.h +281 -0
- package/vendor/symengine/symengine/matrices/conjugate_matrix.cpp +139 -0
- package/vendor/symengine/symengine/matrices/conjugate_matrix.h +39 -0
- package/vendor/symengine/symengine/matrices/diagonal_matrix.cpp +79 -0
- package/vendor/symengine/symengine/matrices/diagonal_matrix.h +52 -0
- package/vendor/symengine/symengine/matrices/hadamard_product.cpp +151 -0
- package/vendor/symengine/symengine/matrices/hadamard_product.h +42 -0
- package/vendor/symengine/symengine/matrices/identity_matrix.cpp +63 -0
- package/vendor/symengine/symengine/matrices/identity_matrix.h +40 -0
- package/vendor/symengine/symengine/matrices/immutable_dense_matrix.cpp +143 -0
- package/vendor/symengine/symengine/matrices/immutable_dense_matrix.h +65 -0
- package/vendor/symengine/symengine/matrices/is_diagonal.cpp +115 -0
- package/vendor/symengine/symengine/matrices/is_lower.cpp +110 -0
- package/vendor/symengine/symengine/matrices/is_real.cpp +78 -0
- package/vendor/symengine/symengine/matrices/is_square.cpp +85 -0
- package/vendor/symengine/symengine/matrices/is_symmetric.cpp +112 -0
- package/vendor/symengine/symengine/matrices/is_toeplitz.cpp +104 -0
- package/vendor/symengine/symengine/matrices/is_upper.cpp +108 -0
- package/vendor/symengine/symengine/matrices/is_zero.cpp +81 -0
- package/vendor/symengine/symengine/matrices/matrix_add.cpp +176 -0
- package/vendor/symengine/symengine/matrices/matrix_add.h +42 -0
- package/vendor/symengine/symengine/matrices/matrix_expr.h +19 -0
- package/vendor/symengine/symengine/matrices/matrix_mul.cpp +258 -0
- package/vendor/symengine/symengine/matrices/matrix_mul.h +55 -0
- package/vendor/symengine/symengine/matrices/matrix_symbol.cpp +34 -0
- package/vendor/symengine/symengine/matrices/matrix_symbol.h +41 -0
- package/vendor/symengine/symengine/matrices/size.cpp +121 -0
- package/vendor/symengine/symengine/matrices/size.h +15 -0
- package/vendor/symengine/symengine/matrices/trace.cpp +112 -0
- package/vendor/symengine/symengine/matrices/trace.h +31 -0
- package/vendor/symengine/symengine/matrices/transpose.cpp +126 -0
- package/vendor/symengine/symengine/matrices/transpose.h +39 -0
- package/vendor/symengine/symengine/matrices/zero_matrix.cpp +94 -0
- package/vendor/symengine/symengine/matrices/zero_matrix.h +47 -0
- package/vendor/symengine/symengine/matrix.cpp +33 -0
- package/vendor/symengine/symengine/matrix.h +675 -0
- package/vendor/symengine/symengine/matrix_expressions.h +51 -0
- package/vendor/symengine/symengine/monomials.cpp +33 -0
- package/vendor/symengine/symengine/monomials.h +20 -0
- package/vendor/symengine/symengine/mp_boost.cpp +635 -0
- package/vendor/symengine/symengine/mp_class.h +1286 -0
- package/vendor/symengine/symengine/mp_wrapper.h +510 -0
- package/vendor/symengine/symengine/mul.cpp +629 -0
- package/vendor/symengine/symengine/mul.h +146 -0
- package/vendor/symengine/symengine/nan.cpp +234 -0
- package/vendor/symengine/symengine/nan.h +82 -0
- package/vendor/symengine/symengine/ntheory.cpp +1700 -0
- package/vendor/symengine/symengine/ntheory.h +213 -0
- package/vendor/symengine/symengine/ntheory_funcs.cpp +189 -0
- package/vendor/symengine/symengine/ntheory_funcs.h +78 -0
- package/vendor/symengine/symengine/number.cpp +36 -0
- package/vendor/symengine/symengine/number.h +256 -0
- package/vendor/symengine/symengine/numer_denom.cpp +149 -0
- package/vendor/symengine/symengine/parser/parser.cpp +367 -0
- package/vendor/symengine/symengine/parser/parser.h +56 -0
- package/vendor/symengine/symengine/parser/parser.tab.cc +1495 -0
- package/vendor/symengine/symengine/parser/parser.tab.hh +1410 -0
- package/vendor/symengine/symengine/parser/parser_old.cpp +688 -0
- package/vendor/symengine/symengine/parser/tokenizer.cpp +435 -0
- package/vendor/symengine/symengine/parser/tokenizer.h +35 -0
- package/vendor/symengine/symengine/parser.h +25 -0
- package/vendor/symengine/symengine/polys/basic_conversions.cpp +178 -0
- package/vendor/symengine/symengine/polys/basic_conversions.h +575 -0
- package/vendor/symengine/symengine/polys/cancel.h +39 -0
- package/vendor/symengine/symengine/polys/msymenginepoly.cpp +130 -0
- package/vendor/symengine/symengine/polys/msymenginepoly.h +536 -0
- package/vendor/symengine/symengine/polys/uexprpoly.cpp +90 -0
- package/vendor/symengine/symengine/polys/uexprpoly.h +205 -0
- package/vendor/symengine/symengine/polys/uintpoly.cpp +62 -0
- package/vendor/symengine/symengine/polys/uintpoly.h +134 -0
- package/vendor/symengine/symengine/polys/uintpoly_flint.h +228 -0
- package/vendor/symengine/symengine/polys/uintpoly_piranha.h +373 -0
- package/vendor/symengine/symengine/polys/upolybase.h +769 -0
- package/vendor/symengine/symengine/polys/uratpoly.cpp +59 -0
- package/vendor/symengine/symengine/polys/uratpoly.h +58 -0
- package/vendor/symengine/symengine/polys/usymenginepoly.h +139 -0
- package/vendor/symengine/symengine/pow.cpp +303 -0
- package/vendor/symengine/symengine/pow.h +76 -0
- package/vendor/symengine/symengine/prime_sieve.cpp +143 -0
- package/vendor/symengine/symengine/prime_sieve.h +64 -0
- package/vendor/symengine/symengine/printers/codegen.cpp +716 -0
- package/vendor/symengine/symengine/printers/codegen.h +168 -0
- package/vendor/symengine/symengine/printers/latex.cpp +630 -0
- package/vendor/symengine/symengine/printers/latex.h +76 -0
- package/vendor/symengine/symengine/printers/mathml.cpp +358 -0
- package/vendor/symengine/symengine/printers/mathml.h +62 -0
- package/vendor/symengine/symengine/printers/stringbox.cpp +276 -0
- package/vendor/symengine/symengine/printers/stringbox.h +60 -0
- package/vendor/symengine/symengine/printers/strprinter.cpp +1212 -0
- package/vendor/symengine/symengine/printers/strprinter.h +217 -0
- package/vendor/symengine/symengine/printers/unicode.cpp +730 -0
- package/vendor/symengine/symengine/printers/unicode.h +84 -0
- package/vendor/symengine/symengine/printers.h +46 -0
- package/vendor/symengine/symengine/rational.cpp +365 -0
- package/vendor/symengine/symengine/rational.h +341 -0
- package/vendor/symengine/symengine/real_double.cpp +388 -0
- package/vendor/symengine/symengine/real_double.h +492 -0
- package/vendor/symengine/symengine/real_mpfr.h +379 -0
- package/vendor/symengine/symengine/refine.cpp +213 -0
- package/vendor/symengine/symengine/refine.h +43 -0
- package/vendor/symengine/symengine/rewrite.cpp +235 -0
- package/vendor/symengine/symengine/rings.cpp +107 -0
- package/vendor/symengine/symengine/rings.h +24 -0
- package/vendor/symengine/symengine/serialize-cereal.h +964 -0
- package/vendor/symengine/symengine/series.cpp +85 -0
- package/vendor/symengine/symengine/series.h +727 -0
- package/vendor/symengine/symengine/series_flint.h +214 -0
- package/vendor/symengine/symengine/series_generic.cpp +247 -0
- package/vendor/symengine/symengine/series_generic.h +86 -0
- package/vendor/symengine/symengine/series_piranha.h +95 -0
- package/vendor/symengine/symengine/series_visitor.h +357 -0
- package/vendor/symengine/symengine/set_funcs.cpp +296 -0
- package/vendor/symengine/symengine/sets.cpp +1854 -0
- package/vendor/symengine/symengine/sets.h +696 -0
- package/vendor/symengine/symengine/simplify.cpp +62 -0
- package/vendor/symengine/symengine/simplify.h +34 -0
- package/vendor/symengine/symengine/solve.cpp +665 -0
- package/vendor/symengine/symengine/solve.h +117 -0
- package/vendor/symengine/symengine/sparse_matrix.cpp +776 -0
- package/vendor/symengine/symengine/special_boost.cpp +85 -0
- package/vendor/symengine/symengine/special_double.h +570 -0
- package/vendor/symengine/symengine/subs.h +579 -0
- package/vendor/symengine/symengine/symbol.cpp +88 -0
- package/vendor/symengine/symengine/symbol.h +116 -0
- package/vendor/symengine/symengine/symengine_assert.h +50 -0
- package/vendor/symengine/symengine/symengine_casts.h +139 -0
- package/vendor/symengine/symengine/symengine_exception.h +101 -0
- package/vendor/symengine/symengine/symengine_rcp.cpp +21 -0
- package/vendor/symengine/symengine/symengine_rcp.h +384 -0
- package/vendor/symengine/symengine/test_visitors.cpp +1083 -0
- package/vendor/symengine/symengine/test_visitors.h +466 -0
- package/vendor/symengine/symengine/tribool.h +85 -0
- package/vendor/symengine/symengine/tuple.cpp +47 -0
- package/vendor/symengine/symengine/tuple.h +32 -0
- package/vendor/symengine/symengine/type_codes.inc +139 -0
- package/vendor/symengine/symengine/utilities/cereal/LICENSE +24 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/access.hpp +351 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/adapters.hpp +163 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/binary.hpp +169 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/json.hpp +1024 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/portable_binary.hpp +334 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/archives/xml.hpp +956 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/cereal.hpp +1120 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/helpers.hpp +422 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/polymorphic_impl.hpp +825 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/polymorphic_impl_fwd.hpp +65 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/static_object.hpp +128 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/traits.hpp +1411 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/details/util.hpp +84 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/macros.hpp +156 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/specialize.hpp +139 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/array.hpp +79 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/atomic.hpp +55 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/base_class.hpp +203 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/bitset.hpp +176 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/boost_variant.hpp +164 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/chrono.hpp +72 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/common.hpp +129 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/complex.hpp +56 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/concepts/pair_associative_container.hpp +73 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/deque.hpp +62 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/forward_list.hpp +68 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/functional.hpp +43 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/list.hpp +62 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/map.hpp +36 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/memory.hpp +425 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/optional.hpp +65 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/polymorphic.hpp +483 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/queue.hpp +132 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/set.hpp +103 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/stack.hpp +76 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/string.hpp +61 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/tuple.hpp +123 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/unordered_map.hpp +36 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/unordered_set.hpp +99 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/utility.hpp +47 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/valarray.hpp +89 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/variant.hpp +108 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/types/vector.hpp +112 -0
- package/vendor/symengine/symengine/utilities/cereal/include/cereal/version.hpp +52 -0
- package/vendor/symengine/symengine/utilities/fast_float/include/fast_float/fast_float.h +3720 -0
- package/vendor/symengine/symengine/utilities/stream_fmt.h +25 -0
- package/vendor/symengine/symengine/visitor.cpp +348 -0
- package/vendor/symengine/symengine/visitor.h +425 -0
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
# @lakutata/math
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
Node.js 的数学包:公式按纸上的写法输入(`x^2 - 5x + 6`、`2(x + 1)`),可以展开、因式分解、化简、求导、解方程、求值,结果是精确的,也可以用指定精度的十进制数计算;可以求极限、求和与求积、解不等式,支持分段函数;还有数值矩阵和线性代数、统计和概率分布、数值求根。计算由基于 [SymEngine](https://github.com/symengine/symengine)、[Boost](https://www.boost.org)、[Eigen](https://eigen.tuxfamily.org) 和 [mpdecimal](https://www.bytereef.org/mpdecimal/) 的原生插件完成,原生插件在安装这个包时编译。耗时的运算还可以放到原生插件自己的线程里执行,并且可以设置时限、随时取消。它属于 [lakutata](https://github.com/lakutata/lakutata) 系列,但不需要 lakutata 应用:从 `@lakutata/math` 导入它的函数就能直接使用。
|
|
6
|
+
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install @lakutata/math
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
- 原生插件在安装时编译(node-gyp),所以机器上需要 Python 3 和支持 C++17 的编译器:macOS 上是 Xcode 的命令行工具,Linux 上是 `build-essential`(Debian、Ubuntu)或 `build-base`(Alpine),Windows 上是 Visual Studio 生成工具(“使用 C++ 的桌面开发”)。编译需要半分钟到几分钟;编译失败时,安装也会失败。
|
|
14
|
+
- 包管理器需要执行这个包的安装脚本。npm 会执行,但可能提示这个脚本“not yet covered by allowScripts”:用 `npm install-scripts approve @lakutata/math` 记下你允许它执行。Bun 和 pnpm 只为信任的依赖执行,需要先允许它(Bun 在 package.json 的 `trustedDependencies` 里加上它,pnpm 用 `pnpm approve-builds`);没有允许时,加载这个包会抛出错误,说明怎样编译原生插件。
|
|
15
|
+
- Node.js `^22.13.0 || >=24.11.0`。
|
|
16
|
+
- 原生插件用的是 Node-API,所以 Bun 和 Electron 的主进程可以直接加载 node-gyp 为 Node.js 编译的插件,不用重新编译。在 Bun 里,worker 线程里的原生插件运算还没结束就终止这个线程的话,整个进程会因为 Node-API 的致命错误退出(这是 Bun 1.4 的问题);Node.js 和 Electron 会丢弃这些运算。
|
|
17
|
+
|
|
18
|
+
## 用法
|
|
19
|
+
|
|
20
|
+
### 快速上手
|
|
21
|
+
|
|
22
|
+
这个包导出的函数可以直接使用:`parse`、`expression`、`equation`、`decimal`、`matrix`、`expressionMatrix`、`jacobian`、`unit`、`constant`、`solve` 和 `cse`,以及命名空间 `ntheory`(数论)、`poly`(多项式)、`linalg`(线性代数)、`stats`(统计和概率)和 `numeric`(数值解、数值积分和微分方程)。它们都属于 `math`,也就是用默认选项创建的范围。
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import {decimal, equation, expression, linalg, stats} from '@lakutata/math'
|
|
26
|
+
|
|
27
|
+
const height = expression('h0 - 9.80665*t^2/2')
|
|
28
|
+
console.log(height.diff('t').toString()) //-196133t/20000
|
|
29
|
+
console.log(height.substitute({h0: 100, t: 2}).toNumber()) //80.3867
|
|
30
|
+
console.log(equation('x^2 - 5x + 6 = 0').solve('x').map(String)) //['2', '3']
|
|
31
|
+
console.log(decimal('0.1').add('0.2').toString()) //0.3
|
|
32
|
+
console.log(linalg.solve([[4, 1], [2, 3]], [5, 5])) //Float64Array [1, 1]
|
|
33
|
+
console.log(stats.mean([2, 4, 4, 4, 5, 5, 7, 9])) //5
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 选项
|
|
37
|
+
|
|
38
|
+
`createMath(options)` 用别的选项创建一个 `MathScope`,它的函数和上面相同。选项有:`definitions`(用公式写的函数和常数,默认没有)、十进制数的 `precision`(默认 32 位有效数字)、异步运算的 `timeout`(毫秒,默认 0,即不限时)、它们的 `concurrency`(默认用原生插件的全部线程),以及 `units`(添加到单位表里的单位,默认没有)。每个选项都有默认值,所以单独调用 `createMath()` 得到的范围和 `math` 一样。一个程序可以创建多个范围,分别使用不同的定义。
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import {createMath, type Equation, type Expression, type MathScope} from '@lakutata/math'
|
|
42
|
+
|
|
43
|
+
const physics: MathScope = createMath({definitions: {'g': 9.80665, 'fall(t)': 'g*t^2/2'}, precision: 50})
|
|
44
|
+
const height: Expression = physics.expression('h0 - fall(t)')
|
|
45
|
+
console.log(height.toString()) //-196133t^2/40000 + h0
|
|
46
|
+
const landing: Equation = physics.equation('fall(t) = 100')
|
|
47
|
+
console.log(landing.solve('t', {domain: 'real'}).map((t: Expression): number => t.toNumber())) //[-4.5160075575178755, 4.5160075575178755]
|
|
48
|
+
console.log(physics.expression('pi').toDecimal()) //3.1415926535897932384626433832795028841971693993751
|
|
49
|
+
const expanded: Expression = await physics.expression('(x + y + 1)^30').expandAsync({timeout: 1000})
|
|
50
|
+
console.log(expanded.variables()) //['x', 'y']
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 公式的写法
|
|
54
|
+
|
|
55
|
+
| 写法 | 意思 |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `2x`、`2(x + 1)`、`(x + 1)(x - 1)`、`x (y + 1)` | 省略乘号的乘法。名字后面紧跟 `(` 表示调用函数,要相乘请写 `a*(b + c)` |
|
|
58
|
+
| `x^2`、`x**2`、`2^3^2` | 乘方,从右往左算(`2^3^2` 是 `2^9`) |
|
|
59
|
+
| `5!` | 阶乘 |
|
|
60
|
+
| `0.1`、`1.5e3` | 精确的小数:`0.1` 就是 `1/10` |
|
|
61
|
+
| `pi`、`e`、`i`、`inf`(或 `oo`)、`nan`、`phi`(黄金分割)、`tau`(`2pi`)、`EulerGamma`、`Catalan` | 常数 |
|
|
62
|
+
| `sin`、`cos`、`tan`、`asin`、`sinh`……、`exp`、`ln`、`log(x)`(自然对数)、`log(x, b)`、`log10`、`log2`、`expm1`、`log1p`、`sqrt`、`cbrt`、`root(x, n)`、`hypot` | 函数 |
|
|
63
|
+
| `abs`、`sign`、`floor`、`ceil`、`trunc`、`round`、`mod(a, b)`、`min`、`max`、`gcd`、`lcm`、`re`、`im`、`arg`、`conj` | 取整、余数、最值和复数的实部虚部 |
|
|
64
|
+
| `gamma`、`loggamma`、`digamma`、`polygamma`、`lowergamma`、`uppergamma`、`beta`、`erf`、`erfc`、`zeta`、`lambertw`、`sinc`、`binomial`、`factorial` | 特殊函数 |
|
|
65
|
+
| `Si`、`Ci`、`Shi`、`Chi`、`Ei`、`li`、`fresnelS`、`fresnelC` | 积分产生的特殊函数:正弦积分、余弦积分、双曲正弦积分、双曲余弦积分、指数积分、对数积分、菲涅耳积分;实数参数时既有双精度值,也有十进制值 |
|
|
66
|
+
| `piecewise(x^2, x < 0, x)`、`step`、`rect`、`tri` | 分段函数:各段的值和条件,最后是其他情况的值;`step`、`rect`、`tri` 也用它写成 |
|
|
67
|
+
| `sum(k^2, k, 1, n)`、`product(k, k, 1, n)` | 求和、求积:通项、它的变量、变量的第一个和最后一个值(整数、`-inf` 或 `inf`) |
|
|
68
|
+
| `x^2 = 4` | 方程(`equation()` 或 `parse()`) |
|
|
69
|
+
| `x < 1`、`x >= 0` | 不等式,由 `parse()` 读取 |
|
|
70
|
+
| `[1, 2; 3, 4]`、`[x; y]` | 矩阵:行之间用 `;` 分隔,元素之间用 `,` 分隔(`parse()` 得到 `ExpressionMatrix`)。矩阵可以相加、相乘(`[1, 2; 3, 4] * [x; y]`、`2[1, 2]`)、除以一个数、取整数次幂;`det`、`inv`、`transpose` 和 `trace` 的参数是矩阵 |
|
|
71
|
+
|
|
72
|
+
`cbrt(x)` 和奇数次的 `root(x, n)` 对负实数取实数根(`cbrt(-8)` 是 `-2`,和 `Math.cbrt` 一样);乘方取主值(`(-8)^(1/3)` 是 `1 + sqrt(3)i`,和 SymPy 一样)。`round` 遇到正好一半时向远离零的方向舍入(`round(-2.5)` 是 `-3`),`mod(a, b)` 的符号和 `b` 相同(`mod(-7, 3)` 是 `2`),`gcd` 和 `lcm` 只算整数。变量都当作复数:`re(x)` 保持原样。
|
|
73
|
+
|
|
74
|
+
`piecewise(v1, c1, v2, c2, …, v)` 中,每个值在它的条件成立、而前面的条件都不成立时取用;条件之后的最后一个值在所有条件都不成立时取用,没有它时表达式在那里没有定义(`nan`)。条件是值的比较(`<`、`<=`、`>`、`>=`、`=`、`!=`;`0 <= x < 1` 就是 `0 <= x and x < 1`),可以用 `and`、`or`、`not` 和括号组合;这三个词不能用作变量名。常数之间的比较精确判定(`piecewise(1, sqrt(2) < 3/2, 2)` 是 `1`),含变量的比较在给出变量的值(`substitute()`)后判定;比较中出现复数时抛出 `MathDomainException`。`step(x)` 在 0 以下是 0,在 0 处是 1/2,在 0 以上是 1(SymPy 的 `Heaviside`);`rect(x)` 在 `|x| < 1/2` 时是 1,在 `|x| = 1/2` 处是 1/2,其余是 0;`tri(x)` 在 `|x| < 1` 时是 `1 - |x|`,其余是 0;和 nerdamer 一样。分段函数逐段求导(`step(x)` 的导数是 0:没有狄拉克 δ 函数),可以编译,在 LaTeX 里写成 `cases`,在 JavaScript 和 C 里写成条件表达式;`numeric.integrate()` 在分段改变的地方把区间分开。
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
import {expression} from '@lakutata/math'
|
|
78
|
+
|
|
79
|
+
const f = expression('piecewise(x^2, x < 0, x)')
|
|
80
|
+
console.log(f.diff('x').toString()) //piecewise(2x, x < 0, 1)
|
|
81
|
+
console.log(f.substitute({x: -3}).toString()) //9
|
|
82
|
+
console.log(f.toTeX()) //\begin{cases} x^{2} & \text{for}\: x < 0 \\ x & \text{otherwise} \end{cases}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`sum(f, k, a, b)` 和 `product(f, k, a, b)` 是 `f` 在 `k` 从 `a` 到 `b` 时的和与积,`a`、`b` 是整数、`-inf`、`inf`,或者其他变量的表达式。`k` 是约束变量:它不算表达式的变量,`substitute()` 和 `diff()` 都不碰它。和 SymPy 一样,`b = a - 1` 时和是 0(积是 1),`b < a - 1` 时是从 `b + 1` 到 `a - 1` 的和取相反数(积取倒数)。上下限是相差不超过 1000 的整数时逐项精确计算。否则寻找闭式:`k` 的多项式(`sum(k^2, k, 1, n)` 是 `n^3/3 + n^2/2 + n/6`)、几何级数(`sum(x^k, k, 0, n)` 是 `piecewise(n + 1, x = 1, (-x^(n + 1) + 1)/(-x + 1))`;到 `inf` 时在 `abs(x) < 1` 处取它的值)、`1/(k + q)` 的幂(用 `zeta` 和 `polygamma` 表示:`sum(1/k^2, k, 1, inf)` 是 `pi^2/6`)、超几何项(Gosper 算法:`sum(k*2^k, k, 1, n)` 是 `2(n - 1)*2^n + 2`,`sum(1/(k*(k + 1)), k, 1, n)` 是 `n/(n + 1)`,`sum(k*k!, k, 1, n)` 是 `gamma(n + 2) - 1`;上限是 `inf` 时,取部分和(到 `n` 为止)的极限,`sum(1/(k*(k + 1)), k, 1, inf)` 是 1;相邻两项的比含有其他变量时,给出这个比的绝对值小于 1 时的值:`sum(k*x^k, k, 0, inf)` 在 `abs(x) < 1` 时是 `x/(x - 1)^2`),和式按项分别求;幂的积,以及因式都是一次的多项式分式的积(用 `gamma` 表示:`product(1 - 1/k^2, k, 2, n)` 是 `(n + 1)/(2n)`)。到 `inf` 的和无限增大时结果是 `inf` 或 `-inf`(`sum(2^k, k, 0, inf)`、`sum(k*k!, k, 1, inf)`)。其余的保持 `sum(…)` 和 `product(…)` 的形式:上下限是整数时逐项求值,最多 10^4 项,不能编译。
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
import {expression} from '@lakutata/math'
|
|
89
|
+
|
|
90
|
+
console.log(expression('sum(k^2, k, 1, n)').toString()) //n^3/3 + n^2/2 + n/6
|
|
91
|
+
console.log(expression('sum(1/k^2, k, 1, inf)').toString()) //pi^2/6
|
|
92
|
+
console.log(expression('product(1 - 1/k^2, k, 2, n)').toString()) //(n + 1)/(2n)
|
|
93
|
+
console.log(expression('sum(sin(k*x), k, 1, n)').diff('x').toTeX()) //\sum_{k = 1}^{n} k \cos\left(k x\right)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
函数名不带括号时当作变量(`gamma`、`beta`、`re`、`mod` 都是常见的量的名字),只有容易漏写括号的函数例外(三角和双曲函数、`exp`、`ln`、各种 `log`、`sqrt`、`cbrt`):`sin x` 是错误,要写成 `sin(x)`。
|
|
97
|
+
|
|
98
|
+
结果也用同样的写法输出:`toString()` 得到的公式可以再交给 `expression()` 读回来,`toTeX()` 得到 LaTeX。语法错误会抛出 `MathSyntaxException`,它的 `position` 是出错字符的位置。
|
|
99
|
+
|
|
100
|
+
### 定义
|
|
101
|
+
|
|
102
|
+
`createMath()` 的 `definitions` 是用公式写的函数和常数。范围创建以后它们不再改变,所以程序里用这个范围的各个地方看到的定义都一样。需要临时加定义时用 `with()`,它不会改变原来的范围:
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
import {math} from '@lakutata/math'
|
|
106
|
+
|
|
107
|
+
const scope = math.with({'net(x)': 'x / (1 + rate)', 'rate': '0.13'})
|
|
108
|
+
console.log(scope.expression('net(113)').toString()) //100
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
读取公式时定义就会展开,所以求导、解方程都能用上它们。
|
|
112
|
+
|
|
113
|
+
### 精确结果和数字
|
|
114
|
+
|
|
115
|
+
公式给出精确的结果:`0.1 + 0.2` 是 `3/10`,`sin(pi/6)` 是 `1/2`,`sqrt(8)` 是 `2sqrt(2)`。数乘以一个和时会乘进去(`2(x + 1)` 是 `2x + 2`),同一有理数次幂的整数会乘在一起(`sqrt(2)*sqrt(3)` 是 `sqrt(6)`),和 SymPy 一样。精确计算最多到约 31.5 万位:更大的幂保持幂的形式(`2^(10^7)`),阶乘最多算到 `20000!`,再大的保持 `gamma(n + 1)` 的形式。需要数字时:
|
|
116
|
+
|
|
117
|
+
- `toNumber()` 转成 JavaScript 的数字(值是复数时抛出 `MathDomainException`),`toComplex()` 得到 `{re, im}`。凡是 `toDecimal()` 或 `toComplexDecimal()` 能算的值,它们都先算出十进制值再转成数字,所以即使双精度计算已经没有一位有效数字(例如 `cos(10^30)`、`e^(i*10^30)`),得到的数字每一位都是对的。两者也能计算复数参数的特殊函数(伽马、zeta、Lambert W、多伽马、误差函数等),这些函数用双精度计算,表达式的其余部分仍用十进制计算。
|
|
118
|
+
- `toDecimal(digits)` 得到指定有效位数、正确舍入的字符串(默认位数是范围的 `precision`),写法和 `Decimal` 相同(见下一节):算出的 3 写成 `3`,不写成 `3.000…`。它会用更多位数重新计算,直到两次结果一致。能算四则运算、乘方和开方、`exp` 和 `ln`、三角函数和双曲函数及它们的反函数、取整函数、常数,以及实数参数的特殊函数:`gamma`、`loggamma`、`digamma`、`polygamma`、`beta`、`erf`、`erfc`、`zeta`(包括 Hurwitz zeta)、`lowergamma`、`uppergamma` 和 `lambertw`,以及积分产生的特殊函数 `Si`、`Ci`、`Shi`、`Chi`、`Ei`、`li`、`fresnelS` 和 `fresnelC`。多算 640 位仍然和 0 分不开的值,结果是 `0`(例如 `ln(6) - ln(2) - ln(3)`);参数太大、这么多位不够用的值,会按需要再多算一些位数,最多多算 50000 位(`sin(10^(10^4))` 要多算 10^4 位);恰好在相邻两个这么多位的十进制数正中间的值,取末位是偶数的那个(`ln(8)/ln(4)` 等于 1.5,保留 1 位得 `2`)。计算中有复数、但值是实数的(`e^(i*pi)`、`-i*asinh(i)`),结果是 `toComplexDecimal()` 的实部;值是复数时抛出 `MathDomainException`。
|
|
119
|
+
- `toComplexDecimal(digits)` 得到复数值的实部和虚部 `{re, im}`,舍入方式和 `toDecimal()` 相同,实部和虚部各自保留指定的有效位数:`(1 + i/10^25)^2 - 1` 的实部和虚部是 `-1e-50` 和 `2e-25`。`toDecimal()` 能算的函数,它对复数参数也能算,取主值分支;落在割线上的值,和 SymPy 取同一侧(`asin(2)` 是 `pi/2 - 1.3169…i`)。其中的特殊函数只接受实数参数。
|
|
120
|
+
- `compile()` 为了速度用双精度计算:双精度已经没有有效数字的值,它也算不准。不含变量的部分先按精确的十进制算好:`ln(erf(5))` 的每一位都是对的,如果从 `erf(5)` 的双精度值去算,只剩 4 位有效数字。实数参数的特殊函数由 Boost.Math 计算(积分产生的特殊函数除 `Ei` 外用这个包自己的级数和连分式),误差在最后一位的几个单位以内,各个平台上跑的是同一套代码(C 库的伽马函数在不同系统上各不相同)。
|
|
121
|
+
- `toRectangular()` 给出表达式的实部和虚部(`{real, imaginary}`),`toPolar()` 给出它的模和辐角(`{modulus, argument}`):`e^(i*pi/3)` 的实部和虚部是 `1/2` 和 `sqrt(3)/2`,模和辐角是 `1` 和 `pi/3`。变量当作复数,所以 `x` 的实部和虚部是 `re(x)` 和 `im(x)`。
|
|
122
|
+
- `compile(variables)` 把表达式编译成一个以数字为参数的函数,适合反复求值;`batch()` 一次算很多组数据:
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
import {expression} from '@lakutata/math'
|
|
126
|
+
|
|
127
|
+
const f = expression('x^2 + sin(y)').compile(['x', 'y'])
|
|
128
|
+
console.log(f(2, 0)) //4
|
|
129
|
+
console.log(f.batch(Float64Array.of(1, 0, 2, 0, 3, 0))) //Float64Array [1, 4, 9]
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 十进制数
|
|
133
|
+
|
|
134
|
+
`decimal(value, {precision})` 得到一个 `Decimal`:有效数字最多 `precision` 位的十进制数(默认是范围的 `precision`,32 位),适合计算金额,或者需要很多位数的值。每次运算都把结果正确舍入到这个精度:取有这么多位的十进制数里最接近的一个;正好在两个之间的中点时,取末位是偶数的那个。十进制数不会改变:每次运算都得到一个新的。
|
|
135
|
+
|
|
136
|
+
- 值按写出来的样子读入:数字按它最短的写法读(`0.1` 就是 0.1,不是这个双精度数的二进制值),字符串按十进制数读(`'19.99'`、`'1.5e-7'`),bigint 精确读入。没有变量的表达式会先算出值,和 `toDecimal()` 一样:`decimal(expression('pi'), {precision: 50})`。
|
|
137
|
+
- 结果的精度和参与运算的那个十进制数相同:`a.add(b)` 的精度是 `a` 的。传给运算的值按它的全部位数读入。
|
|
138
|
+
- 运算有:`add`、`sub`、`mul`、`div`、`mod`(结果的符号和除数相同,和公式里的 `mod()` 一样)、`pow`、`neg`、`abs`、`sqrt`、`cbrt`、`root(n)`、`exp`、`ln`、`log10`、`log(base)`、三角函数和双曲函数及它们的反函数、`atan2(x)`、`gamma`、`loggamma`、`digamma`、`erf`、`erfc`、`zeta`、`lambertw`、`floor`、`ceil`、`trunc`、`round(places)`(正好在中点时向远离 0 的方向舍入,和公式里的 `round()` 一样)、`compare`、`equals`、`isZero`、`isPositive`、`isNegative`、`isInteger`。
|
|
139
|
+
- `toString()` 写出的数字不带末尾的 0:第一位数字在 10^-6 位到 10^(precision - 1) 位之间时用普通写法,否则用科学记数法(`1.5`、`0.000025`、`1.5e+25`、`1e-7`)。`toFixed(places)` 写出指定的小数位数(1.5 的 `toFixed(2)` 是 `1.50`),`toNumber()` 得到最接近的数字。十进制数在公式里也是精确的值:`expression(decimal)`。
|
|
140
|
+
- 这些运算在 JavaScript 线程里执行,没有时限。四则运算在任何精度下都很快,但函数算到几万位要几秒,特殊函数(`zeta`、`gamma`)算到几千位就要几秒:这种情况请用 `toDecimalAsync()` 计算表达式(可以设时限),再用结果得到十进制数。
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import {decimal} from '@lakutata/math'
|
|
144
|
+
|
|
145
|
+
console.log(decimal(0.1).add(0.2).toString()) //0.3
|
|
146
|
+
console.log(decimal('19.99').mul(3).toFixed(2)) //59.97
|
|
147
|
+
console.log(decimal(1, {precision: 5}).div(3).toString()) //0.33333
|
|
148
|
+
console.log(decimal(2, {precision: 40}).sqrt().toString()) //1.41421356237309504880168872420969807857
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 生成代码
|
|
152
|
+
|
|
153
|
+
- `toJavaScript()` 和 `toC()` 把表达式写成 JavaScript 或 C(C99 和 `<math.h>`)的代码,变量直接用原来的名字:`x^2 - 5x + 6` 在 JavaScript 里写成 `Math.pow(x, 2) - 5*x + 6`,在 C 里写成 `pow(x, 2.0) - 5.0*x + 6.0`。生成的代码用双精度浮点数计算,而且只在实数范围内计算:表达式中某一部分的值是复数时,结果是 NaN(`compile()` 会在复数范围内计算这些部分)。用到目标语言没有的函数(例如 JavaScript 没有 `gamma` 和 `erf`,两种语言都没有 `zeta` 和 `lambertw`)、`2i` 这样的复数,或者变量名和目标语言的保留字或生成代码要用到的名字(如 `new`、`Math`、`pow`)相同时,抛出 `MathNotSupportedException`。
|
|
154
|
+
- `cse(expressions)` 找出几个表达式里重复出现或者共有的部分(公共子表达式消除)。它返回这些部分(`replacements`),每个部分有一个名字(`x0`、`x1`……,会跳过表达式里已有的变量名)和一个值,值里可以引用排在它前面的名字;还返回用这些名字改写后的表达式(`expressions`)。再配合 `toJavaScript()` 或 `toC()`,就能生成每个部分只算一次的代码。
|
|
155
|
+
|
|
156
|
+
```typescript
|
|
157
|
+
import {cse} from '@lakutata/math'
|
|
158
|
+
|
|
159
|
+
const {replacements, expressions} = cse(['sin(x + y)^2 + x + y', 'cos(x + y)'])
|
|
160
|
+
const lines: string[] = replacements.map(({name, value}) => `const ${name} = ${value.toJavaScript()}`) //const x0 = x + y
|
|
161
|
+
lines.push(`return [${expressions.map((expression) => expression.toJavaScript()).join(', ')}]`) //return [x0 + Math.pow(Math.sin(x0), 2), Math.cos(x0)]
|
|
162
|
+
console.log(lines.join('\n'))
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 解方程
|
|
166
|
+
|
|
167
|
+
- 对方程或表达式(表示它等于零)调用 `solve(variable)`,得到解的数组,每个解是一个表达式;它的 `kind` 说明解集的种类:`finite`(有限个)、`empty`(无解)、`all`(任意值)、`intervals`(区间),或者 `unsolved`/`other`(这个包解不出来的集合,用 `text` 描述);`set` 是全部解组成的集合(见下文)。关于未知数的二次及以上的多项式先做因式分解:一次因式直接给出根,其余的在四次以内给出精确解(`x^3 - 6x^2 + 11x - 6 = 0` 得到 1、2、3,而不是卡尔达诺公式的根式;`x^2 - (a + b)x + a*b = 0` 得到 a 和 b),二项式 `a x^n + b` 不限次数(`x^5 = 2` 的五个根是 `2^(1/5)` 乘以 1 的五次方根)。`{domain: 'real'}` 只保留实数解。
|
|
168
|
+
- `solve(equations, variables)` 解线性方程组:无解时返回空数组,否则返回一组解,给出它能确定的每个变量的值(有无穷多组解时,用其他变量表示)。
|
|
169
|
+
- 对不等式(`parse('x^2 < 4')`)调用 `solve(variable)`,得到它的实数解,是一些区间和孤立的值:`x^2*(x + 1) <= 0` 得到 `(-inf, -1] ∪ {0}`,区间以外的值(`0`)就是数组里的元素。两边必须是该变量的有理系数多项式的分式,分母为零的点一定不是解(`1/(1 + 1/x) > 0` 排除 `-1` 和 `0`)。每个不可约因式的实根先用笛卡儿符号法则隔离,再和求出的精确根一一对应;根没有精确形式(`x^5 - x - 1`)、系数不是有理数(`sqrt(2)*x < 1`)、含有其他变量或其他函数时,抛出 `MathNotSupportedException`(根的数值可以用 `numeric.polynomialRoots()` 求)。
|
|
170
|
+
- 数的集合(`MathSet`)由端点精确的实数区间和一些值组成:用 `interval(start, end, {startOpen, endOpen})` 和 `finiteSet(values)` 创建,解的 `set` 也是这样的集合。它有 `union`、`intersect`、`complement`(在实数范围内取补集)、`difference`、`contains`(不知道时为 `undefined`)、`equals`、`isEmpty`、`toString`(`[0, 2) ∪ {3}`)和 `toTeX`。端点用 `compare()` 精确比较:无法排序的端点(含变量)抛出 `MathNotSupportedException`。这个包解不出来的方程(`sin(x) = 0`),解集的种类是 `other`,集合运算不接受它。
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
import {expression, finiteSet, type Inequality, interval, parse, solve} from '@lakutata/math'
|
|
174
|
+
|
|
175
|
+
console.log(expression('x^4 - 1').solve('x').map(String)) //['-1', '1', '-i', 'i']
|
|
176
|
+
const [solution] = solve(['x + y = 3', 'x - y = 1'], ['x', 'y'])
|
|
177
|
+
console.log(solution.x.toString(), solution.y.toString()) //2 1
|
|
178
|
+
console.log((parse('(x + 1)/(x - 2) >= 0') as Inequality).solve('x').toString()) //(-inf, -1] ∪ (2, inf)
|
|
179
|
+
const set = interval(0, 2, {endOpen: true}).union(finiteSet([3]))
|
|
180
|
+
console.log(set.complement().toString(), set.contains('sqrt(2)')) //(-inf, 0) ∪ [2, 3) ∪ (3, inf) true
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### 极限
|
|
184
|
+
|
|
185
|
+
`limit(variable, point)` 用 Gruntz 算法(移植自 SymPy 的 `gruntz`)求表达式的极限。点可以是数、表达式、`inf` 或 `-inf`。在有限点处默认取两侧的极限,`{direction: '+'}` 或 `{direction: '-'}` 只取右极限或左极限。结果可以是 `inf` 或 `-inf`。两侧的极限不同,或者表达式一直振荡(`sin(x)` 在 `inf` 处)时没有极限,会抛出 `MathDomainException` 并说明原因。
|
|
186
|
+
|
|
187
|
+
这个算法能处理指数、对数、`x^x` 这样的幂、三角函数和双曲函数及其反函数,包括各种未定式(`0/0`、`inf/inf`、`0*inf`、`1^inf`、`inf - inf`)。`abs`、`sign`、`max`、`min`、`floor`、`ceil` 和 `piecewise` 按变量趋近的那一侧来定。参数趋于无穷的 `sin` 和 `cos` 始终在 -1 和 1 之间,所以 `sin(x)/x` 在 `inf` 处是 0。积分产生的特殊函数在参数趋近的那一点展开成级数(`Si(x)/x` 在 0 处是 1;`Ci`、`Chi` 和 `Ei` 在 0 处带着它们的对数项),参数趋于无穷的 `Ei`、`Shi`、`Chi` 和 `li` 用 `Ei` 的渐近级数处理(`x*e^(-x)*Ei(x)` 在 `inf` 处是 1),`Si`、`Ci` 和菲涅耳积分在无穷远处取它们在那里的值。求不出极限时抛出 `MathNotSupportedException`:极限取决于参数的符号(`exp(a*x)` 在 `inf` 处),算法不了解某个函数在无穷远处的行为(`gamma(x + 1)/x` 在 `inf` 处),或者表达式里有没算出闭式的和或积。
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
import {expression} from '@lakutata/math'
|
|
191
|
+
|
|
192
|
+
console.log(expression('sin(x)/x').limit('x', 0).toString()) //1
|
|
193
|
+
console.log(expression('(1 + a/x)^x').limit('x', 'inf').toString()) //e^a
|
|
194
|
+
console.log(expression('x^x').limit('x', 0, {direction: '+'}).toString()) //1
|
|
195
|
+
console.log(expression('(2^x + 3^x)^(1/x)').limit('x', 'inf').toString()) //3
|
|
196
|
+
expression('1/x').limit('x', 0) //MathDomainException: 1/x has no limit at x = 0: -inf from below, inf from above
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### 积分
|
|
200
|
+
|
|
201
|
+
`integrate(variable)` 求不定积分,结果不带积分常数;`integrate(variable, from, to)` 求定积分,上下限可以是 `inf` 和 `-inf`。和 SymPy 一样,`1/x` 的积分是 `ln(x)`,不加绝对值。原函数通过以下方法求得:
|
|
202
|
+
|
|
203
|
+
- 多项式分式先做部分分式(得到对数、`atan`、`atanh`:`1/(x^2 + 2x + 5)` 的积分是 `atan((x + 1)/2)/2`);
|
|
204
|
+
- 查积分表:一次式为参数的初等函数、多项式除以二次式的平方根(`x^2/sqrt(x^2 + 1)` 的积分是 `(-asinh(x) + x*sqrt(x^2 + 1))/2`),以及 `e^(-x^2)`(用 `erf` 表示);
|
|
205
|
+
- 换元(`2x*e^(x^2)` 的积分是 `e^(x^2)`)、分部积分(`x*e^x` 的积分是 `e^x*(x - 1)`)、正弦和余弦的幂与乘积,以及正弦余弦的分式用 `t = tan(x/2)` 换元;
|
|
206
|
+
- 积分产生的特殊函数:`sin(x)/x` 的积分是 `Si(x)`,`e^x/x` 的是 `Ei(x)`,`1/ln(x)` 的是 `li(x)`,`sin(x^2)` 的是菲涅耳积分(见公式写法的表)。
|
|
207
|
+
|
|
208
|
+
每个原函数返回前都会求导验证。定积分用原函数在两端的极限计算;区间内被积函数有极点,或者原函数有跳变(换元产生的 `tan(x/2)`:`1/(2 + cos(x))` 在 `[0, 2pi]` 上的积分是 `2pi*sqrt(3)/3`)时,在这些点分段;结果是数字时还会和 `numeric.integrate()` 的数值结果核对。积分无限增大时结果是 `inf` 或 `-inf`(`1/x` 在 `[0, 1]` 上),没有值时抛出 `MathDomainException`(`1/x` 在 `[-1, 1]` 上)。
|
|
209
|
+
|
|
210
|
+
求不出原函数时抛出 `MathNotSupportedException`:分母只有用代数数才能分解的分式(`1/(x^4 + 1)`),原函数既不是初等函数、也不能用上面这些特殊函数表示的函数,以及各项单独求不出原函数的某些和式。和 SymPy 不同,求不出的积分不保留成未计算的调用:积分变量是约束变量,和 `sum(…)` 一样。定积分总可以用 `numeric.integrate()` 做数值计算。
|
|
211
|
+
|
|
212
|
+
`laplace('t', 's')` 求拉普拉斯变换,即 `f(t) e^(-s t)` 从 0 到 `inf` 的积分,不给出收敛所需的 `s` 的条件(和 SymPy 的 `noconds` 一样)。它查变换表(`t` 的幂、指数函数、正弦和余弦、双曲函数),并用这几条规则:和式逐项变换,乘 `e^(a t)` 对应 `s` 的平移,乘 `t^n` 对应对 `s` 求导。`inverseLaplace('s', 't')` 求 `t > 0` 时的逆变换:多项式分式先做部分分式,`s - a` 的幂用 `gamma` 表示,`e^(-c s) F(s)` 得到在 `t = c` 之前为 0 的分段函数。每个逆变换都会再做一次正变换来验证。
|
|
213
|
+
|
|
214
|
+
```typescript
|
|
215
|
+
import {expression} from '@lakutata/math'
|
|
216
|
+
|
|
217
|
+
console.log(expression('x*e^x').integrate('x').toString()) //e^x*(x - 1)
|
|
218
|
+
console.log(expression('1/(x^2 + 1)').integrate('x', '-inf', 'inf').toString()) //pi
|
|
219
|
+
console.log(expression('sin(x)/x').integrate('x', 0, 'inf').toString()) //pi/2
|
|
220
|
+
console.log(expression('t^2*e^(-3t)').laplace('t', 's').toString()) //2/(s + 3)^3
|
|
221
|
+
console.log(expression('1/(s^2 + 2s + 5)').inverseLaplace('s', 't').toString()) //e^(-t)*sin(2t)/2
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### 数论
|
|
225
|
+
|
|
226
|
+
`ntheory` 处理整数:参数是 bigint,或者安全整数范围内的 number;整数结果都是 bigint。
|
|
227
|
+
|
|
228
|
+
- 整除和模运算:`gcd`、`lcm`、`extendedGcd`、`mod`、`modInverse`、`powMod`,以及 `crt`(中国剩余定理,模数不必两两互质)。模 `m` 的结果和 `m` 同号,和 `mod` 一样:`mod(-7, 3)` 是 `2n`。
|
|
229
|
+
- 质数:`isPrime`(2^64 以下的结果是确定的,以上用 Baillie-PSW 检验,目前还没有发现能通过它的合数)、`nextPrime`、`factor`、`totient`、`mobius`、`primitiveRoot`、`legendre`、`jacobi`。
|
|
230
|
+
- 数列和组合数:`fibonacci`、`lucas`、`binomial`、`factorial`、`doubleFactorial`,以及给出精确分数(表达式)的 `bernoulli` 和 `harmonic`。`bernoulli(1)` 和 SymPy 一样是 `+1/2`。
|
|
231
|
+
- 计数:`permutations(n, k)`(从 n 个元素中取 k 个的排列数)、`combinationsWithRepetition(n, k)`、`multinomial(counts)`、`bell(n)`(集合的划分数)、`catalan(n)`、`stirlingSecondKind(n, k)`(划分成 k 块的方法数)和 `compositions(n, k)`(写成 k 个正整数的有序和的方法数)。没有东西可数时(例如 `k > n` 时从 n 个元素中取 k 个),结果是 0(mathjs 会报错)。
|
|
232
|
+
- 连分数:`continuedFraction(value, {terms})` 给出实数的连分数 `a0 + 1/(a1 + 1/(a2 + …))` 的各项:有理数给出全部的项(JavaScript 的 number 按它打印出来的十进制数理解:`0.1` 就是 1/10),最后一项大于 1,和 SymPy 相同;其他的值(`sqrt(2)`、`pi`)给出前 `terms` 项(默认 20 项),每一项都是确定的:用这个值的十进制数计算,位数不够判定时就增加位数。即使算到上千位仍和某个整数分不开的值,连分数就在那一项结束。`fromContinuedFraction(terms)` 由各项算出连分数的值,`convergents(terms)` 给出前几项的值(π 的 `22/7`、`355/113`),也就是最佳有理逼近;两者都是精确分数(表达式)。
|
|
233
|
+
|
|
234
|
+
值不存在时(没有逆元的数的 `modInverse`、没有原根的模数的 `primitiveRoot`、没有公共解的同余方程组的 `crt`),结果是 `undefined`。参数不在函数的定义域内时(`totient(0)`、`legendre(a, 9)`),抛出 `MathDomainException`。
|
|
235
|
+
|
|
236
|
+
`factor` 能立刻找出小的因数,20 位左右的数也分解得很快;但一个数如果有两个很大的质因数,可能要算好几天,这时请用 `factorAsync` 并设置时限。`isPrime`、`nextPrime`、`totient`、`mobius` 和 `primitiveRoot` 也有异步版本。`factorial` 最大能算到 `71000!` 左右;而公式里的 `factorial(n)` 在 n 超过 20000 时保持 `gamma(n + 1)` 的形式,这样表达式仍然能打印出来。
|
|
237
|
+
|
|
238
|
+
```typescript
|
|
239
|
+
import {ntheory} from '@lakutata/math'
|
|
240
|
+
|
|
241
|
+
console.log(ntheory.factor(360)) //[{prime: 2n, exponent: 3}, {prime: 3n, exponent: 2}, {prime: 5n, exponent: 1}]
|
|
242
|
+
console.log(ntheory.powMod(4, 13, 497)) //445n
|
|
243
|
+
console.log(ntheory.continuedFraction('pi', {terms: 6})) //[3n, 7n, 15n, 1n, 292n, 1n]
|
|
244
|
+
console.log(ntheory.convergents([3, 7, 15, 1]).map(String)) //['3', '22/7', '333/106', '355/113']
|
|
245
|
+
console.log(ntheory.crt([2, 3, 2], [3, 5, 7])) //{remainder: 23n, modulus: 105n}
|
|
246
|
+
console.log(await ntheory.factorAsync(2n ** 64n + 1n, {timeout: 5000}))
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### 多项式
|
|
250
|
+
|
|
251
|
+
`poly`(`MathScope.poly`)对任意个变量的多项式做精确计算:`gcd(...values)` 和 `lcm(...values)`、`resultant(a, b, variable)` 和 `discriminant(p, variable)`、`factorList(p)` 和 `sqfList(p)`,以及它们的异步版本;表达式的 `factor()` 和 `sqf()` 给出它的因式分解形式。多项式可以是表达式,也可以是公式。它的生成元是其中的符号,以及本身不是多项式的因子:`sin(x)`、`sqrt(2)`、`exp(x)`(`x^(3/2)` 是 `sqrt(x)` 的立方,`exp(2x)` 是 `exp(x)` 的平方)。生成元之间看作互不相关:`sqrt(2)^2` 不会当作 2。含有负幂,或者系数是复数或不精确的数,都不算多项式(抛出 `MathNotSupportedException`);多项式的分式另有运算,见下一节。
|
|
252
|
+
|
|
253
|
+
- 系数都是整数时在整数上计算,gcd 带上系数的公约数(`gcd(2x + 2, 4x + 4)` 是 `2x + 2`);否则在有理数上计算,结果是首一的(`gcd(x/2 + 1/2, x + 1)` 是 `x + 1`)。首项系数都是正的,和 SymPy 一样。只有数时给出数的最大公约数和最小公倍数(`gcd(1/2, 1/3)` 是 `1/6`)。
|
|
254
|
+
- `factorList` 给出有理系数,以及在有理数上不可约的因子和它们的重数(`factorList('6x^2 - 6')` 是 6、`x - 1` 和 `x + 1`);`sqfList` 给出无平方分解(Yun 算法)。`factor()` 把因子写成乘积,系数放在前面(`3x*y + 6x + 3y + 6` 是 `3(x + 1)(y + 2)`),分式的分子和分母分别分解。对结果再做运算,会回到公式通常的形式(`2(x + 1)` 加 1 得 `2x + 3`)。
|
|
255
|
+
- 算法照 SymPy 用 C++ 重写:启发式 gcd(GCDHEU),失败时用子结式 PRS;结式用子结式 PRS;因式分解在单变量时用 Zassenhaus 算法(`x^n - 1` 和 `x^n + 1` 的分圆因子直接给出),多变量时用 Wang 算法。模每个素数都分成很多因子的多项式(如 Swinnerton-Dyer 多项式),分解的时间随因子个数指数增长:这时用 `factorAsync()` 或 `factorListAsync()` 并设定时限。第一个多项式的次数较低时,结式带上 SymPy 漏掉的符号 (-1)^(mn)(`resultant(x, x^3 + 1, x)` 是 1,SymPy 给出 -1)。
|
|
256
|
+
- 多项式按稠密形式存放:各变量的次数加一的乘积不超过 10^6(`x^2000 y^2000 + 1` 抛出 `MathNotSupportedException`)。
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
import {expression, poly} from '@lakutata/math'
|
|
260
|
+
|
|
261
|
+
console.log(poly.gcd('x^4 - 1', 'x^6 - 1').toString()) //x^2 - 1
|
|
262
|
+
console.log(poly.gcd('(x - 1)*(y - 2)', '(x - 1)*(x + y)').toString()) //x - 1
|
|
263
|
+
console.log(poly.lcm('2x + 2', '4x - 4').toString()) //4x^2 - 4
|
|
264
|
+
console.log(poly.resultant('x^2 + y', 'x - y', 'x').toString()) //y^2 + y
|
|
265
|
+
console.log(poly.discriminant('a*x^2 + b*x + c', 'x').toString()) //-4a*c + b^2
|
|
266
|
+
console.log(expression('3x*y + 6x + 3y + 6').factor().toString()) //3(x + 1)(y + 2)
|
|
267
|
+
console.log(expression('x^6 - y^6').factor().toString()) //(x^2 - x*y + y^2)(x + y)(x - y)(x^2 + x*y + y^2)
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### 多项式的分式
|
|
271
|
+
|
|
272
|
+
表达式的 `cancel()`、`together()`、`apart(variable)` 和 `completeSquare(variable)` 处理多项式的分式,生成元和 `poly` 的相同:
|
|
273
|
+
|
|
274
|
+
- `cancel()` 把分子和分母同除以它们的 gcd。两者都展开,首项系数为正,符号放在前面(`(2x^2 - 2)/(x^2 - 2x + 1)` 是 `(2x + 2)/(x - 1)`,`(-x - 1)/(x - 1)` 是 `-(x + 1)/(x - 1)`);分母只剩一个数时把它乘进去,和 SymPy 一样(`(x^2 - 1)/2` 是 `x^2/2 - 1/2`)。
|
|
275
|
+
- `together()` 把表达式通分成一个分式:分母里同一个底取最高次幂,数字取最小公倍数(`1/(2x) + 1/(3y)` 是 `(2x + 3y)/(6x*y)`),分子展开。它不找公因式(那是 `cancel()` 的事),也不进入函数的参数。
|
|
276
|
+
- `apart(variable)` 给出关于一个变量的部分分式,和 SymPy 的 `apart()` 一样:先是多项式部分,然后分母的每个不可约因式 `q`(k 次幂)给出分式 `h/q^j`(`j` 从 1 到 `k`),分子 `h` 的次数低于 `q`,每一项都做因式分解(`1/(x^3 + 1)` 是 `-(x - 2)/(3(x^2 - x + 1)) + 1/(3(x + 1))`)。其他变量当作参数(`1/((x + a)(x + b))` 是 `-1/((a + x)(a - b)) + 1/((a - b)(b + x))`);含有该变量的函数(`sin(x)/x`)抛出 `MathNotSupportedException`。各分子的系数是一个线性方程组的解,用不产生分数的 Bareiss 消元法求出。
|
|
277
|
+
- `completeSquare(variable)` 把 `a x^2 + b x + c` 写成 `a(x + b/(2a))^2 + c - b^2/(4a)`(`2x^2 + 4x + 1` 是 `2(x + 1)^2 - 1`);不是二次的抛出 `MathNotSupportedException`。
|
|
278
|
+
- `apart()` 和 `completeSquare()` 的结果再加上别的项时,各项保持写出的形式;其他运算(乘以一个数、`expand()`)会回到公式通常的形式。`equals()` 会把差中的分式通分,所以能证明分式之间的恒等式(`(x^2 - 1)/(x - 1)` 等于 `x + 1`)。`cancel()` 和 `apart()` 有异步版本:多变量的 gcd 或因式分解可能很慢。
|
|
279
|
+
|
|
280
|
+
```typescript
|
|
281
|
+
import {expression} from '@lakutata/math'
|
|
282
|
+
|
|
283
|
+
console.log(expression('(x^2 - 1)/(x^2 + 2x + 1)').cancel().toString()) //(x - 1)/(x + 1)
|
|
284
|
+
console.log(expression('1/x + 1/(x + 1)').together().toString()) //(2x + 1)/(x*(x + 1))
|
|
285
|
+
console.log(expression('1/(x^3 + 1)').apart('x').toString()) //-(x - 2)/(3(x^2 - x + 1)) + 1/(3(x + 1))
|
|
286
|
+
console.log(expression('x^2 - 6x + 10').completeSquare('x').toString()) //(x - 3)^2 + 1
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### 化简
|
|
290
|
+
|
|
291
|
+
`simplify()` 用对变量的所有取值都成立的恒等式寻找表达式更短的形式,找不到更短的就原样返回。“更短”指运算更少,计数方法和 SymPy 的 `count_ops` 相同(每个加、减、乘、除、负号、乘方和函数各算一次);运算一样多时取文字更短的。会尝试的形式有:
|
|
292
|
+
|
|
293
|
+
- 分式约分或因式分解、多项式展开:`(x^2 - 1)/(x - 1)` 是 `x + 1`,`(x + 1)^2 - x^2 - 2x` 是 1;
|
|
294
|
+
- 指数互为整数倍的指数函数,写成同一个指数函数的幂:`(e^(2x) - 1)/(e^x - 1)` 是 `e^x + 1`;
|
|
295
|
+
- 同一个角的倍角的正弦和余弦用 `sin^2 + cos^2 = 1` 化简,再写成倍角、半角或正切:`cos(x)^2 - sin(x)^2` 是 `cos(2x)`,`(1 - cos(2x))/2` 是 `sin(x)^2`,`sin(x)/cos(x)` 是 `tan(x)`;角的和会展开(`sin(x + y) - sin(x)cos(y)` 是 `cos(x)*sin(y)`);
|
|
296
|
+
- 双曲函数用 `cosh^2 - sinh^2 = 1` 化简,也和指数互相转换:`cosh(x) + sinh(x)` 是 `e^x`,`(e^x + e^(-x))/2` 是 `cosh(x)`;
|
|
297
|
+
- 数的嵌套平方根拆开,分母里数的平方根移到分子:`sqrt(3 + 2sqrt(2))` 是 `sqrt(2) + 1`,`1/(1 + sqrt(2))` 是 `sqrt(2) - 1`;
|
|
298
|
+
- 正有理数的对数合并:`ln(2) + ln(3)` 是 `ln(6)`。
|
|
299
|
+
|
|
300
|
+
函数的参数和分段函数各段的值先化简(`e^(sin(x)^2 + cos(x)^2)` 是 `e`);分段函数的条件,以及保持调用形式的和与积,不做改动。表达式里有和式的 16 次以上的整数次幂,或者有指数的分子大于 256 的幂(`e^(6561/256)`)时,不展开,也不尝试分式形式。取决于变量符号的化简一律不做:`sqrt(x^2)` 和 `ln(x*y)` 保持原样(只有 `x` 是实数时 `sqrt(x^2)` 才等于 `abs(x)`)。和 SymPy 一样,约分后的分式可能在原式没有定义的点上有值(`x + 1` 在 1 处)。结果不一定是最短的形式,也可能和 SymPy 的不同;对结果再化简一次不会再变。
|
|
301
|
+
|
|
302
|
+
```typescript
|
|
303
|
+
import {expression} from '@lakutata/math'
|
|
304
|
+
|
|
305
|
+
console.log(expression('sin(x)^4 - cos(x)^4').simplify().toString()) //-cos(2x)
|
|
306
|
+
console.log(expression('tan(x/2)*(1 + cos(x))').simplify().toString()) //sin(x)
|
|
307
|
+
console.log(expression('(exp(x) + exp(-x))/2').simplify().toString()) //cosh(x)
|
|
308
|
+
console.log(expression('1/(sqrt(3) - sqrt(2))').simplify().toString()) //sqrt(2) + sqrt(3)
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### 矩阵和线性代数
|
|
312
|
+
|
|
313
|
+
`matrix(rows)` 得到一个数值(双精度)`Matrix`。它的元素按行存放在一个 `Float64Array` 里(`data`),原生插件直接读取这块内存。它的方法都返回新的矩阵:`get`、`set`(会修改矩阵本身)、`row`、`column`、`diagonal`、`submatrix`、`reshape`、`transpose`、`add`、`sub`、`mul`、`div`、`neg`、`multiplyElements`、`divideElements`、`powElements`、`map`、`trace`、`kron`、`equals`、`toArray` 和 `toString`(`[1, 2; 3, 4]`)。
|
|
314
|
+
|
|
315
|
+
`linalg` 提供基于 Eigen 的线性代数:
|
|
316
|
+
|
|
317
|
+
- 构造矩阵:`zeros`、`ones`、`identity`、`diagonal`、`fromRows`、`fromColumns`、`fromFunction`、`concat`,以及 `rotation`(平面上的旋转,或空间里绕某个轴的旋转)。
|
|
318
|
+
- 向量(`Float64Array`,或数字数组):`dot`、`cross`、`outer`、`norm`。
|
|
319
|
+
- `multiply`、`solve`(用部分选主元的 LU 分解)、`solveTriangular`、`leastSquares`(范数最小的最小二乘解,和 NumPy 的 `lstsq` 一样)、`inverse`、`determinant`、`singularValues`、`rank`(大于 NumPy 默认容差的奇异值的个数)、`condition`,以及矩阵的范数(`'fro'`、1、2、`Infinity`)。
|
|
320
|
+
- 分解:`lu`(`P A = L U`,`permutation[i]` 是 `P A` 的第 i 行取自 A 的哪一行)、`qr` 和 `svd`(都是精简形式,列数是 `min(rows, columns)`)、`cholesky`、`eigen`(复数的特征值和特征向量,分成实部和虚部)、`symmetricEigen`、`schur`(实 Schur 形式),以及 `pseudoInverse`。`cholesky` 和 `symmetricEigen` 只读矩阵的下三角,和 NumPy 一样。`qr`、`svd` 和 `eigen` 给出的向量,正负号由 Eigen 决定,别的库可能给出相反的符号。
|
|
321
|
+
- 矩阵函数和矩阵方程:`exponential`(`e^A`,和 mathjs 的 `expm` 一样)、`squareRoot`(主平方根,只在它是实矩阵时给出)、`sylvester`(求 `A X + X B = C` 的 X)和 `lyapunov`(求 `A P + P Aᵀ + Q = 0` 的 P,和 mathjs 的 `lyap`、MATLAB 的一样;SciPy 的 `solve_continuous_lyapunov` 解的是 `A X + X Aᴴ = Q`,所以要传入 `-Q` 才得到这里的 P)。
|
|
322
|
+
|
|
323
|
+
右端项传入向量就得到向量:`solve(a, [5, 5])` 返回 `Float64Array`;传入矩阵(每一列是一个右端项)就得到矩阵。`solve` 和 `inverse` 判断矩阵奇异的规则和 NumPy 一样:LU 分解中遇到恰好为 0 的主元才算奇异;接近奇异的矩阵会给出很大的值,而不是报错,接近奇异的程度可以用 `condition()` 查看。
|
|
324
|
+
|
|
325
|
+
`linalg.sparse(rows, columns, entries)` 用条目 `[row, column, value]` 构造一个 `SparseMatrix`(同一位置的条目相加),`linalg.sparse(matrix)` 则取稠密矩阵中不为 0 的元素。它按压缩行格式存储(CSR:`rowPointers`、`columnIndices`、`values`)。它的方法有 `get`、`transpose`、`add`、`sub`、`neg`、`mul`(乘数字、向量、稠密矩阵或稀疏矩阵,乘稀疏矩阵时由 Eigen 计算)、`toDense` 和 `toEntries`。`solve` 传入稀疏矩阵时使用 Eigen 的稀疏 LU 分解(`SparseLU`,按 COLAMD 排序):它无法分解的矩阵(例如有一行全是 0)就是奇异的。`conjugateGradient`(用于对称正定矩阵)和 `biconjugateGradientStabilized`(BiCGSTAB,用于任意方阵)反复迭代,直到相对残差 `‖b - A x‖ / ‖b‖` 不超过 `tolerance`(默认 1e-10),最多迭代 `maxIterations` 次(默认是方程组规模的 10 倍);`converged` 表示是否达到了容差,传入 `guess` 可以从上一次的解继续迭代。
|
|
326
|
+
|
|
327
|
+
大矩阵上耗时的运算都有异步版本(`solveAsync()`、`inverseAsync()`、`multiplyAsync()` 等),它们在调用时就复制好参数。Eigen 的一次计算不能中途停下:超过时限或被取消时,Promise 会被拒绝,但线程要把正在进行的这次计算做完才能空出来。由几次计算组成的运算(`inverse()`、`leastSquares()`、`exponential()`)会在两次计算之间停下。
|
|
328
|
+
|
|
329
|
+
```typescript
|
|
330
|
+
import {linalg, matrix} from '@lakutata/math'
|
|
331
|
+
|
|
332
|
+
const a = matrix([[4, 1], [2, 3]])
|
|
333
|
+
console.log(linalg.solve(a, [5, 5])) //Float64Array [1, 1]
|
|
334
|
+
console.log(linalg.inverse(a).toString()) //[0.3, -0.1; -0.2, 0.4]
|
|
335
|
+
console.log(linalg.determinant(a)) //10
|
|
336
|
+
console.log(a.mul(a).toString()) //[18, 7; 14, 11]
|
|
337
|
+
console.log(linalg.leastSquares([[1, 1], [1, 2], [1, 3]], [1, 2, 2]))
|
|
338
|
+
const big = linalg.fromFunction(1000, 1000, (i, j) => (i === j ? 1000 : 1 / (1 + i + j)))
|
|
339
|
+
const inverse = await linalg.inverseAsync(big, {timeout: 5000})
|
|
340
|
+
console.log(inverse.get(0, 0))
|
|
341
|
+
const sparse = linalg.sparse(3, 3, [[0, 0, 2], [0, 1, -1], [1, 0, -1], [1, 1, 2], [2, 2, 2]])
|
|
342
|
+
console.log(linalg.solve(sparse, [1, 1, 2])) //Float64Array [1, 1, 1]
|
|
343
|
+
console.log(linalg.conjugateGradient(sparse, [1, 1, 2]).converged) //true
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### 表达式矩阵
|
|
347
|
+
|
|
348
|
+
`expressionMatrix(value)` 得到一个 `ExpressionMatrix`,即元素是表达式的矩阵:可以由各行给出(`[['a', 'b'], ['c', 'd']]`),由公式给出(`'[1, x; x^2, 2]'`,`parse()` 也能读这种公式),或者由数值矩阵得到。它和表达式一样不会改变:`with(row, column, value)` 得到替换了一个元素的新矩阵,`withRow()` 和 `withColumn()` 得到替换了一行或一列的新矩阵。
|
|
349
|
+
|
|
350
|
+
- 元素和运算:`get`、`toArray`、`row`、`column`、`submatrix`、`transpose`、`add`、`sub`、`mul`(乘以矩阵或表达式)、`div`(除以表达式)、`multiplyElements`、`pow`(整数次幂,负数是逆矩阵的幂)和 `trace`,以及逐元素的 `diff`、`substitute`、`expand`、`simplify`、`cancel`。`toMatrix()` 得到各元素数值组成的数值矩阵,`toString()` 得到它的公式,`toTeX()` 得到 `bmatrix`。`jacobian(expressions, variables)` 得到几个表达式的雅可比矩阵。
|
|
351
|
+
- 线性代数都是精确的:方阵且非奇异时的 `determinant`、`inverse`、`solve`(奇异时抛出 `MathDomainException`),`rref`(简化行阶梯形和主元所在的列),`rank`、`nullspace`、`characteristicPolynomial`、`eigenvalues`(带重数)和 `eigenvectors`。纯数字矩阵用精确的有理数消元。含变量的矩阵,行列式和特征多项式用 Berkowitz 算法计算,逆矩阵由伴随矩阵得到,所以每个元素都是一个多项式分式,分子分母的公因式不会约去:`cancel()` 可以约去它们,`equals()` 能比较分式(逆矩阵乘以原矩阵等于单位矩阵)。
|
|
352
|
+
- 判断元素是否为 0:展开后为 0 的是 0;常数用十进制数判断,和 0 分不开的是 0;含变量的元素对变量的所有取值都为 0 才算 0(在两组取值上精确计算)。和 SymPy 一样,只在变量取某些值时为 0 的主元按非 0 处理。特征值是特征多项式的根:先试对角线上的元素,剩下的部分先因式分解(`[a, b; b, a]` 的特征值是 `a + b` 和 `a - b`),在四次以内给出精确值;其他情况抛出 `MathNotSupportedException`,数值可以用 `linalg.eigen()` 求。
|
|
353
|
+
|
|
354
|
+
```typescript
|
|
355
|
+
import {expressionMatrix, jacobian, parse} from '@lakutata/math'
|
|
356
|
+
|
|
357
|
+
const m = expressionMatrix([['a', 'b'], ['c', 'd']])
|
|
358
|
+
console.log(m.determinant().toString()) //a*d - b*c
|
|
359
|
+
console.log(m.inverse().toString()) //[d/(a*d - b*c), -b/(a*d - b*c); -c/(a*d - b*c), a/(a*d - b*c)]
|
|
360
|
+
console.log(m.inverse().mul(m).cancel().toString()) //[1, 0; 0, 1]
|
|
361
|
+
console.log(parse('[1, 2; 3, 4] * [x; y]').toString()) //[x + 2y; 3x + 4y]
|
|
362
|
+
console.log(expressionMatrix('[2, 1; 1, 2]').eigenvectors().map(({value, vectors}) => [value.toString(), vectors.map(String)])) //[['1', ['[-1; 1]']], ['3', ['[1; 1]']]]
|
|
363
|
+
console.log(jacobian(['x^2*y', 'x + sin(y)'], ['x', 'y']).toString()) //[2x*y, x^2; 1, cos(y)]
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### 单位
|
|
367
|
+
|
|
368
|
+
`unit(value)` 得到一个 `Unit`,即带单位的值:可以由单位公式给出(`'5 cm + 2 inch'`、`'9.8 m/s^2'`),也可以由数和单位给出(`unit(5, 'cm')`)。单位公式里的名字都是单位,可以带前缀(`km`、`mA`、`kilometer`),此外只有 `pi`、`e` 和 `i`;数后面跟着单位表示以这些单位计的值,几个名字连写表示相乘(`kg m^2/s^2`)。单位公式和 `parse()` 的公式是分开的,因为在 `parse()` 里 `m`、`s`、`g` 都是变量。单位表来自 mathjs(251 个单位和它们的前缀),数值都写成精确值;`createMath({units})` 可以添加别的单位。
|
|
369
|
+
|
|
370
|
+
- 值的数(`value`)是精确的表达式,单位的换算关系也是精确的:`unit('1 inch').to('cm')` 正好是 `2.54 cm`,`unit('90 deg').to('rad')` 是 `(pi/2) rad`。`toNumber(units?)` 给出普通数字,`toDecimal()` 给出十进制数,`toString()` 给出 `unit()` 能读回的文字。
|
|
371
|
+
- `to(units)` 换算成量纲相同的单位;`toSI()` 换算成这个量的 SI 单位(`J`、`Pa`),没有的话把每个单位分别换成 SI 单位;`toBest(units?)` 在给出的单位之间,或者在原单位的各个前缀之间,选最合适的单位(`5000 m` 变成 `5 km`);`split(units)` 除最后一个单位外,每个单位取整数部分(`1.5 h` 分成 `1 h` 和 `30 min`)。
|
|
372
|
+
- `add` 和 `sub` 的结果用左边的值的单位。`mul` 和 `div` 把单位相乘或相除,右边的单位如果和左边某个单位是同一种量,就先换算成左边的单位(`5 cm * 2 m` 得 `1000 cm^2`);量纲全部约掉时得到不带单位的数。此外还有 `pow`(指数要使各量纲的次数仍是整数)、`sqrt`、`neg`、`abs`、`equals`、`compare`。单位公式里可以用 `sqrt`、`sin`、`cos`、`tan`(参数是角度或数)以及 `exp`、`log`、`ln`(参数是数)。量纲不同的值不能相加,也不能互相换算,会抛出 `MathUnitException`。
|
|
373
|
+
- 带偏移的温度(`degC`、`degF`)可以换算和比较,但不能相加、相乘或相除,要先换算成 `K`(否则抛出 `MathUnitException`)。在复合单位里(`degC/m`)它表示温差,不带偏移。前缀作用在它的数上:`1 mdegC` 就是 0.001 degC。
|
|
374
|
+
- `constant(name)` 给出带单位的物理常数:mathjs 的 52 个常数,数值取 CODATA 2022。SI 精确定义的常数以及由它们算出的常数都是精确值(`reducedPlanckConstant` 是 `h/(2pi)`)。
|
|
375
|
+
- 和 mathjs 不同的地方:值保持原来的单位,输出时不会自动换前缀(要换用 `toBest()`),单位也不会自动换成导出单位(`N m` 仍是 `N m`,`toSI()` 才给出 `J`);带偏移的温度不能相加;mathjs 取了近似值或沿用旧定义的单位(`eV`、`hp`、`psi`、`torr`、`mmHg`、`acre`、`kip`)在这里按定义取精确值。
|
|
376
|
+
|
|
377
|
+
```typescript
|
|
378
|
+
import {constant, createMath, unit} from '@lakutata/math'
|
|
379
|
+
|
|
380
|
+
console.log(unit('5 cm + 2 inch').toString()) //10.08 cm
|
|
381
|
+
console.log(unit('100 km/h').to('m/s').toString()) //(250/9) m / s
|
|
382
|
+
console.log(unit('20 degC').to('degF').toString()) //68 degF
|
|
383
|
+
console.log(unit('1.5 h').split(['h', 'min']).map(String)) //['1 h', '30 min']
|
|
384
|
+
console.log(constant('boltzmann').mul('300 K').to('eV').toDecimal(6)) //0.025852 eV
|
|
385
|
+
const nautical = createMath({units: {knot: {definition: '1852 m/h', aliases: ['knots']}}})
|
|
386
|
+
console.log(nautical.unit('20 knots').to('km/h').toString()) //37.04 km / h
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### 统计
|
|
390
|
+
|
|
391
|
+
`stats` 在原生插件里计算一组数值(数字数组或 `Float64Array`)的统计量:`sum`(会补偿舍入误差:`[1e16, 1, -1e16]` 的和是 1)、`product`、`cumulativeSum`、`differences`、`mean`、`median`、`mode`(出现次数最多的全部值,按升序排列)、`min`、`max`、`variance`、`standardDeviation`、`medianAbsoluteDeviation`、`quantile`、`covariance`、`correlation`(皮尔逊相关系数)、`zScores` 和 `klDivergence`(KL 散度,用自然对数,两个分布会先各自归一化到和为 1)。
|
|
392
|
+
|
|
393
|
+
方差默认用离差平方和除以 n,也就是把这组值当作总体,和 NumPy 一样。`{normalization: 'unbiased'}` 改为除以 n - 1(把这组值当作样本,这是 mathjs 的默认做法),`'biased'` 则除以 n + 1;`standardDeviation`、`covariance` 和 `zScores` 也接受这个选项。方差和协方差分两遍计算,数值带有很大的偏移量时也不会因相减而失去精度:`[1e9 + 4, 1e9 + 7, 1e9 + 13, 1e9 + 16]` 的方差是 22.5。分位数在相邻的两个值之间做线性插值,和 NumPy 的默认方法、mathjs 的 `quantileSeq` 一样。数值里有 NaN 时结果是 NaN;对空数组求没有定义的统计量(均值、中位数、方差等)会抛出 `MathArgumentException`,而空数组的和是 0,积是 1。
|
|
394
|
+
|
|
395
|
+
```typescript
|
|
396
|
+
import {stats} from '@lakutata/math'
|
|
397
|
+
|
|
398
|
+
const values = [2, 4, 4, 4, 5, 5, 7, 9]
|
|
399
|
+
console.log(stats.mean(values)) //5
|
|
400
|
+
console.log(stats.standardDeviation(values)) //2
|
|
401
|
+
console.log(stats.standardDeviation(values, {normalization: 'unbiased'})) //2.138089935299395
|
|
402
|
+
console.log(stats.quantile(values, [0.25, 0.75])) //Float64Array [4, 5.5]
|
|
403
|
+
console.log(stats.correlation(values, [1, 3, 2, 5, 4, 6, 8, 7])) //0.8455943246644705
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### 概率分布
|
|
407
|
+
|
|
408
|
+
`stats` 还提供 24 种概率分布,由 Boost.Math 计算,参数按名字传入:`stats.gamma({shape: 2.5, scale: 1.5})`。不同的库对同一个分布的参数化方式各不相同,所以用名字说明每个参数是什么;下表列出了在 SciPy 里的对应写法。`Distribution` 有 `pdf`(离散分布是概率质量)、`cdf`、`survival`、`quantile` 和 `survivalQuantile`(SciPy 的 `isf`),都可以传入一个值或一组值;还有 `mean`、`variance`、`standardDeviation`、`median`、`mode`、`skewness`、`excessKurtosis`、`support`,以及 `sample`。
|
|
409
|
+
|
|
410
|
+
| 分布 | 参数(默认值) | SciPy |
|
|
411
|
+
| --- | --- | --- |
|
|
412
|
+
| `normal` | `mean`(0)、`standardDeviation`(1) | `norm(loc=mean, scale=standardDeviation)` |
|
|
413
|
+
| `lognormal` | `logMean`(0)、`logStandardDeviation`(1),对数的均值和标准差 | `lognorm(s=logStandardDeviation, scale=exp(logMean))` |
|
|
414
|
+
| `uniform` | `lower`(0)、`upper`(1) | `uniform(loc=lower, scale=upper - lower)` |
|
|
415
|
+
| `exponential` | `rate`(1) | `expon(scale=1/rate)` |
|
|
416
|
+
| `gamma` | `shape`、`scale`(1) | `gamma(a=shape, scale=scale)` |
|
|
417
|
+
| `beta` | `alpha`、`beta` | `beta(a=alpha, b=beta)` |
|
|
418
|
+
| `chiSquared` | `degrees` | `chi2(df=degrees)` |
|
|
419
|
+
| `studentT` | `degrees` | `t(df=degrees)` |
|
|
420
|
+
| `fisherF` | `numeratorDegrees`、`denominatorDegrees` | `f(dfn=numeratorDegrees, dfd=denominatorDegrees)` |
|
|
421
|
+
| `cauchy`、`laplace`、`logistic`、`gumbel` | `location`(0)、`scale`(1) | `cauchy`、`laplace`、`logistic`、`gumbel_r`(`loc=location, scale=scale`) |
|
|
422
|
+
| `weibull` | `shape`、`scale`(1) | `weibull_min(c=shape, scale=scale)` |
|
|
423
|
+
| `pareto` | `scale`、`shape` | `pareto(b=shape, scale=scale)` |
|
|
424
|
+
| `rayleigh` | `scale`(1) | `rayleigh(scale=scale)` |
|
|
425
|
+
| `triangular` | `lower`、`mode`、`upper` | `triang(c=(mode - lower)/(upper - lower), loc=lower, scale=upper - lower)` |
|
|
426
|
+
| `inverseGamma` | `shape`、`scale`(1) | `invgamma(a=shape, scale=scale)` |
|
|
427
|
+
| `bernoulli` | `probability` | `bernoulli(p=probability)` |
|
|
428
|
+
| `binomial` | `trials`、`probability` | `binom(n=trials, p=probability)` |
|
|
429
|
+
| `poisson` | `mean` | `poisson(mu=mean)` |
|
|
430
|
+
| `geometric` | `probability`:到第一次成功为止的试验次数,从 1 开始 | `geom(p=probability)` |
|
|
431
|
+
| `negativeBinomial` | `successes`、`probability`:第 `successes` 次成功之前的失败次数 | `nbinom(n=successes, p=probability)` |
|
|
432
|
+
| `hypergeometric` | `total`、`successes`、`draws` | `hypergeom(M=total, n=successes, N=draws)` |
|
|
433
|
+
|
|
434
|
+
这些分布的约定和 SciPy 一致:在支撑集以外,密度是 0,cdf 是 0 或 1;离散分布在整数之间的概率质量是 0,cdf 取下面那个整数的值;p 的分位数是满足 `cdf(k) >= p` 的最小整数 k。离散分布 0 的分位数和 1 的生存分位数都是支撑集的下界(SciPy 给的是下界减 1)。发散的均值或方差是 `Infinity`(例如自由度为 2 的 t 分布的方差);发散的偏度或超额峰度是 NaN,和不存在的矩一样(例如柯西分布的均值)。参数无效时抛出 `MathArgumentException`。
|
|
435
|
+
|
|
436
|
+
`stats.random(seed)` 得到一个 `RandomGenerator`(xoshiro256**),它有 `next()`、`uniform(count)`、`integers(count, lower, upper)`(取值范围是 `[lower, upper)`)和 `clone()`;`sample(count, random)` 用它生成的均匀随机数对 cdf 求逆来抽样。同一个种子每次都得到同样的序列。均匀随机数和整数在各个平台上完全相同,而分布的样本要经过 C 库的函数计算,在不同平台上最后几位可能不同。不给种子时,生成器从系统的随机数取种子。它不适合用于密码学。
|
|
437
|
+
|
|
438
|
+
```typescript
|
|
439
|
+
import {stats} from '@lakutata/math'
|
|
440
|
+
|
|
441
|
+
const normal = stats.normal({mean: 1, standardDeviation: 2})
|
|
442
|
+
console.log(normal.cdf(1)) //0.5
|
|
443
|
+
console.log(normal.quantile(0.975)) //4.919927969080108
|
|
444
|
+
const binomial = stats.binomial({trials: 10, probability: 0.3})
|
|
445
|
+
console.log(binomial.pdf([2, 3])) //Float64Array [0.23347444050000024, 0.2668279319999998]
|
|
446
|
+
console.log(binomial.quantile(0.5)) //3
|
|
447
|
+
const random = stats.random(42)
|
|
448
|
+
console.log(normal.sample(3, random)) //种子 42 每次都得到同样的三个样本
|
|
449
|
+
console.log(random.integers(5, 1, 7)) //掷五次骰子
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### 数值解
|
|
453
|
+
|
|
454
|
+
`numeric` 求方程的数值解,适合 `solve()` 求不出精确解,或者只需要数值的情况。原生插件把表达式编译成双精度计算,并给出各个方法需要的导数。
|
|
455
|
+
|
|
456
|
+
- `polynomialRoots(polynomial, variable)` 求多项式在复数范围内的全部根,结果是 `{re, im}`,重根按重数重复出现,先按实部、再按虚部排序。它求的是平衡后伴随矩阵的特征值,再用牛顿法修正(和 NumPy 的 `roots` 一样)。多项式可以是表达式,也可以是从常数项开始的系数,和 mathjs 的 `polynomialRoot` 一样(NumPy 的 `roots` 从最高次项开始)。m 重根的精度大约是机器精度的 m 次方根。
|
|
457
|
+
- `findRoot(equation, variable, options)` 求函数(`x^3 - 2x - 5`,即等于 0)或方程(`cos(x) = x`)的一个根:给出函数在两端符号相反的区间 `bracket` `[a, b]` 时用 TOMS 748 算法,根一定在区间内;给出初始值 `guess` 时用牛顿法。区间两端符号相同,或者函数在区间里不是实数时,抛出 `MathDomainException`。
|
|
458
|
+
- `solveSystem(equations, variables, guess, options)` 从初始值出发解非线性方程组:用带线搜索的牛顿法,牛顿法走不下去时改用 Levenberg-Marquardt 法。方程比变量多时,求的是残差最小的点(最小二乘)。
|
|
459
|
+
|
|
460
|
+
迭代方法在步长相对解小于 `tolerance`(默认 1e-12)时停止,和 SciPy 的 `fsolve` 一样,或者在迭代 `maxIterations` 次(默认 100)后停止。不收敛时不会抛出错误,而是在结果里说明(`converged`),同时给出迭代次数 `iterations` 和残差 `residual`(根处函数值的绝对值,方程组则是残差的范数)。每个运算都有异步版本(`findRootAsync()` 等)。
|
|
461
|
+
|
|
462
|
+
```typescript
|
|
463
|
+
import {numeric} from '@lakutata/math'
|
|
464
|
+
|
|
465
|
+
console.log(numeric.polynomialRoots('x^3 - 6x^2 + 11x - 6')) //{re: Float64Array [1, 2, 3], im: Float64Array [0, 0, 0]}
|
|
466
|
+
//[1, 0, 1]:1 + x^2 的系数,从常数项开始
|
|
467
|
+
console.log(numeric.polynomialRoots([1, 0, 1])) //{re: Float64Array [0, 0], im: Float64Array [-1, 1]}
|
|
468
|
+
console.log(numeric.findRoot('cos(x) = x', 'x', {bracket: [0, 1]}).root) //0.7390851332151606
|
|
469
|
+
console.log(numeric.findRoot('x^3 - 2x - 5', 'x', {guess: 2}).root) //2.0945514815423265
|
|
470
|
+
const {solution, converged} = numeric.solveSystem(['x^2 + y^2 = 4', 'x*y = 1'], ['x', 'y'], [2, 0])
|
|
471
|
+
console.log(solution, converged) //Float64Array [1.9318516525781366, 0.5176380902050416] true
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
### 数值积分
|
|
475
|
+
|
|
476
|
+
`numeric.integrate(function, variable, [a, b], options)` 求函数在区间上的积分,结果是 `{value, error, converged}`。端点可以是无穷(`-Infinity`、`Infinity`);从 b 积到 a 时结果取反。
|
|
477
|
+
|
|
478
|
+
- 用 QUADPACK 的 QAGS 算法计算,和 SciPy 的 `quad` 相同:把误差最大的区间对半分,用 21 点的 Gauss-Kronrod 公式计算,在奇点附近对结果序列做外推;半直线和整条实轴先变换到有限区间。如果这样还没算到舍入误差的程度,就再用双指数积分(tanh-sinh、exp-sinh、sinh-sinh)算一次,取更准确的结果。在不为 0 的端点附近,函数改写成到端点距离的函数(`x = 1 - u` 时 `1 - x^2` 是 `2u - u^2`),所以端点上的奇点(`1/sqrt(1 - x^2)` 在 `[-1, 1]` 上)也能算到舍入误差的程度。
|
|
479
|
+
- `points` 给出区间内函数奇异或跳变的点,区间在这些点分开计算。外推往往能自己找到这样的点,但给出 `points` 算得更快、更准,误差估计也可靠:奇点在区间内部时,外推的误差估计可能偏小,QUADPACK 也是这样。函数在某个求积节点上是无穷大时,区间也会在那里分开。函数分母中关于积分变量的多项式因子在区间内部有实根、而函数在趋近这个根时增大时(可去奇点不算,比如 `sin(x)/x` 在 0 处),区间也在这个根处分开:跨过极点的积分是发散的,结果标为不收敛,而不会把柯西主值当作积分(`1/x` 在 `[-1, 2]` 上)。这个根如果来自有理系数的一次或二次因子,不论在区间内部还是端点上,函数都按到这个根的精确距离计算,十进制数做不到这一点(`cbrt(x + 1/14)/(x + 1/14)` 的根 -1/14)。关于积分变量的多项式分式先约去公因式:`(x^2 - 1)/(x - 1)` 在 `[0, 2]` 上的积分是 4,否则求积节点会在 1 处遇到 0/0。
|
|
480
|
+
- `tolerance` 限制误差估计的大小(相对于 `|f|` 的积分):默认约 1.5e-8(机器精度的平方根,和 SciPy 相同),实际结果通常比估计准确得多。发散、无休止振荡,或者双精度分辨不了的积分,给出最好的估计,并且 `converged` 为 `false`;函数在区间内不是实数时抛出 `MathDomainException`。`integrateAsync()` 在原生插件的线程里执行。
|
|
481
|
+
|
|
482
|
+
```typescript
|
|
483
|
+
import {numeric} from '@lakutata/math'
|
|
484
|
+
|
|
485
|
+
console.log(numeric.integrate('x^2', 'x', [0, 3])) //{value: 9, error: 9.992007221626409e-14, converged: true}
|
|
486
|
+
console.log(numeric.integrate('1/sqrt(1 - x^2)', 'x', [-1, 1]).value) //3.141592653589794
|
|
487
|
+
console.log(numeric.integrate('exp(-x^2)', 'x', [-Infinity, Infinity]).value) //1.7724538509055159
|
|
488
|
+
console.log(numeric.integrate('1/sqrt(abs(x - 1))', 'x', [0, 2], {points: [1]}).value) //4
|
|
489
|
+
console.log(numeric.integrate('sin(x)/x', 'x', [0, Infinity]).converged) //false
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
### 微分方程
|
|
493
|
+
|
|
494
|
+
`numeric.solveODE({derivatives, states, time, span, initial}, options)` 求常微分方程或方程组 y' = f(t, y) 的数值解:各状态的导数是时间(默认叫 `t`)和各状态的表达式,从区间起点的初值一直解到终点(终点在起点之前时倒着解)。高阶方程写成方程组:x'' = -x 写成 x' = v、v' = -x。
|
|
495
|
+
|
|
496
|
+
- `method: 'rk45'`(默认)是 Dormand 和 Prince 的 5 阶显式 Runge-Kutta 方法,和 SciPy 的 RK45、MATLAB 的 ode45 相同。`method: 'radau'` 是 5 阶隐式方法 Radau IIA,和 SciPy 的 Radau 相同,用于刚性方程(各分量衰减快慢相差悬殊,例如化学反应、mu 很大的 Van der Pol 振子):它使用导数的精确雅可比矩阵,在这类方程上需要的步数少得多。
|
|
497
|
+
- 步长根据上一步的误差选取,和 SciPy 的 `solve_ivp` 相同,使每一步的误差不超过 `relativeTolerance`(默认 1e-6)乘以状态的大小,再加上 `absoluteTolerance`(默认 1e-9)。SciPy 和 MATLAB 的默认值是 1e-3 和 1e-6,只能保证大约三位有效数字;区间很长时,终点的误差可能比每一步的容差大。
|
|
498
|
+
- 结果包括时间 `t`(从起点开始的每一步,或者指定的 `points`)和状态 `y`:`y` 是一个 `Matrix`,每个时间一行,每个状态一列。`points` 处的值由每一步的连续扩展算出,不会因此缩短步长。解在终点之前停下时(解无界增长使步长变得太小,或者超过 `maxSteps` 步,默认 100000 步),`completed` 为 `false`,`message` 说明原因,结果给出到停下为止的解。`solveODEAsync()` 在原生插件的线程里执行。
|
|
499
|
+
|
|
500
|
+
```typescript
|
|
501
|
+
import {numeric} from '@lakutata/math'
|
|
502
|
+
|
|
503
|
+
const decay = numeric.solveODE({derivatives: '-2y', states: 'y', span: [0, 1], initial: 1}, {points: [0.5, 1]})
|
|
504
|
+
console.log(decay.y.data) //Float64Array [0.3678795037443847, 0.13533535227865426]
|
|
505
|
+
const predators = numeric.solveODE({derivatives: ['1.5x - x*y', '-3y + x*y'], states: ['x', 'y'], span: [0, 15], initial: [10, 5]}, {points: [5, 10, 15]})
|
|
506
|
+
console.log(predators.y.toString()) //[0.26418560018756804, 3.1341398128097984; 0.28720983158008045, 0.4497817486332696; 0.7137350135355639, 0.07540900832629659]
|
|
507
|
+
const stiff = numeric.solveODE({derivatives: ['v', '1000(1 - x^2)v - x'], states: ['x', 'v'], span: [0, 3000], initial: [2, 0]}, {method: 'radau'})
|
|
508
|
+
console.log(stiff.completed, stiff.steps) //true 1296
|
|
509
|
+
const blowUp = numeric.solveODE({derivatives: 'y^2', states: 'y', span: [0, 2], initial: 1})
|
|
510
|
+
console.log(blowUp.completed, blowUp.message) //false The step became too small at t = 1.0000002858952532
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
### 异步运算
|
|
514
|
+
|
|
515
|
+
可能耗时的运算都有异步版本:`expandAsync()`、`simplifyAsync()`、`diffAsync()`、`seriesAsync()`、`limitAsync()`、`integrateAsync()`、`laplaceAsync()`、`inverseLaplaceAsync()`、`solveAsync()`、`toDecimalAsync()`、`toComplexDecimalAsync()`、`solveAsync()` 和 `cseAsync()`,以及数论、线性代数和数值解的异步版本。它们在原生插件自己的线程里执行,不占用 libuv 的线程池:线程数默认是 CPU 核数减一,也可以用环境变量 `LAKUTATA_MATH_THREADS` 指定。选项有 `timeout`(毫秒)和 `signal`(`AbortSignal`):
|
|
516
|
+
|
|
517
|
+
- 到了时限,Promise 以 `MathTimeoutException` 拒绝;signal 取消时,以 `MathCancelledException` 拒绝。运算会在下一个检查点停下:原生插件的算法在各个步骤之间都会检查是否已被取消(展开的各项、十进制数级数的各项、消元的各列、数值方法和数论的各次迭代、化简、极限和积分的各次尝试等)。单个步骤会执行到底,线程要到那时才空出来:例如 Eigen 的一次计算(一次分解、一次矩阵乘法),以及 SymEngine 里除展开以外的一次运算(求导、级数)。
|
|
518
|
+
- `createMath()` 创建的范围限制自己同时执行的运算数(`concurrency`),其余的运算排队等待。如果程序在运算还没结束时退出,这些运算的结果会被丢弃。
|
|
519
|
+
|
|
520
|
+
表达式最多嵌套 1000 层:更深的公式会被拒绝(`MathNotSupportedException`),以免运算时栈溢出。
|
|
521
|
+
|
|
522
|
+
### 打包
|
|
523
|
+
|
|
524
|
+
`lakutata package` 生成的包、可执行文件和安装程序会带上编译好的原生插件(`build/Release/math.node`),所以要在每个目标平台上先安装这个包,再在那里打包。
|
|
525
|
+
|
|
526
|
+
## API
|
|
527
|
+
|
|
528
|
+
| 导出 | 说明 |
|
|
529
|
+
|---|---|
|
|
530
|
+
| `parse`、`expression`、`equation`、`decimal`、`matrix`、`expressionMatrix`、`jacobian`、`interval`、`finiteSet`、`unit`、`constant`、`solve`、`solveAsync`、`cse`、`cseAsync`、`ntheory`、`poly`、`linalg`、`stats`、`numeric` | `math` 的函数和命名空间,可以直接使用 |
|
|
531
|
+
| `math`、`createMath`、`MathOptions` | 默认选项的范围;用别的选项(`definitions`、`precision`、`timeout`、`concurrency`、`units`)创建范围的函数,以及它的选项 |
|
|
532
|
+
| `MathScope`、`MathDefinitions` | 由定义和设置组成的范围(`createMath()`、`with()`):`parse`、`expression`、`equation`、`decimal`、`matrix`、`expressionMatrix`、`jacobian`、`interval`、`finiteSet`、`unit`、`constant`、`with`、`solve`、`solveAsync`、`cse`、`cseAsync`、`ntheory`、`poly`、`linalg`、`stats`、`numeric`;定义(按签名给出的公式) |
|
|
533
|
+
| `Expression` | 表达式:`toString`、`toTeX`、`toNumber`、`toComplex`、`toDecimal`、`toComplexDecimal`、`variables`、`equals`、`add`、`sub`、`mul`、`div`、`pow`、`neg`、`expand`、`simplify`、`diff`、`series`、`limit`、`integrate`、`laplace`、`inverseLaplace`、`substitute`、`evaluate`、`solve`、`compile`,多项式(`coefficients`、`degree`、`leadingCoefficient`、`divide`),`factor`、`sqf`,分式(`cancel`、`together`、`apart`、`completeSquare`),`numerator`、`denominator`、`rewrite`(改写成 `exp`、`sin`、`cos`),判断(`isZero`、`isPositive`、`isNegative`、`isInteger`、`isRational`、`isReal`、`isFinite`:不知道时为 `undefined`),`compare`、`toJavaScript`、`toC`、`toPolar`、`toRectangular`,以及各个异步版本 |
|
|
534
|
+
| `CommonSubexpressions`、`CseOptions` | `cse()` 的结果(`replacements`、`expressions`)和它的选项(`prefix`) |
|
|
535
|
+
| `PolarForm`、`RectangularForm` | 复数的极坐标形式(模 `modulus`、辐角 `argument`)和直角坐标形式(实部 `real`、虚部 `imaginary`) |
|
|
536
|
+
| `Equation`、`Inequality`、`InequalityRelation` | 方程(`left`、`right`、`difference`、`substitute`、`solve`、`solveAsync`),不等式(`left`、`right`、`relation`、`solve`、`solveAsync`) |
|
|
537
|
+
| `Solutions`、`SolutionsKind`、`SolveOptions` | 方程或不等式的解:表达式的数组,带有 `kind`、`set` 和 `text`;解的范围 `domain` |
|
|
538
|
+
| `MathSet`、`MathSetKind`、`SetInterval`、`IntervalOptions` | 数的集合(`interval()`、`finiteSet()`、解的 `set`):`kind`、`values`、`intervals`、`text`、`union`、`intersect`、`complement`、`difference`、`contains`、`equals`、`isEmpty`、`toString`、`toTeX`;集合的种类;集合中的一个区间;区间的端点是否排除 |
|
|
539
|
+
| `SystemSolution`、`SystemEquation` | 方程组的一组解(每个变量对应一个表达式),方程组里的一个方程 |
|
|
540
|
+
| `CompiledFunction` | 编译后的表达式:以数字为参数的函数,它的 `variables` 和 `batch` |
|
|
541
|
+
| `Decimal`、`DecimalValue`、`DecimalOptions` | 指定精度的十进制数(`decimal()`):`precision`、`add`、`sub`、`mul`、`div`、`mod`、`pow`、`neg`、`abs`、`sqrt`、`cbrt`、`root`、`exp`、`ln`、`log10`、`log`、`sin`、`cos`、`tan`、`asin`、`acos`、`atan`、`atan2`、`sinh`、`cosh`、`tanh`、`asinh`、`acosh`、`atanh`、`gamma`、`loggamma`、`digamma`、`erf`、`erfc`、`zeta`、`lambertw`、`floor`、`ceil`、`trunc`、`round`、`compare`、`equals`、`isZero`、`isPositive`、`isNegative`、`isInteger`、`toString`、`toFixed`、`toNumber`、`toJSON`;需要十进制数的地方可以传入的值(十进制数、数字、bigint、写成字符串的十进制数);`decimal()` 的选项(`precision`) |
|
|
542
|
+
| `Matrix`、`MatrixValue`、`VectorValue` | 数值矩阵(`matrix()`):`rows`、`columns`、`data`、`get`、`set`、`row`、`column`、`diagonal`、`submatrix`、`reshape`、`transpose`、`add`、`sub`、`mul`、`div`、`neg`、`multiplyElements`、`divideElements`、`powElements`、`map`、`trace`、`kron`、`equals`、`clone`、`toArray`、`toJSON`、`toString`;需要矩阵的地方可以传入的值(矩阵,或它的各行);需要向量的地方可以传入的值(`Float64Array`,或数字数组) |
|
|
543
|
+
| `ExpressionMatrix`、`ExpressionMatrixValue`、`RowEchelonForm`、`Eigenvector` | 表达式矩阵(`expressionMatrix()`、`parse()`):`rows`、`columns`、`get`、`toArray`、`with`、`withRow`、`withColumn`、`row`、`column`、`submatrix`、`transpose`、`neg`、`add`、`sub`、`mul`、`div`、`multiplyElements`、`pow`、`trace`、`determinant`、`inverse`、`solve`、`rref`、`rank`、`nullspace`、`characteristicPolynomial`、`eigenvalues`、`eigenvectors`、`diff`、`substitute`、`expand`、`simplify`、`cancel`、`equals`、`toMatrix`、`toString`、`toTeX`,以及 `determinantAsync`、`inverseAsync`、`solveAsync`、`eigenvectorsAsync`;能当作表达式矩阵的值;简化行阶梯形和它的主元;特征值、它的重数和特征向量 |
|
|
544
|
+
| `Unit`、`UnitValue`、`UnitDimensions`、`CustomUnit`、`CustomUnits`、`PhysicalConstant` | 带单位的值(`unit()`、`constant()`):`value`、`units`、`dimensions`、`hasDimensionsOf`、`to`、`toSI`、`toBest`、`split`、`add`、`sub`、`mul`、`div`、`pow`、`sqrt`、`neg`、`abs`、`equals`、`compare`、`toNumber`、`toDecimal`、`toString`、`toJSON`、`toTeX`;能当作带单位的值给出的参数;各基本量的次数;`createMath()` 的一个单位(`definition`、`prefixes`、`aliases`、`offset`)和这个选项的全部单位;物理常数的名字 |
|
|
545
|
+
| `LinearAlgebra`、`NormKind` | 线性代数(`linalg`):`zeros`、`ones`、`identity`、`diagonal`、`fromRows`、`fromColumns`、`fromFunction`、`concat`、`rotation`、`dot`、`cross`、`outer`、`norm`、`multiply`、`solve`、`solveTriangular`、`leastSquares`、`inverse`、`determinant`、`singularValues`、`rank`、`condition`、`lu`、`qr`、`cholesky`、`svd`、`eigen`、`symmetricEigen`、`schur`、`pseudoInverse`、`exponential`、`squareRoot`、`sylvester`、`lyapunov`、`sparse`、`conjugateGradient`、`biconjugateGradientStabilized`,以及各个异步版本;范数的种类 |
|
|
546
|
+
| `Statistics`、`Normalization`、`NormalizationOptions` | 统计(`stats`):`sum`、`product`、`cumulativeSum`、`differences`、`mean`、`median`、`mode`、`min`、`max`、`variance`、`standardDeviation`、`medianAbsoluteDeviation`、`quantile`、`covariance`、`correlation`、`zScores`、`klDivergence`、各个分布(`normal` … `hypergeometric`、`distribution`)和 `random`;方差的除数(`'uncorrected'`、`'unbiased'`、`'biased'`)和选择它的选项 |
|
|
547
|
+
| `Distribution`、`DistributionName`、`DistributionParameters` | 概率分布:`pdf`、`cdf`、`survival`、`quantile`、`survivalQuantile`、`sample`、`parameters`、`kind`、`support`、`mean`、`variance`、`standardDeviation`、`median`、`mode`、`skewness`、`excessKurtosis`;分布的名字;按名字给出的参数 |
|
|
548
|
+
| `RandomGenerator` | 按种子生成随机数的生成器(xoshiro256**):`next`、`uniform`、`integers`、`clone` |
|
|
549
|
+
| `SparseMatrix`、`SparseEntry` | 按压缩行存储的稀疏矩阵(`linalg.sparse()`):`rowPointers`、`columnIndices`、`values`、`nonZeros`、`get`、`transpose`、`add`、`sub`、`neg`、`mul`、`toDense`、`toEntries`;条目 `[row, column, value]` |
|
|
550
|
+
| `IterativeOptions`、`IterativeSolution` | 迭代求解器的选项(`tolerance`、`maxIterations`、`guess`)和结果(`solution`、`iterations`、`error`、`converged`) |
|
|
551
|
+
| `LuDecomposition`、`QrDecomposition`、`SingularValueDecomposition`、`EigenDecomposition`、`SymmetricEigenDecomposition`、`SchurDecomposition`、`ComplexVector`、`ComplexMatrix` | 各种分解的结果:`{lower, upper, permutation}`、`{q, r}`、`{u, singularValues, v}`、`{values, vectors}`(复数为 `{re, im}`)、`{values, vectors}`、`{u, t}` |
|
|
552
|
+
| `NumberTheory`、`IntegerValue`、`ContinuedFractionOptions`、`PrimeFactor`、`ExtendedGcd`、`Congruence` | 数论(`ntheory`):`gcd`、`lcm`、`extendedGcd`、`mod`、`modInverse`、`powMod`、`isPrime`、`nextPrime`、`factor`、`totient`、`mobius`、`primitiveRoot`、`legendre`、`jacobi`、`crt`、`fibonacci`、`lucas`、`binomial`、`factorial`、`doubleFactorial`、`bernoulli`、`harmonic`、`permutations`、`combinationsWithRepetition`、`multinomial`、`bell`、`catalan`、`stirlingSecondKind`、`compositions`、`continuedFraction`、`fromContinuedFraction`、`convergents`,以及各个异步版本;整数(bigint,或安全整数范围内的 number);质因数和它的指数;`extendedGcd` 的结果;`crt` 的结果;连分数的最多项数 |
|
|
553
|
+
| `Polynomials`、`FactorList`、`PolynomialFactor` | 多项式(`poly`):`gcd`、`lcm`、`resultant`、`discriminant`、`factorList`、`sqfList`,以及异步版本;多项式写成系数乘以各因子的形式,一个因子和它的重数 |
|
|
554
|
+
| `Numeric`、`FindRootOptions`、`IterationOptions`、`RootResult`、`SystemRootResult`、`IntegrateOptions`、`IntegralResult` | 数值解和数值积分(`numeric`):`polynomialRoots`、`findRoot`、`solveSystem`、`integrate` 和它们的异步版本;它们的选项(`bracket`、`guess`、`tolerance`、`maxIterations`、`points`)和结果(`root` 或 `solution`、`converged`、`iterations`、`residual`;`value`、`error`、`converged`) |
|
|
555
|
+
| `ODEProblem`、`ODEOptions`、`ODEResult` | 微分方程(`numeric.solveODE`、`solveODEAsync`):导数、状态、时间、区间和初值;方法(`rk45`、`radau`)、容差、`maxStep`、`points`、`maxSteps`;时间 `t`、状态 `y`、`steps`、`rejected`、`evaluations`、`jacobians`、`completed`、`message` |
|
|
556
|
+
| `AsyncOptions`、`Value` | 异步运算的选项(`timeout`、`signal`);需要表达式的地方可以传入的值(表达式、数字、bigint、十进制数、公式) |
|
|
557
|
+
|
|
558
|
+
类型声明里有每个声明的说明和示例。
|
|
559
|
+
|
|
560
|
+
## 错误
|
|
561
|
+
|
|
562
|
+
| 错误 | 什么时候抛出 |
|
|
563
|
+
|---|---|
|
|
564
|
+
| `MathSyntaxException` | 公式写得不对(带有出错的 `position`),需要表达式的地方给了方程或矩阵,或者反过来,矩阵和数相加,只接受数的函数用在了矩阵上 |
|
|
565
|
+
| `MathUnitException` | 量纲不同的带单位的值相加、比较或换算,不认识的单位(带有它的 `position`),带偏移的温度相加、相乘或相除,乘方后量纲的次数不是整数,`sin()` 的参数既不是角度也不是数 |
|
|
566
|
+
| `MathUnknownFunctionException` | 公式调用的函数既不是内置函数,也没有定义,或者把常数写成了调用(`g(2)`),带有它的 `position` |
|
|
567
|
+
| `MathDefinitionException` | 定义无效:用了内置的名字、参数重复、定义之间循环引用、定义嵌套太深、定义是一个矩阵;`createMath()` 的单位无效:名字已经是单位(单独或者加上前缀),定义里有不认识的单位,单位之间循环定义 |
|
|
568
|
+
| `MathDomainException` | 把复数当成数字取值,取无穷大、`complexInfinity`(除以零;`toNumber()` 里也包括除以一个无法和 0 区分的值)的值,数论函数的参数不在定义域内(`totient(0)`),需要求逆的地方矩阵是奇异的(`solve()`、`inverse()`),`cholesky()` 的矩阵不是正定的,`squareRoot()` 的矩阵的主平方根不是实矩阵或者不存在,Sylvester 或 Lyapunov 方程没有唯一解,或者十进制数不在函数的定义域内(负数开平方、`asin()` 的参数是 2、负数的非整数次幂),`findRoot()` 的区间两端符号相同或者函数在区间里不是实数,函数或方程组在 `findRoot()`、`solveSystem()` 的初始值处不是实数,`integrate()` 的函数在区间内不是实数,`solveODE()` 的导数在起点不是实数,对复数求连分数,表达式矩阵是奇异的(`inverse()`、`solve()`、`inv()`),表达式在某点没有极限(两侧的极限不同,或者一直振荡),没有值的定积分(`1/x` 在 `[-1, 1]` 上) |
|
|
569
|
+
| `MathDivisionByZeroException` | 计算十进制值时遇到除以零(包括除以一个无法和 0 区分的值、0 的对数、0 的负数次幂、以 1 为底的对数、在函数的极点上求值:`gamma()` 的参数是 -2、`zeta()` 的参数是 1),模数是 0,或者连分数的各项导致除以零 |
|
|
570
|
+
| `MathNotSupportedException` | 这个包对这个表达式不做的运算:非线性方程组、无法编译的表达式、嵌套超过 1000 层的表达式、运算中遇到太大而无法精确计算的数、对非整数求 `gcd` 或 `lcm`、数论的结果超过 2^20 位(二进制)、`bernoulli(n)` 和 `bell(n)` 的 n 超过 2000、`harmonic(n)` 的 n 超过 50000、`stirlingSecondKind(n, k)` 的 n 超过 50000 或 n k 超过 6250000、生成代码时遇到目标语言没有的函数、`2i` 这样的复数、和保留字重名的变量、特征值的计算不收敛、求 n 不是整数的 `polygamma(n, x)` 的十进制值、十进制数的指数超出了范围(约 ±10^18,32 位系统上约 ±4.25 × 10^8;例如 `exp()` 的参数是 10^19,`toDecimal()` 里也一样),或者十进制值要比要求的位数多算超过 50000 位(`sin(10^(10^6))`),表达式矩阵的特征值求不出精确值,矩阵的幂不是整数,矩阵的方程或不等式,`poly` 的多项式含负幂、系数是复数或不精确的数,或者各次数合起来对稠密形式太高,求不出的极限,求不出的积分、拉普拉斯变换和逆变换,积分产生的特殊函数值为复数时的十进制值(`Ci(-1)`),`toComplexDecimal()` 算不了的复数参数的函数的十进制值(`gamma(1 + i)`;`toDecimal()` 里也一样,即使值其实是实数:`re(gamma(1 + i))`) |
|
|
571
|
+
| `MathArgumentException` | 参数无效:需要数字的地方还有变量、名字不是变量、给的值个数不对、需要整数的地方给的不是整数、需要十进制数的地方给的不是十进制数、精度不在 1 到 100000 之间、`integrate()` 的区间、分点或容差无效、`solveODE()` 的问题或选项无效、对含有变量的值求连分数、连分数的项不是整数、矩阵或向量的维数不对、稀疏矩阵的结构无效(包括构造之后数组被改动的情况)、对空数组求没有定义的统计量、分布的参数无效、分位数的概率不在 0 到 1 之间、`klDivergence` 的概率是负数,没有给出多项式就求 gcd 或 lcm,`poly` 的变量不是名字,只需要单位的地方给了数(`to('2 cm')`),物理常数的名字不对,`createMath()` 的选项无效 |
|
|
572
|
+
| `MathTimeoutException`、`MathCancelledException` | 异步运算超过时限,或者被取消 |
|
|
573
|
+
| `MathException` | 以上所有错误的基类;原生插件内部错误时,它的 `errno` 是 `E_MATH_INTERNAL` |
|
|
574
|
+
|
|
575
|
+
## 另见
|
|
576
|
+
|
|
577
|
+
- [SymEngine](https://github.com/symengine/symengine):原生插件所基于的符号计算引擎。
|
|
578
|
+
- `THIRD_PARTY_NOTICES.md`:编译进原生插件的库和它们的许可证。
|