@lakutata/math 0.0.0-stage → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +196 -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 +191 -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
|
@@ -0,0 +1,2171 @@
|
|
|
1
|
+
// Copyright John Maddock 2017.
|
|
2
|
+
// Copyright Paul A. Bristow 2016, 2017, 2018.
|
|
3
|
+
// Copyright Nicholas Thompson 2018
|
|
4
|
+
|
|
5
|
+
// Distributed under the Boost Software License, Version 1.0.
|
|
6
|
+
// (See accompanying file LICENSE_1_0.txt or
|
|
7
|
+
// copy at http ://www.boost.org/LICENSE_1_0.txt).
|
|
8
|
+
|
|
9
|
+
#ifndef BOOST_MATH_SF_LAMBERT_W_HPP
|
|
10
|
+
#define BOOST_MATH_SF_LAMBERT_W_HPP
|
|
11
|
+
|
|
12
|
+
#ifdef _MSC_VER
|
|
13
|
+
#pragma warning(disable : 4127)
|
|
14
|
+
#endif
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
Implementation of an algorithm for the Lambert W0 and W-1 real-only functions.
|
|
18
|
+
|
|
19
|
+
This code is based in part on the algorithm by
|
|
20
|
+
Toshio Fukushima,
|
|
21
|
+
"Precise and fast computation of Lambert W-functions without transcendental function evaluations",
|
|
22
|
+
J.Comp.Appl.Math. 244 (2013) 77-89,
|
|
23
|
+
and on a C/C++ version by Darko Veberic, darko.veberic@ijs.si
|
|
24
|
+
based on the Fukushima algorithm and Toshio Fukushima's FORTRAN version of his algorithm.
|
|
25
|
+
|
|
26
|
+
First derivative of Lambert_w is derived from
|
|
27
|
+
Princeton Companion to Applied Mathematics, 'The Lambert-W function', Section 1.3: Series and Generating Functions.
|
|
28
|
+
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
TODO revise this list of macros.
|
|
33
|
+
Some macros that will show some (or much) diagnostic values if #defined.
|
|
34
|
+
//[boost_math_instrument_lambert_w_macros
|
|
35
|
+
|
|
36
|
+
// #define-able macros
|
|
37
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_W_HALLEY // Halley refinement diagnostics.
|
|
38
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_W_PRECISION // Precision.
|
|
39
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_WM1 // W1 branch diagnostics.
|
|
40
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_WM1_HALLEY // Halley refinement diagnostics only for W-1 branch.
|
|
41
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_WM1_TINY // K > 64, z > -1.0264389699511303e-26
|
|
42
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_WM1_LOOKUP // Show results from W-1 lookup table.
|
|
43
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_W_SCHROEDER // Schroeder refinement diagnostics.
|
|
44
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_W_TERMS // Number of terms used for near-singularity series.
|
|
45
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_W_SINGULARITY_SERIES // Show evaluation of series near branch singularity.
|
|
46
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
47
|
+
BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES_ITERATIONS // Show evaluation of series for small z.
|
|
48
|
+
//] [/boost_math_instrument_lambert_w_macros]
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
#include <boost/math/tools/config.hpp>
|
|
52
|
+
#include <boost/math/policies/error_handling.hpp>
|
|
53
|
+
#include <boost/math/policies/policy.hpp>
|
|
54
|
+
#include <boost/math/tools/promotion.hpp>
|
|
55
|
+
#include <boost/math/special_functions/fpclassify.hpp>
|
|
56
|
+
#include <boost/math/special_functions/log1p.hpp> // for log (1 + x)
|
|
57
|
+
#include <boost/math/constants/constants.hpp> // For exp_minus_one == 3.67879441171442321595523770161460867e-01.
|
|
58
|
+
#include <boost/math/special_functions/next.hpp> // for has_denorm_now
|
|
59
|
+
#include <boost/math/special_functions/pow.hpp> // powers with compile time exponent, used in arbitrary precision code.
|
|
60
|
+
#include <boost/math/tools/series.hpp> // series functor.
|
|
61
|
+
//#include <boost/math/tools/polynomial.hpp> // polynomial.
|
|
62
|
+
#include <boost/math/tools/rational.hpp> // evaluate_polynomial.
|
|
63
|
+
#include <boost/math/tools/precision.hpp> // boost::math::tools::max_value().
|
|
64
|
+
#include <boost/math/tools/big_constant.hpp>
|
|
65
|
+
#include <boost/math/tools/cxx03_warn.hpp>
|
|
66
|
+
|
|
67
|
+
#ifndef BOOST_MATH_STANDALONE
|
|
68
|
+
#include <boost/lexical_cast.hpp>
|
|
69
|
+
#endif
|
|
70
|
+
|
|
71
|
+
#include <limits>
|
|
72
|
+
#include <cmath>
|
|
73
|
+
#include <type_traits>
|
|
74
|
+
#include <cstdint>
|
|
75
|
+
|
|
76
|
+
// Needed for testing and diagnostics only.
|
|
77
|
+
//#include <iostream>
|
|
78
|
+
//#include <typeinfo>
|
|
79
|
+
#include <boost/math/special_functions/next.hpp> // For float_distance.
|
|
80
|
+
|
|
81
|
+
using lookup_t = double; // Type for lookup table (double or float, or even long double?)
|
|
82
|
+
|
|
83
|
+
//#include "J:\Cpp\Misc\lambert_w_lookup_table_generator\lambert_w_lookup_table.ipp"
|
|
84
|
+
// #include "lambert_w_lookup_table.ipp" // Boost.Math version.
|
|
85
|
+
#include <boost/math/special_functions/detail/lambert_w_lookup_table.ipp>
|
|
86
|
+
|
|
87
|
+
#if defined(__GNUC__) && defined(BOOST_MATH_USE_FLOAT128)
|
|
88
|
+
//
|
|
89
|
+
// This is the only way we can avoid
|
|
90
|
+
// warning: non-standard suffix on floating constant [-Wpedantic]
|
|
91
|
+
// when building with -Wall -pedantic. Neither __extension__
|
|
92
|
+
// nor #pragma diagnostic ignored work :(
|
|
93
|
+
//
|
|
94
|
+
#pragma GCC system_header
|
|
95
|
+
#endif
|
|
96
|
+
|
|
97
|
+
namespace boost {
|
|
98
|
+
namespace math {
|
|
99
|
+
namespace lambert_w_detail {
|
|
100
|
+
|
|
101
|
+
//! \brief Applies a single Halley step to make a better estimate of Lambert W.
|
|
102
|
+
//! \details Used the simplified formulae obtained from
|
|
103
|
+
//! http://www.wolframalpha.com/input/?i=%5B2(z+exp(z)-w)+d%2Fdx+(z+exp(z)-w)%5D+%2F+%5B2+(d%2Fdx+(z+exp(z)-w))%5E2+-+(z+exp(z)-w)+d%5E2%2Fdx%5E2+(z+exp(z)-w)%5D
|
|
104
|
+
//! [2(z exp(z)-w) d/dx (z exp(z)-w)] / [2 (d/dx (z exp(z)-w))^2 - (z exp(z)-w) d^2/dx^2 (z exp(z)-w)]
|
|
105
|
+
|
|
106
|
+
//! \tparam T floating-point (or fixed-point) type.
|
|
107
|
+
//! \param w_est Lambert W estimate.
|
|
108
|
+
//! \param z Argument z for Lambert_w function.
|
|
109
|
+
//! \returns New estimate of Lambert W, hopefully improved.
|
|
110
|
+
//!
|
|
111
|
+
template <typename T>
|
|
112
|
+
inline T lambert_w_halley_step(T w_est, const T z)
|
|
113
|
+
{
|
|
114
|
+
BOOST_MATH_STD_USING
|
|
115
|
+
T e = exp(w_est);
|
|
116
|
+
w_est -= 2 * (w_est + 1) * (e * w_est - z) / (z * (w_est + 2) + e * (w_est * (w_est + 2) + 2));
|
|
117
|
+
return w_est;
|
|
118
|
+
} // template <typename T> lambert_w_halley_step(T w_est, T z)
|
|
119
|
+
|
|
120
|
+
//! \brief Halley iterate to refine Lambert_w estimate,
|
|
121
|
+
//! taking at least one Halley_step.
|
|
122
|
+
//! Repeat Halley steps until the *last step* had fewer than half the digits wrong,
|
|
123
|
+
//! the step we've just taken should have been sufficient to have completed the iteration.
|
|
124
|
+
|
|
125
|
+
//! \tparam T floating-point (or fixed-point) type.
|
|
126
|
+
//! \param z Argument z for Lambert_w function.
|
|
127
|
+
//! \param w_est Lambert w estimate.
|
|
128
|
+
template <typename T>
|
|
129
|
+
inline T lambert_w_halley_iterate(T w_est, const T z)
|
|
130
|
+
{
|
|
131
|
+
BOOST_MATH_STD_USING
|
|
132
|
+
static const T max_diff = boost::math::tools::root_epsilon<T>() * fabs(w_est);
|
|
133
|
+
|
|
134
|
+
T w_new = lambert_w_halley_step(w_est, z);
|
|
135
|
+
T diff = fabs(w_est - w_new);
|
|
136
|
+
while (diff > max_diff)
|
|
137
|
+
{
|
|
138
|
+
w_est = w_new;
|
|
139
|
+
w_new = lambert_w_halley_step(w_est, z);
|
|
140
|
+
diff = fabs(w_est - w_new);
|
|
141
|
+
}
|
|
142
|
+
return w_new;
|
|
143
|
+
} // template <typename T> lambert_w_halley_iterate(T w_est, T z)
|
|
144
|
+
|
|
145
|
+
// Two Halley function versions that either
|
|
146
|
+
// single step (if std::false_type) or iterate (if std::true_type).
|
|
147
|
+
// Selected at compile-time using parameter 3.
|
|
148
|
+
template <typename T>
|
|
149
|
+
inline T lambert_w_maybe_halley_iterate(T z, T w, std::false_type const&)
|
|
150
|
+
{
|
|
151
|
+
return lambert_w_halley_step(z, w); // Single step.
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
template <typename T>
|
|
155
|
+
inline T lambert_w_maybe_halley_iterate(T z, T w, std::true_type const&)
|
|
156
|
+
{
|
|
157
|
+
return lambert_w_halley_iterate(z, w); // Iterate steps.
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
//! maybe_reduce_to_double function,
|
|
161
|
+
//! Two versions that have a compile-time option to
|
|
162
|
+
//! reduce argument z to double precision (if true_type).
|
|
163
|
+
//! Version is selected at compile-time using parameter 2.
|
|
164
|
+
|
|
165
|
+
template <typename T>
|
|
166
|
+
inline double maybe_reduce_to_double(const T& z, const std::true_type&)
|
|
167
|
+
{
|
|
168
|
+
return static_cast<double>(z); // Reduce to double precision.
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
template <typename T>
|
|
172
|
+
inline T maybe_reduce_to_double(const T& z, const std::false_type&)
|
|
173
|
+
{ // Don't reduce to double.
|
|
174
|
+
return z;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
template <typename T>
|
|
178
|
+
inline double must_reduce_to_double(const T& z, const std::true_type&)
|
|
179
|
+
{
|
|
180
|
+
return static_cast<double>(z); // Reduce to double precision.
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
template <typename T>
|
|
184
|
+
inline double must_reduce_to_double(const T& z, const std::false_type&)
|
|
185
|
+
{ // try a lexical_cast and hope for the best:
|
|
186
|
+
#ifndef BOOST_MATH_STANDALONE
|
|
187
|
+
|
|
188
|
+
#ifdef BOOST_MATH_USE_CHARCONV_FOR_CONVERSION
|
|
189
|
+
|
|
190
|
+
// Catches the C++23 floating point types
|
|
191
|
+
if constexpr (std::is_arithmetic_v<T>)
|
|
192
|
+
{
|
|
193
|
+
return static_cast<double>(z);
|
|
194
|
+
}
|
|
195
|
+
else
|
|
196
|
+
{
|
|
197
|
+
return boost::lexical_cast<double>(z);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
#else
|
|
201
|
+
|
|
202
|
+
return boost::lexical_cast<double>(z);
|
|
203
|
+
|
|
204
|
+
#endif
|
|
205
|
+
|
|
206
|
+
#else
|
|
207
|
+
static_assert(sizeof(T) == 0, "Unsupported in standalone mode: don't know how to cast your number type to a double.");
|
|
208
|
+
return 0.0;
|
|
209
|
+
#endif
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
//! \brief Schroeder method, fifth-order update formula,
|
|
213
|
+
//! \details See T. Fukushima page 80-81, and
|
|
214
|
+
//! A. Householder, The Numerical Treatment of a Single Nonlinear Equation,
|
|
215
|
+
//! McGraw-Hill, New York, 1970, section 4.4.
|
|
216
|
+
//! Fukushima algorithm switches to @c schroeder_update after pre-computed bisections,
|
|
217
|
+
//! chosen to ensure that the result will be achieve the +/- 10 epsilon target.
|
|
218
|
+
//! \param w Lambert w estimate from bisection or series.
|
|
219
|
+
//! \param y bracketing value from bisection.
|
|
220
|
+
//! \returns Refined estimate of Lambert w.
|
|
221
|
+
|
|
222
|
+
// Schroeder refinement, called unless NOT required by precision policy.
|
|
223
|
+
template<typename T>
|
|
224
|
+
inline T schroeder_update(const T w, const T y)
|
|
225
|
+
{
|
|
226
|
+
// Compute derivatives using 5th order Schroeder refinement.
|
|
227
|
+
// Since this is the final step, it will always use the highest precision type T.
|
|
228
|
+
// Example of Call:
|
|
229
|
+
// result = schroeder_update(w, y);
|
|
230
|
+
//where
|
|
231
|
+
// w is estimate of Lambert W (from bisection or series).
|
|
232
|
+
// y is z * e^-w.
|
|
233
|
+
|
|
234
|
+
BOOST_MATH_STD_USING // Aid argument dependent lookup of abs.
|
|
235
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SCHROEDER
|
|
236
|
+
std::streamsize saved_precision = std::cout.precision(std::numeric_limits<T>::max_digits10);
|
|
237
|
+
using boost::math::float_distance;
|
|
238
|
+
T fd = float_distance<T>(w, y);
|
|
239
|
+
std::cout << "Schroder ";
|
|
240
|
+
if (abs(fd) < 214748000.)
|
|
241
|
+
{
|
|
242
|
+
std::cout << " Distance = "<< static_cast<int>(fd);
|
|
243
|
+
}
|
|
244
|
+
else
|
|
245
|
+
{
|
|
246
|
+
std::cout << "Difference w - y = " << (w - y) << ".";
|
|
247
|
+
}
|
|
248
|
+
std::cout << std::endl;
|
|
249
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SCHROEDER
|
|
250
|
+
// Fukushima equation 18, page 6.
|
|
251
|
+
const T f0 = w - y; // f0 = w - y.
|
|
252
|
+
const T f1 = 1 + y; // f1 = df/dW
|
|
253
|
+
const T f00 = f0 * f0;
|
|
254
|
+
const T f11 = f1 * f1;
|
|
255
|
+
const T f0y = f0 * y;
|
|
256
|
+
const T result =
|
|
257
|
+
w - 4 * f0 * (6 * f1 * (f11 + f0y) + f00 * y) /
|
|
258
|
+
(f11 * (24 * f11 + 36 * f0y) +
|
|
259
|
+
f00 * (6 * y * y + 8 * f1 * y + f0y)); // Fukushima Page 81, equation 21 from equation 20.
|
|
260
|
+
|
|
261
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SCHROEDER
|
|
262
|
+
std::cout << "Schroeder refined " << w << " " << y << ", difference " << w-y << ", change " << w - result << ", to result " << result << std::endl;
|
|
263
|
+
std::cout.precision(saved_precision); // Restore.
|
|
264
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SCHROEDER
|
|
265
|
+
|
|
266
|
+
return result;
|
|
267
|
+
} // template<typename T = double> T schroeder_update(const T w, const T y)
|
|
268
|
+
|
|
269
|
+
//! \brief Series expansion used near the singularity/branch point z = -exp(-1) = -3.6787944.
|
|
270
|
+
//! Wolfram InverseSeries[Series[sqrt[2(p Exp[1 + p] + 1)], {p,-1, 20}]]
|
|
271
|
+
//! Wolfram command used to obtain 40 series terms at 50 decimal digit precision was
|
|
272
|
+
//! N[InverseSeries[Series[Sqrt[2(p Exp[1 + p] + 1)], { p,-1,40 }]], 50]
|
|
273
|
+
//! -1+p-p^2/3+(11 p^3)/72-(43 p^4)/540+(769 p^5)/17280-(221 p^6)/8505+(680863 p^7)/43545600 ...
|
|
274
|
+
//! Decimal values of specifications for built-in floating-point types below
|
|
275
|
+
//! are at least 21 digits precision == max_digits10 for long double.
|
|
276
|
+
//! Longer decimal digits strings are rationals evaluated using Wolfram.
|
|
277
|
+
|
|
278
|
+
template<typename T>
|
|
279
|
+
T lambert_w_singularity_series(const T p)
|
|
280
|
+
{
|
|
281
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SINGULARITY_SERIES
|
|
282
|
+
std::size_t saved_precision = std::cout.precision(3);
|
|
283
|
+
std::cout << "Singularity_series Lambert_w p argument = " << p << std::endl;
|
|
284
|
+
std::cout
|
|
285
|
+
//<< "Argument Type = " << typeid(T).name()
|
|
286
|
+
//<< ", max_digits10 = " << std::numeric_limits<T>::max_digits10
|
|
287
|
+
//<< ", epsilon = " << std::numeric_limits<T>::epsilon()
|
|
288
|
+
<< std::endl;
|
|
289
|
+
std::cout.precision(saved_precision);
|
|
290
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SINGULARITY_SERIES
|
|
291
|
+
|
|
292
|
+
static const T q[] =
|
|
293
|
+
{
|
|
294
|
+
-static_cast<T>(1), // j0
|
|
295
|
+
+T(1), // j1
|
|
296
|
+
-T(1) / 3, // 1/3 j2
|
|
297
|
+
+T(11) / 72, // 0.152777777777777778, // 11/72 j3
|
|
298
|
+
-T(43) / 540, // 0.0796296296296296296, // 43/540 j4
|
|
299
|
+
+T(769) / 17280, // 0.0445023148148148148, j5
|
|
300
|
+
-T(221) / 8505, // 0.0259847148736037625, j6
|
|
301
|
+
//+T(0.0156356325323339212L), // j7
|
|
302
|
+
//+T(0.015635632532333921222810111699000587889476778365667L), // j7 from Wolfram N[680863/43545600, 50]
|
|
303
|
+
+T(680863uLL) / 43545600uLL, // +0.0156356325323339212, j7
|
|
304
|
+
//-T(0.00961689202429943171L), // j8
|
|
305
|
+
-T(1963uLL) / 204120uLL, // 0.00961689202429943171, j8
|
|
306
|
+
//-T(0.0096168920242994317068391142465216539290613364687439L), // j8 from Wolfram N[1963/204120, 50]
|
|
307
|
+
+T(226287557uLL) / 37623398400uLL, // 0.00601454325295611786, j9
|
|
308
|
+
-T(5776369uLL) / 1515591000uLL, // 0.00381129803489199923, j10
|
|
309
|
+
//+T(0.00244087799114398267L), j11 0.0024408779911439826658968585286437530215699919795550
|
|
310
|
+
+T(169709463197uLL) / 69528040243200uLL, // j11
|
|
311
|
+
// -T(0.00157693034468678425L), // j12 -0.0015769303446867842539234095399314115973161850314723
|
|
312
|
+
-T(1118511313uLL) / 709296588000uLL, // j12
|
|
313
|
+
+T(667874164916771uLL) / 650782456676352000uLL, // j13
|
|
314
|
+
//+T(0.00102626332050760715L), // j13 0.0010262633205076071544375481533906861056468041465973
|
|
315
|
+
-T(500525573uLL) / 744761417400uLL, // j14
|
|
316
|
+
// -T(0.000672061631156136204L), j14
|
|
317
|
+
//+T(1003663334225097487uLL) / 234281684403486720000uLL, // j15 0.00044247306181462090993020760858473726479232802068800 error C2177: constant too big
|
|
318
|
+
//+T(0.000442473061814620910L, // j15
|
|
319
|
+
BOOST_MATH_BIG_CONSTANT(T, 64, +0.000442473061814620910), // j15
|
|
320
|
+
// -T(0.000292677224729627445L), // j16
|
|
321
|
+
BOOST_MATH_BIG_CONSTANT(T, 64, -0.000292677224729627445), // j16
|
|
322
|
+
//+T(0.000194387276054539318L), // j17
|
|
323
|
+
BOOST_MATH_BIG_CONSTANT(T, 64, 0.000194387276054539318), // j17
|
|
324
|
+
//-T(0.000129574266852748819L), // j18
|
|
325
|
+
BOOST_MATH_BIG_CONSTANT(T, 64, -0.000129574266852748819), // j18
|
|
326
|
+
//+T(0.0000866503580520812717L), // j19 N[+1150497127780071399782389/13277465363600276402995200000, 50] 0.000086650358052081271660451590462390293190597827783288
|
|
327
|
+
BOOST_MATH_BIG_CONSTANT(T, 64, +0.0000866503580520812717), // j19
|
|
328
|
+
//-T(0.0000581136075044138168L) // j20 N[2853534237182741069/49102686267859224000000, 50] 0.000058113607504413816772205464778828177256611844221913
|
|
329
|
+
// -T(2853534237182741069uLL) / 49102686267859224000000uLL // j20 // error C2177: constant too big,
|
|
330
|
+
// so must use BOOST_MATH_BIG_CONSTANT(T, ) format in hope of using suffix Q for quad or decimal digits string for others.
|
|
331
|
+
//-T(0.000058113607504413816772205464778828177256611844221913L), // j20 N[2853534237182741069/49102686267859224000000, 50] 0.000058113607504413816772205464778828177256611844221913
|
|
332
|
+
BOOST_MATH_BIG_CONSTANT(T, 113, -0.000058113607504413816772205464778828177256611844221913) // j20 - last used by Fukushima
|
|
333
|
+
// More terms don't seem to give any improvement (worse in fact) and are not use for many z values.
|
|
334
|
+
//BOOST_MATH_BIG_CONSTANT(T, +0.000039076684867439051635395583044527492132109160553593), // j21
|
|
335
|
+
//BOOST_MATH_BIG_CONSTANT(T, -0.000026338064747231098738584082718649443078703982217219), // j22
|
|
336
|
+
//BOOST_MATH_BIG_CONSTANT(T, +0.000017790345805079585400736282075184540383274460464169), // j23
|
|
337
|
+
//BOOST_MATH_BIG_CONSTANT(T, -0.000012040352739559976942274116578992585158113153190354), // j24
|
|
338
|
+
//BOOST_MATH_BIG_CONSTANT(T, +8.1635319824966121713827512573558687050675701559448E-6), // j25
|
|
339
|
+
//BOOST_MATH_BIG_CONSTANT(T, -5.5442032085673591366657251660804575198155559225316E-6) // j26
|
|
340
|
+
// -T(5.5442032085673591366657251660804575198155559225316E-6L) // j26
|
|
341
|
+
// 21 to 26 Added for long double.
|
|
342
|
+
}; // static const T q[]
|
|
343
|
+
|
|
344
|
+
/*
|
|
345
|
+
// Temporary copy of original double values for comparison; these are reproduced well.
|
|
346
|
+
static const T q[] =
|
|
347
|
+
{
|
|
348
|
+
-1L, // j0
|
|
349
|
+
+1L, // j1
|
|
350
|
+
-0.333333333333333333L, // 1/3 j2
|
|
351
|
+
+0.152777777777777778L, // 11/72 j3
|
|
352
|
+
-0.0796296296296296296L, // 43/540
|
|
353
|
+
+0.0445023148148148148L,
|
|
354
|
+
-0.0259847148736037625L,
|
|
355
|
+
+0.0156356325323339212L,
|
|
356
|
+
-0.00961689202429943171L,
|
|
357
|
+
+0.00601454325295611786L,
|
|
358
|
+
-0.00381129803489199923L,
|
|
359
|
+
+0.00244087799114398267L,
|
|
360
|
+
-0.00157693034468678425L,
|
|
361
|
+
+0.00102626332050760715L,
|
|
362
|
+
-0.000672061631156136204L,
|
|
363
|
+
+0.000442473061814620910L,
|
|
364
|
+
-0.000292677224729627445L,
|
|
365
|
+
+0.000194387276054539318L,
|
|
366
|
+
-0.000129574266852748819L,
|
|
367
|
+
+0.0000866503580520812717L,
|
|
368
|
+
-0.0000581136075044138168L // j20
|
|
369
|
+
};
|
|
370
|
+
*/
|
|
371
|
+
|
|
372
|
+
// Decide how many series terms to use, increasing as z approaches the singularity,
|
|
373
|
+
// balancing run-time versus computational noise from round-off.
|
|
374
|
+
// In practice, we truncate the series expansion at a certain order.
|
|
375
|
+
// If the order is too large, not only does the amount of computation increase,
|
|
376
|
+
// but also the round-off errors accumulate.
|
|
377
|
+
// See Fukushima equation 35, page 85 for logic of choice of number of series terms.
|
|
378
|
+
|
|
379
|
+
BOOST_MATH_STD_USING // Aid argument dependent lookup (ADL) of abs.
|
|
380
|
+
|
|
381
|
+
const T absp = abs(p);
|
|
382
|
+
|
|
383
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_TERMS
|
|
384
|
+
{
|
|
385
|
+
int terms = 20; // Default to using all terms.
|
|
386
|
+
if (absp < 0.01159)
|
|
387
|
+
{ // Very near singularity.
|
|
388
|
+
terms = 6;
|
|
389
|
+
}
|
|
390
|
+
else if (absp < 0.0766)
|
|
391
|
+
{ // Near singularity.
|
|
392
|
+
terms = 10;
|
|
393
|
+
}
|
|
394
|
+
std::streamsize saved_precision = std::cout.precision(3);
|
|
395
|
+
std::cout << "abs(p) = " << absp << ", terms = " << terms << std::endl;
|
|
396
|
+
std::cout.precision(saved_precision);
|
|
397
|
+
}
|
|
398
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_TERMS
|
|
399
|
+
|
|
400
|
+
if (absp < T(0.01159))
|
|
401
|
+
{ // Only 6 near-singularity series terms are useful.
|
|
402
|
+
return -1 + p * (1 + p * (q[2] + p * (q[3] + p * (q[4] + p * (q[5] + p * q[6])))));
|
|
403
|
+
}
|
|
404
|
+
else if (absp < T(0.0766)) // Use 10 near-singularity series terms.
|
|
405
|
+
{ // Use 10 near-singularity series terms.
|
|
406
|
+
return -1 + p * (1 + p * (q[2] + p * (q[3] + p * (q[4] + p * (q[5] + p * (q[6] + p * (q[7] + p * (q[8] + p * (q[9] + p * q[10])))))))));
|
|
407
|
+
}
|
|
408
|
+
// Use all 20 near-singularity series terms.
|
|
409
|
+
return -1 + p * (1 + p * (q[2] + p * (q[3] + p * (q[4] + p * (q[5] + p * (q[6] + p * (q[7] + p * (q[8] + p * (q[9] + p * (q[10] + p * (q[11] + p * (q[12] + p * (q[13] + p * (q[14] + p * (q[15] + p * (q[16] + p * (q[17] + p * (q[18] + p * (q[19] + p * q[20] /* Last Fukushima term.*/)))))))))))))))))));
|
|
410
|
+
// + // more terms for more precise T: long double ...
|
|
411
|
+
//// but makes almost no difference, so don't use more terms?
|
|
412
|
+
// p*q[21] +
|
|
413
|
+
// p*q[22] +
|
|
414
|
+
// p*q[23] +
|
|
415
|
+
// p*q[24] +
|
|
416
|
+
// p*q[25]
|
|
417
|
+
// )))))))))))))))))));
|
|
418
|
+
|
|
419
|
+
} // template<typename T = double> T lambert_w_singularity_series(const T p)
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
423
|
+
|
|
424
|
+
//! \brief Series expansion used near zero (abs(z) < 0.05).
|
|
425
|
+
//! \details
|
|
426
|
+
//! Coefficients of the inverted series expansion of the Lambert W function around z = 0.
|
|
427
|
+
//! Tosio Fukushima always uses all 17 terms of a Taylor series computed using Wolfram with
|
|
428
|
+
//! InverseSeries[Series[z Exp[z],{z,0,17}]]
|
|
429
|
+
//! Tosio Fukushima / Journal of Computational and Applied Mathematics 244 (2013) page 86.
|
|
430
|
+
|
|
431
|
+
//! Decimal values of specifications for built-in floating-point types below
|
|
432
|
+
//! are 21 digits precision == max_digits10 for long double.
|
|
433
|
+
//! Care! Some coefficients might overflow some fixed_point types.
|
|
434
|
+
|
|
435
|
+
//! This version is intended to allow use by user-defined types
|
|
436
|
+
//! like Boost.Multiprecision quad and cpp_dec_float types.
|
|
437
|
+
//! The three specializations below for built-in float, double
|
|
438
|
+
//! (and perhaps long double) will be chosen in preference for these types.
|
|
439
|
+
|
|
440
|
+
//! This version uses rationals computed by Wolfram as far as possible,
|
|
441
|
+
//! limited by maximum size of uLL integers.
|
|
442
|
+
//! For higher term, uses decimal digit strings computed by Wolfram up to the maximum possible using uLL rationals,
|
|
443
|
+
//! and then higher coefficients are computed as necessary using function lambert_w0_small_z_series_term
|
|
444
|
+
//! until the precision required by the policy is achieved.
|
|
445
|
+
//! InverseSeries[Series[z Exp[z],{z,0,34}]] also computed.
|
|
446
|
+
|
|
447
|
+
// Series evaluation for LambertW(z) as z -> 0.
|
|
448
|
+
// See http://functions.wolfram.com/ElementaryFunctions/ProductLog/06/01/01/0003/
|
|
449
|
+
// http://functions.wolfram.com/ElementaryFunctions/ProductLog/06/01/01/0003/MainEq1.L.gif
|
|
450
|
+
|
|
451
|
+
//! \brief lambert_w0_small_z uses a tag_type to select a variant depending on the size of the type.
|
|
452
|
+
//! The Lambert W is computed by lambert_w0_small_z for small z.
|
|
453
|
+
//! The cutoff for z smallness determined by Tosio Fukushima by trial and error is (abs(z) < 0.05),
|
|
454
|
+
//! but the optimum might be a function of the size of the type of z.
|
|
455
|
+
|
|
456
|
+
//! \details
|
|
457
|
+
//! The tag_type selection is based on the value @c std::numeric_limits<T>::max_digits10.
|
|
458
|
+
//! This allows distinguishing between long double types that commonly vary between 64 and 80-bits,
|
|
459
|
+
//! and also compilers that have a float type using 64 bits and/or long double using 128-bits.
|
|
460
|
+
//! It assumes that max_digits10 is defined correctly or this might fail to make the correct selection.
|
|
461
|
+
//! causing very small differences in computing lambert_w that would be very difficult to detect and diagnose.
|
|
462
|
+
//! Cannot switch on @c std::numeric_limits<>::max() because comparison values may overflow the compiler limit.
|
|
463
|
+
//! Cannot switch on @c std::numeric_limits<long double>::max_exponent10()
|
|
464
|
+
//! because both 80 and 128 bit floating-point implementations use 11 bits for the exponent.
|
|
465
|
+
//! So must rely on @c std::numeric_limits<long double>::max_digits10.
|
|
466
|
+
|
|
467
|
+
//! Specialization of float zero series expansion used for small z (abs(z) < 0.05).
|
|
468
|
+
//! Specializations of lambert_w0_small_z for built-in types.
|
|
469
|
+
//! These specializations should be chosen in preference to T version.
|
|
470
|
+
//! For example: lambert_w0_small_z(0.001F) should use the float version.
|
|
471
|
+
//! (Parameter Policy is not used by built-in types when all terms are used during an inline computation,
|
|
472
|
+
//! but for the tag_type selection to work, they all must include Policy in their signature.
|
|
473
|
+
|
|
474
|
+
// Forward declaration of variants of lambert_w0_small_z.
|
|
475
|
+
template <typename T, typename Policy>
|
|
476
|
+
T lambert_w0_small_z(T x, const Policy&, std::integral_constant<int, 0> const&); // for float (32-bit) type.
|
|
477
|
+
|
|
478
|
+
template <typename T, typename Policy>
|
|
479
|
+
T lambert_w0_small_z(T x, const Policy&, std::integral_constant<int, 1> const&); // for double (64-bit) type.
|
|
480
|
+
|
|
481
|
+
template <typename T, typename Policy>
|
|
482
|
+
T lambert_w0_small_z(T x, const Policy&, std::integral_constant<int, 2> const&); // for long double (double extended 80-bit) type.
|
|
483
|
+
|
|
484
|
+
template <typename T, typename Policy>
|
|
485
|
+
T lambert_w0_small_z(T x, const Policy&, std::integral_constant<int, 3> const&); // for long double (128-bit) type.
|
|
486
|
+
|
|
487
|
+
template <typename T, typename Policy>
|
|
488
|
+
T lambert_w0_small_z(T x, const Policy&, std::integral_constant<int, 4> const&); // for float128 quadmath Q type.
|
|
489
|
+
|
|
490
|
+
template <typename T, typename Policy>
|
|
491
|
+
T lambert_w0_small_z(T x, const Policy&, std::integral_constant<int, 5> const&); // Generic multiprecision T.
|
|
492
|
+
// Set tag_type depending on max_digits10.
|
|
493
|
+
template <typename T, typename Policy>
|
|
494
|
+
T lambert_w0_small_z(T x, const Policy& pol)
|
|
495
|
+
{ //std::numeric_limits<T>::max_digits10 == 36 ? 3 : // 128-bit long double.
|
|
496
|
+
using tag_type = std::integral_constant<int,
|
|
497
|
+
std::numeric_limits<T>::is_specialized == 0 ? 5 :
|
|
498
|
+
#ifndef BOOST_NO_CXX11_NUMERIC_LIMITS
|
|
499
|
+
std::numeric_limits<T>::max_digits10 <= 9 ? 0 : // for float 32-bit.
|
|
500
|
+
std::numeric_limits<T>::max_digits10 <= 17 ? 1 : // for double 64-bit.
|
|
501
|
+
std::numeric_limits<T>::max_digits10 <= 22 ? 2 : // for 80-bit double extended.
|
|
502
|
+
std::numeric_limits<T>::max_digits10 < 37 ? 4 // for both 128-bit long double (3) and 128-bit quad suffix Q type (4).
|
|
503
|
+
#else
|
|
504
|
+
std::numeric_limits<T>::radix != 2 ? 5 :
|
|
505
|
+
std::numeric_limits<T>::digits <= 24 ? 0 : // for float 32-bit.
|
|
506
|
+
std::numeric_limits<T>::digits <= 53 ? 1 : // for double 64-bit.
|
|
507
|
+
std::numeric_limits<T>::digits <= 64 ? 2 : // for 80-bit double extended.
|
|
508
|
+
std::numeric_limits<T>::digits <= 113 ? 4 // for both 128-bit long double (3) and 128-bit quad suffix Q type (4).
|
|
509
|
+
#endif
|
|
510
|
+
: 5>; // All Generic multiprecision types.
|
|
511
|
+
// std::cout << "\ntag type = " << tag_type << std::endl; // error C2275: 'tag_type': illegal use of this type as an expression.
|
|
512
|
+
return lambert_w0_small_z(x, pol, tag_type());
|
|
513
|
+
} // template <typename T> T lambert_w0_small_z(T x)
|
|
514
|
+
|
|
515
|
+
//! Specialization of float (32-bit) series expansion used for small z (abs(z) < 0.05).
|
|
516
|
+
// Only 9 Coefficients are computed to 21 decimal digits precision, ample for 32-bit float used by most platforms.
|
|
517
|
+
// Taylor series coefficients used are computed by Wolfram to 50 decimal digits using instruction
|
|
518
|
+
// N[InverseSeries[Series[z Exp[z],{z,0,34}]],50],
|
|
519
|
+
// as proposed by Tosio Fukushima and implemented by Darko Veberic.
|
|
520
|
+
|
|
521
|
+
template <typename T, typename Policy>
|
|
522
|
+
T lambert_w0_small_z(T z, const Policy&, std::integral_constant<int, 0> const&)
|
|
523
|
+
{
|
|
524
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
525
|
+
std::streamsize prec = std::cout.precision(std::numeric_limits<T>::max_digits10); // Save.
|
|
526
|
+
std::cout << "\ntag_type 0 float lambert_w0_small_z called with z = " << z << " using " << 9 << " terms of precision "
|
|
527
|
+
<< std::numeric_limits<float>::max_digits10 << " decimal digits. " << std::endl;
|
|
528
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
529
|
+
T result =
|
|
530
|
+
z * (1 - // j1 z^1 term = 1
|
|
531
|
+
z * (1 - // j2 z^2 term = -1
|
|
532
|
+
z * (static_cast<float>(3uLL) / 2uLL - // 3/2 // j3 z^3 term = 1.5.
|
|
533
|
+
z * (2.6666666666666666667F - // 8/3 // j4
|
|
534
|
+
z * (5.2083333333333333333F - // -125/24 // j5
|
|
535
|
+
z * (10.8F - // j6
|
|
536
|
+
z * (23.343055555555555556F - // j7
|
|
537
|
+
z * (52.012698412698412698F - // j8
|
|
538
|
+
z * 118.62522321428571429F)))))))); // j9
|
|
539
|
+
|
|
540
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
541
|
+
std::cout << "return w = " << result << std::endl;
|
|
542
|
+
std::cout.precision(prec); // Restore.
|
|
543
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
544
|
+
|
|
545
|
+
return result;
|
|
546
|
+
} // template <typename T> T lambert_w0_small_z(T x, std::integral_constant<int, 0> const&)
|
|
547
|
+
|
|
548
|
+
//! Specialization of double (64-bit double) series expansion used for small z (abs(z) < 0.05).
|
|
549
|
+
// 17 Coefficients are computed to 21 decimal digits precision suitable for 64-bit double used by most platforms.
|
|
550
|
+
// Taylor series coefficients used are computed by Wolfram to 50 decimal digits using instruction
|
|
551
|
+
// N[InverseSeries[Series[z Exp[z],{z,0,34}]],50], as proposed by Tosio Fukushima and implemented by Veberic.
|
|
552
|
+
|
|
553
|
+
template <typename T, typename Policy>
|
|
554
|
+
T lambert_w0_small_z(const T z, const Policy&, std::integral_constant<int, 1> const&)
|
|
555
|
+
{
|
|
556
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
557
|
+
std::streamsize prec = std::cout.precision(std::numeric_limits<T>::max_digits10); // Save.
|
|
558
|
+
std::cout << "\ntag_type 1 double lambert_w0_small_z called with z = " << z << " using " << 17 << " terms of precision, "
|
|
559
|
+
<< std::numeric_limits<double>::max_digits10 << " decimal digits. " << std::endl;
|
|
560
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
561
|
+
T result =
|
|
562
|
+
z * (1. - // j1 z^1
|
|
563
|
+
z * (1. - // j2 z^2
|
|
564
|
+
z * (1.5 - // 3/2 // j3 z^3
|
|
565
|
+
z * (2.6666666666666666667 - // 8/3 // j4
|
|
566
|
+
z * (5.2083333333333333333 - // -125/24 // j5
|
|
567
|
+
z * (10.8 - // j6
|
|
568
|
+
z * (23.343055555555555556 - // j7
|
|
569
|
+
z * (52.012698412698412698 - // j8
|
|
570
|
+
z * (118.62522321428571429 - // j9
|
|
571
|
+
z * (275.57319223985890653 - // j10
|
|
572
|
+
z * (649.78717234347442681 - // j11
|
|
573
|
+
z * (1551.1605194805194805 - // j12
|
|
574
|
+
z * (3741.4497029592385495 - // j13
|
|
575
|
+
z * (9104.5002411580189358 - // j14
|
|
576
|
+
z * (22324.308512706601434 - // j15
|
|
577
|
+
z * (55103.621972903835338 - // j16
|
|
578
|
+
z * 136808.86090394293563)))))))))))))))); // j17 z^17
|
|
579
|
+
|
|
580
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
581
|
+
std::cout << "return w = " << result << std::endl;
|
|
582
|
+
std::cout.precision(prec); // Restore.
|
|
583
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
584
|
+
|
|
585
|
+
return result;
|
|
586
|
+
} // T lambert_w0_small_z(const T z, std::integral_constant<int, 1> const&)
|
|
587
|
+
|
|
588
|
+
//! Specialization of long double (80-bit double extended) series expansion used for small z (abs(z) < 0.05).
|
|
589
|
+
// 21 Coefficients are computed to 21 decimal digits precision suitable for 80-bit long double used by some
|
|
590
|
+
// platforms including GCC and Clang when generating for Intel X86 floating-point processors with 80-bit operations enabled (the default).
|
|
591
|
+
// (This is NOT used by Microsoft Visual Studio where double and long always both use only 64-bit type.
|
|
592
|
+
// Nor used for 128-bit float128.)
|
|
593
|
+
template <typename T, typename Policy>
|
|
594
|
+
T lambert_w0_small_z(const T z, const Policy&, std::integral_constant<int, 2> const&)
|
|
595
|
+
{
|
|
596
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
597
|
+
std::streamsize precision = std::cout.precision(std::numeric_limits<T>::max_digits10); // Save.
|
|
598
|
+
std::cout << "\ntag_type 2 long double (80-bit double extended) lambert_w0_small_z called with z = " << z << " using " << 21 << " terms of precision, "
|
|
599
|
+
<< std::numeric_limits<long double>::max_digits10 << " decimal digits. " << std::endl;
|
|
600
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
601
|
+
// T result =
|
|
602
|
+
// z * (1.L - // j1 z^1
|
|
603
|
+
// z * (1.L - // j2 z^2
|
|
604
|
+
// z * (1.5L - // 3/2 // j3
|
|
605
|
+
// z * (2.6666666666666666667L - // 8/3 // j4
|
|
606
|
+
// z * (5.2083333333333333333L - // -125/24 // j5
|
|
607
|
+
// z * (10.800000000000000000L - // j6
|
|
608
|
+
// z * (23.343055555555555556L - // j7
|
|
609
|
+
// z * (52.012698412698412698L - // j8
|
|
610
|
+
// z * (118.62522321428571429L - // j9
|
|
611
|
+
// z * (275.57319223985890653L - // j10
|
|
612
|
+
// z * (649.78717234347442681L - // j11
|
|
613
|
+
// z * (1551.1605194805194805L - // j12
|
|
614
|
+
// z * (3741.4497029592385495L - // j13
|
|
615
|
+
// z * (9104.5002411580189358L - // j14
|
|
616
|
+
// z * (22324.308512706601434L - // j15
|
|
617
|
+
// z * (55103.621972903835338L - // j16
|
|
618
|
+
// z * (136808.86090394293563L - // j17 z^17 last term used by Fukushima double.
|
|
619
|
+
// z * (341422.050665838363317L - // z^18
|
|
620
|
+
// z * (855992.9659966075514633L - // z^19
|
|
621
|
+
// z * (2.154990206091088289321e6L - // z^20
|
|
622
|
+
// z * 5.4455529223144624316423e6L // z^21
|
|
623
|
+
// ))))))))))))))))))));
|
|
624
|
+
//
|
|
625
|
+
|
|
626
|
+
T result =
|
|
627
|
+
z * (1.L - // z j1
|
|
628
|
+
z * (1.L - // z^2
|
|
629
|
+
z * (1.500000000000000000000000000000000L - // z^3
|
|
630
|
+
z * (2.666666666666666666666666666666666L - // z ^ 4
|
|
631
|
+
z * (5.208333333333333333333333333333333L - // z ^ 5
|
|
632
|
+
z * (10.80000000000000000000000000000000L - // z ^ 6
|
|
633
|
+
z * (23.34305555555555555555555555555555L - // z ^ 7
|
|
634
|
+
z * (52.01269841269841269841269841269841L - // z ^ 8
|
|
635
|
+
z * (118.6252232142857142857142857142857L - // z ^ 9
|
|
636
|
+
z * (275.5731922398589065255731922398589L - // z ^ 10
|
|
637
|
+
z * (649.7871723434744268077601410934744L - // z ^ 11
|
|
638
|
+
z * (1551.160519480519480519480519480519L - // z ^ 12
|
|
639
|
+
z * (3741.449702959238549516327294105071L - //z ^ 13
|
|
640
|
+
z * (9104.500241158018935796713574491352L - // z ^ 14
|
|
641
|
+
z * (22324.308512706601434280005708577137L - // z ^ 15
|
|
642
|
+
z * (55103.621972903835337697771560205422L - // z ^ 16
|
|
643
|
+
z * (136808.86090394293563342215789305736L - // z ^ 17
|
|
644
|
+
z * (341422.05066583836331735491399356945L - // z^18
|
|
645
|
+
z * (855992.9659966075514633630250633224L - // z^19
|
|
646
|
+
z * (2.154990206091088289321708745358647e6L // z^20 distance -5 without term 20
|
|
647
|
+
))))))))))))))))))));
|
|
648
|
+
|
|
649
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
650
|
+
std::cout << "return w = " << result << std::endl;
|
|
651
|
+
std::cout.precision(precision); // Restore.
|
|
652
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
653
|
+
return result;
|
|
654
|
+
} // long double lambert_w0_small_z(const T z, std::integral_constant<int, 1> const&)
|
|
655
|
+
|
|
656
|
+
//! Specialization of 128-bit long double series expansion used for small z (abs(z) < 0.05).
|
|
657
|
+
// 34 Taylor series coefficients used are computed by Wolfram to 50 decimal digits using instruction
|
|
658
|
+
// N[InverseSeries[Series[z Exp[z],{z,0,34}]],50],
|
|
659
|
+
// and are suffixed by L as they are assumed of type long double.
|
|
660
|
+
// (This is NOT used for 128-bit quad boost::multiprecision::float128 type which required a suffix Q
|
|
661
|
+
// nor multiprecision type cpp_bin_float_quad that can only be initialized at full precision of the type
|
|
662
|
+
// constructed with a decimal digit string like "2.6666666666666666666666666666666666666666666666667".)
|
|
663
|
+
|
|
664
|
+
template <typename T, typename Policy>
|
|
665
|
+
T lambert_w0_small_z(const T z, const Policy&, std::integral_constant<int, 3> const&)
|
|
666
|
+
{
|
|
667
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
668
|
+
std::streamsize precision = std::cout.precision(std::numeric_limits<T>::max_digits10); // Save.
|
|
669
|
+
std::cout << "\ntag_type 3 long double (128-bit) lambert_w0_small_z called with z = " << z << " using " << 17 << " terms of precision, "
|
|
670
|
+
<< std::numeric_limits<double>::max_digits10 << " decimal digits. " << std::endl;
|
|
671
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
672
|
+
T result =
|
|
673
|
+
z * (1.L - // j1
|
|
674
|
+
z * (1.L - // j2
|
|
675
|
+
z * (1.5L - // 3/2 // j3
|
|
676
|
+
z * (2.6666666666666666666666666666666666L - // 8/3 // j4
|
|
677
|
+
z * (5.2052083333333333333333333333333333L - // -125/24 // j5
|
|
678
|
+
z * (10.800000000000000000000000000000000L - // j6
|
|
679
|
+
z * (23.343055555555555555555555555555555L - // j7
|
|
680
|
+
z * (52.0126984126984126984126984126984126L - // j8
|
|
681
|
+
z * (118.625223214285714285714285714285714L - // j9
|
|
682
|
+
z * (275.57319223985890652557319223985890L - // * z ^ 10 - // j10
|
|
683
|
+
z * (649.78717234347442680776014109347442680776014109347L - // j11
|
|
684
|
+
z * (1551.1605194805194805194805194805194805194805194805L - // j12
|
|
685
|
+
z * (3741.4497029592385495163272941050718828496606274384L - // j13
|
|
686
|
+
z * (9104.5002411580189357967135744913522691300469078247L - // j14
|
|
687
|
+
z * (22324.308512706601434280005708577137148565719994291L - // j15
|
|
688
|
+
z * (55103.621972903835337697771560205422639285073147507L - // j16
|
|
689
|
+
z * 136808.86090394293563342215789305736395683485630576L // j17
|
|
690
|
+
))))))))))))))));
|
|
691
|
+
|
|
692
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
693
|
+
std::cout << "return w = " << result << std::endl;
|
|
694
|
+
std::cout.precision(precision); // Restore.
|
|
695
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
696
|
+
return result;
|
|
697
|
+
} // T lambert_w0_small_z(const T z, std::integral_constant<int, 3> const&)
|
|
698
|
+
|
|
699
|
+
//! Specialization of 128-bit quad series expansion used for small z (abs(z) < 0.05).
|
|
700
|
+
// 34 Taylor series coefficients used were computed by Wolfram to 50 decimal digits using instruction
|
|
701
|
+
// N[InverseSeries[Series[z Exp[z],{z,0,34}]],50],
|
|
702
|
+
// and are suffixed by Q as they are assumed of type quad.
|
|
703
|
+
// This could be used for 128-bit quad (which requires a suffix Q for full precision).
|
|
704
|
+
// But experiments with GCC 7.2.0 show that while this gives full 128-bit precision
|
|
705
|
+
// when the -f-ext-numeric-literals option is in force and the libquadmath library available,
|
|
706
|
+
// over the range -0.049 to +0.049,
|
|
707
|
+
// it is slightly slower than getting a double approximation followed by a single Halley step.
|
|
708
|
+
|
|
709
|
+
#ifdef BOOST_HAS_FLOAT128
|
|
710
|
+
template <typename T, typename Policy>
|
|
711
|
+
T lambert_w0_small_z(const T z, const Policy&, std::integral_constant<int, 4> const&)
|
|
712
|
+
{
|
|
713
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
714
|
+
std::streamsize precision = std::cout.precision(std::numeric_limits<T>::max_digits10); // Save.
|
|
715
|
+
std::cout << "\ntag_type 4 128-bit quad float128 lambert_w0_small_z called with z = " << z << " using " << 34 << " terms of precision, "
|
|
716
|
+
<< std::numeric_limits<float128>::max_digits10 << " max decimal digits." << std::endl;
|
|
717
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
718
|
+
T result =
|
|
719
|
+
z * (1.Q - // z j1
|
|
720
|
+
z * (1.Q - // z^2
|
|
721
|
+
z * (1.500000000000000000000000000000000Q - // z^3
|
|
722
|
+
z * (2.666666666666666666666666666666666Q - // z ^ 4
|
|
723
|
+
z * (5.208333333333333333333333333333333Q - // z ^ 5
|
|
724
|
+
z * (10.80000000000000000000000000000000Q - // z ^ 6
|
|
725
|
+
z * (23.34305555555555555555555555555555Q - // z ^ 7
|
|
726
|
+
z * (52.01269841269841269841269841269841Q - // z ^ 8
|
|
727
|
+
z * (118.6252232142857142857142857142857Q - // z ^ 9
|
|
728
|
+
z * (275.5731922398589065255731922398589Q - // z ^ 10
|
|
729
|
+
z * (649.7871723434744268077601410934744Q - // z ^ 11
|
|
730
|
+
z * (1551.160519480519480519480519480519Q - // z ^ 12
|
|
731
|
+
z * (3741.449702959238549516327294105071Q - //z ^ 13
|
|
732
|
+
z * (9104.500241158018935796713574491352Q - // z ^ 14
|
|
733
|
+
z * (22324.308512706601434280005708577137Q - // z ^ 15
|
|
734
|
+
z * (55103.621972903835337697771560205422Q - // z ^ 16
|
|
735
|
+
z * (136808.86090394293563342215789305736Q - // z ^ 17
|
|
736
|
+
z * (341422.05066583836331735491399356945Q - // z^18
|
|
737
|
+
z * (855992.9659966075514633630250633224Q - // z^19
|
|
738
|
+
z * (2.154990206091088289321708745358647e6Q - // 20
|
|
739
|
+
z * (5.445552922314462431642316420035073e6Q - // 21
|
|
740
|
+
z * (1.380733000216662949061923813184508e7Q - // 22
|
|
741
|
+
z * (3.511704498513923292853869855945334e7Q - // 23
|
|
742
|
+
z * (8.956800256102797693072819557780090e7Q - // 24
|
|
743
|
+
z * (2.290416846187949813964782641734774e8Q - // 25
|
|
744
|
+
z * (5.871035041171798492020292225245235e8Q - // 26
|
|
745
|
+
z * (1.508256053857792919641317138812957e9Q - // 27
|
|
746
|
+
z * (3.882630161293188940385873468413841e9Q - // 28
|
|
747
|
+
z * (1.001394313665482968013913601565723e10Q - // 29
|
|
748
|
+
z * (2.587356736265760638992878359024929e10Q - // 30
|
|
749
|
+
z * (6.696209709358073856946120522333454e10Q - // 31
|
|
750
|
+
z * (1.735711659599198077777078238043644e11Q - // 32
|
|
751
|
+
z * (4.505680465642353886756098108484670e11Q - // 33
|
|
752
|
+
z * (1.171223178256487391904047636564823e12Q //z^34
|
|
753
|
+
))))))))))))))))))))))))))))))))));
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
757
|
+
std::cout << "return w = " << result << std::endl;
|
|
758
|
+
std::cout.precision(precision); // Restore.
|
|
759
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
760
|
+
|
|
761
|
+
return result;
|
|
762
|
+
} // T lambert_w0_small_z(const T z, std::integral_constant<int, 4> const&) float128
|
|
763
|
+
|
|
764
|
+
#else
|
|
765
|
+
|
|
766
|
+
template <typename T, typename Policy>
|
|
767
|
+
inline T lambert_w0_small_z(const T z, const Policy& pol, std::integral_constant<int, 4> const&) // LCOV_EXCL_LINE body is covered, strangley this line is not.
|
|
768
|
+
{
|
|
769
|
+
return lambert_w0_small_z(z, pol, std::integral_constant<int, 5>());
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
#endif // BOOST_HAS_FLOAT128
|
|
773
|
+
|
|
774
|
+
//! Series functor to compute series term using pow and factorial.
|
|
775
|
+
//! \details Functor is called after evaluating polynomial with the coefficients as rationals below.
|
|
776
|
+
template <typename T>
|
|
777
|
+
struct lambert_w0_small_z_series_term
|
|
778
|
+
{
|
|
779
|
+
using result_type = T;
|
|
780
|
+
//! \param _z Lambert W argument z.
|
|
781
|
+
//! \param -term -pow<18>(z) / 6402373705728000uLL
|
|
782
|
+
//! \param _k number of terms == initially 18
|
|
783
|
+
|
|
784
|
+
// Note *after* evaluating N terms, its internal state has k = N and term = (-1)^N z^N.
|
|
785
|
+
|
|
786
|
+
lambert_w0_small_z_series_term(T _z, T _term, int _k)
|
|
787
|
+
: k(_k), z(_z), term(_term) { }
|
|
788
|
+
|
|
789
|
+
T operator()()
|
|
790
|
+
{ // Called by sum_series until needs precision set by factor (policy::get_epsilon).
|
|
791
|
+
using std::pow;
|
|
792
|
+
++k;
|
|
793
|
+
term *= -z / k;
|
|
794
|
+
//T t = pow(z, k) * pow(T(k), -1 + k) / factorial<T>(k); // (z^k * k(k-1)^k) / k!
|
|
795
|
+
T result = term * pow(T(k), T(-1 + k)); // term * k^(k-1)
|
|
796
|
+
// std::cout << " k = " << k << ", term = " << term << ", result = " << result << std::endl;
|
|
797
|
+
return result; //
|
|
798
|
+
}
|
|
799
|
+
private:
|
|
800
|
+
int k;
|
|
801
|
+
T z;
|
|
802
|
+
T term;
|
|
803
|
+
}; // template <typename T> struct lambert_w0_small_z_series_term
|
|
804
|
+
|
|
805
|
+
//! Generic variant for T a User-defined types like Boost.Multiprecision.
|
|
806
|
+
template <typename T, typename Policy>
|
|
807
|
+
inline T lambert_w0_small_z(T z, const Policy& pol, std::integral_constant<int, 5> const&)
|
|
808
|
+
{
|
|
809
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
810
|
+
std::streamsize precision = std::cout.precision(std::numeric_limits<T>::max_digits10); // Save.
|
|
811
|
+
std::cout << "Generic lambert_w0_small_z called with z = " << z << " using as many terms needed for precision." << std::endl;
|
|
812
|
+
std::cout << "Argument z is of type " << typeid(T).name() << std::endl;
|
|
813
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
814
|
+
|
|
815
|
+
// First several terms of the series are tabulated and evaluated as a polynomial:
|
|
816
|
+
// this will save us a bunch of expensive calls to pow.
|
|
817
|
+
// Then our series functor is initialized "as if" it had already reached term 18,
|
|
818
|
+
// enough evaluation of built-in 64-bit double and float (and 80-bit long double?) types.
|
|
819
|
+
|
|
820
|
+
// Coefficients should be stored such that the coefficients for the x^i terms are in poly[i].
|
|
821
|
+
static const T coeff[] =
|
|
822
|
+
{
|
|
823
|
+
0, // z^0 Care: zeroth term needed by tools::evaluate_polynomial, but not in the Wolfram equation, so indexes are one different!
|
|
824
|
+
1, // z^1 term.
|
|
825
|
+
-1, // z^2 term
|
|
826
|
+
static_cast<T>(3uLL) / 2uLL, // z^3 term.
|
|
827
|
+
-static_cast<T>(8uLL) / 3uLL, // z^4
|
|
828
|
+
static_cast<T>(125uLL) / 24uLL, // z^5
|
|
829
|
+
-static_cast<T>(54uLL) / 5uLL, // z^6
|
|
830
|
+
static_cast<T>(16807uLL) / 720uLL, // z^7
|
|
831
|
+
-static_cast<T>(16384uLL) / 315uLL, // z^8
|
|
832
|
+
static_cast<T>(531441uLL) / 4480uLL, // z^9
|
|
833
|
+
-static_cast<T>(156250uLL) / 567uLL, // z^10
|
|
834
|
+
static_cast<T>(2357947691uLL) / 3628800uLL, // z^11
|
|
835
|
+
-static_cast<T>(2985984uLL) / 1925uLL, // z^12
|
|
836
|
+
static_cast<T>(1792160394037uLL) / 479001600uLL, // z^13
|
|
837
|
+
-static_cast<T>(7909306972uLL) / 868725uLL, // z^14
|
|
838
|
+
static_cast<T>(320361328125uLL) / 14350336uLL, // z^15
|
|
839
|
+
-static_cast<T>(35184372088832uLL) / 638512875uLL, // z^16
|
|
840
|
+
static_cast<T>(2862423051509815793uLL) / 20922789888000uLL, // z^17 term
|
|
841
|
+
-static_cast<T>(5083731656658uLL) / 14889875uLL,
|
|
842
|
+
// z^18 term. = 136808.86090394293563342215789305735851647769682393
|
|
843
|
+
|
|
844
|
+
// z^18 is biggest that can be computed as rational using the largest possible uLL integers,
|
|
845
|
+
// so higher terms cannot be potentially compiler-computed as uLL rationals.
|
|
846
|
+
// Wolfram (5083731656658 z ^ 18) / 14889875 or
|
|
847
|
+
// -341422.05066583836331735491399356945575432970390954 z^18
|
|
848
|
+
|
|
849
|
+
// See note below calling the functor to compute another term,
|
|
850
|
+
// sufficient for 80-bit long double precision.
|
|
851
|
+
// Wolfram -341422.05066583836331735491399356945575432970390954 z^19 term.
|
|
852
|
+
// (5480386857784802185939 z^19)/6402373705728000
|
|
853
|
+
// But now this variant is not used to compute long double
|
|
854
|
+
// as specializations are provided above.
|
|
855
|
+
}; // static const T coeff[]
|
|
856
|
+
|
|
857
|
+
/*
|
|
858
|
+
Table of 19 computed coefficients:
|
|
859
|
+
|
|
860
|
+
#0 0
|
|
861
|
+
#1 1
|
|
862
|
+
#2 -1
|
|
863
|
+
#3 1.5
|
|
864
|
+
#4 -2.6666666666666666666666666666666665382713370408509
|
|
865
|
+
#5 5.2083333333333333333333333333333330765426740817019
|
|
866
|
+
#6 -10.800000000000000000000000000000000616297582203915
|
|
867
|
+
#7 23.343055555555555555555555555555555076212991619177
|
|
868
|
+
#8 -52.012698412698412698412698412698412659282693193402
|
|
869
|
+
#9 118.62522321428571428571428571428571146835390992496
|
|
870
|
+
#10 -275.57319223985890652557319223985891400375196748314
|
|
871
|
+
#11 649.7871723434744268077601410934743969785223845882
|
|
872
|
+
#12 -1551.1605194805194805194805194805194947599566007429
|
|
873
|
+
#13 3741.4497029592385495163272941050719510009019331763
|
|
874
|
+
#14 -9104.5002411580189357967135744913524243896052869184
|
|
875
|
+
#15 22324.308512706601434280005708577137322392070452582
|
|
876
|
+
#16 -55103.621972903835337697771560205423203318720697224
|
|
877
|
+
#17 136808.86090394293563342215789305735851647769682393
|
|
878
|
+
136808.86090394293563342215789305735851647769682393 == Exactly same as Wolfram computed value.
|
|
879
|
+
#18 -341422.05066583836331735491399356947486381600607416
|
|
880
|
+
341422.05066583836331735491399356945575432970390954 z^19 Wolfram value differs at 36 decimal digit, as expected.
|
|
881
|
+
*/
|
|
882
|
+
|
|
883
|
+
using boost::math::policies::get_epsilon; // for type T.
|
|
884
|
+
using boost::math::tools::sum_series;
|
|
885
|
+
using boost::math::tools::evaluate_polynomial;
|
|
886
|
+
// http://www.boost.org/doc/libs/release/libs/math/doc/html/math_toolkit/roots/rational.html
|
|
887
|
+
|
|
888
|
+
// std::streamsize prec = std::cout.precision(std::numeric_limits <T>::max_digits10);
|
|
889
|
+
|
|
890
|
+
T result = evaluate_polynomial(coeff, z); // LCOV_EXCL_LINE next line covered but not this one strangely - GCOV SNAFU?
|
|
891
|
+
// template <std::size_t N, typename T, typename V>
|
|
892
|
+
// V evaluate_polynomial(const T(&poly)[N], const V& val);
|
|
893
|
+
// Size of coeff found from N
|
|
894
|
+
//std::cout << "evaluate_polynomial(coeff, z); == " << result << std::endl;
|
|
895
|
+
//std::cout << "result = " << result << std::endl;
|
|
896
|
+
// It's an artefact of the way I wrote the functor: *after* evaluating N
|
|
897
|
+
// terms, its internal state has k = N and term = (-1)^N z^N. So after
|
|
898
|
+
// evaluating 18 terms, we initialize the functor to the term we've just
|
|
899
|
+
// evaluated, and then when it's called, it increments itself to the next term.
|
|
900
|
+
// So 18!is 6402373705728000, which is where that comes from.
|
|
901
|
+
|
|
902
|
+
// The 19th coefficient of the polynomial is actually, 19 ^ 18 / 19!=
|
|
903
|
+
// 104127350297911241532841 / 121645100408832000 which after removing GCDs
|
|
904
|
+
// reduces down to Wolfram rational 5480386857784802185939 / 6402373705728000.
|
|
905
|
+
// Wolfram z^19 term +(5480386857784802185939 z^19) /6402373705728000
|
|
906
|
+
// +855992.96599660755146336302506332246623424823099755 z^19
|
|
907
|
+
|
|
908
|
+
//! Evaluate Functor.
|
|
909
|
+
lambert_w0_small_z_series_term<T> s(z, -pow<18>(z) / 6402373705728000uLL, 18);
|
|
910
|
+
|
|
911
|
+
// Temporary to list the coefficients.
|
|
912
|
+
//std::cout << " Table of coefficients" << std::endl;
|
|
913
|
+
//std::streamsize saved_precision = std::cout.precision(50);
|
|
914
|
+
//for (size_t i = 0; i != 19; i++)
|
|
915
|
+
//{
|
|
916
|
+
// std::cout << "#" << i << " " << coeff[i] << std::endl;
|
|
917
|
+
//}
|
|
918
|
+
//std::cout.precision(saved_precision);
|
|
919
|
+
|
|
920
|
+
std::uintmax_t max_iter = policies::get_max_series_iterations<Policy>(); // Max iterations from policy.
|
|
921
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
922
|
+
std::cout << "max iter from policy = " << max_iter << std::endl;
|
|
923
|
+
// // max iter from policy = 1000000 is default.
|
|
924
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES
|
|
925
|
+
|
|
926
|
+
result = sum_series(s, get_epsilon<T, Policy>(), max_iter, result);
|
|
927
|
+
// result == evaluate_polynomial.
|
|
928
|
+
//sum_series(Functor& func, int bits, std::uintmax_t& max_terms, const U& init_value)
|
|
929
|
+
// std::cout << "sum_series(s, get_epsilon<T, Policy>(), max_iter, result); = " << result << std::endl;
|
|
930
|
+
|
|
931
|
+
//T epsilon = get_epsilon<T, Policy>();
|
|
932
|
+
//std::cout << "epsilon from policy = " << epsilon << std::endl;
|
|
933
|
+
// epsilon from policy = 1.93e-34 for T == quad
|
|
934
|
+
// 5.35e-51 for t = cpp_bin_float_50
|
|
935
|
+
|
|
936
|
+
// std::cout << " get eps = " << get_epsilon<T, Policy>() << std::endl; // quad eps = 1.93e-34, bin_float_50 eps = 5.35e-51
|
|
937
|
+
policies::check_series_iterations<T>("boost::math::lambert_w0_small_z<%1%>(%1%)", max_iter, pol);
|
|
938
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES_ITERATIONS
|
|
939
|
+
std::cout << "z = " << z << " needed " << max_iter << " iterations." << std::endl;
|
|
940
|
+
std::cout.precision(prec); // Restore.
|
|
941
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W_SMALL_Z_SERIES_ITERATIONS
|
|
942
|
+
return result;
|
|
943
|
+
} // template <typename T, typename Policy> inline T lambert_w0_small_z_series(T z, const Policy& pol)
|
|
944
|
+
|
|
945
|
+
// Approximate lambert_w0 (used for z values that are outside range of lookup table or rational functions)
|
|
946
|
+
// Corless equation 4.19, page 349, and Chapeau-Blondeau equation 20, page 2162.
|
|
947
|
+
template <typename T>
|
|
948
|
+
inline T lambert_w0_approx(T z)
|
|
949
|
+
{
|
|
950
|
+
BOOST_MATH_STD_USING
|
|
951
|
+
T lz = log(z);
|
|
952
|
+
T llz = log(lz);
|
|
953
|
+
T w = lz - llz + (llz / lz); // Corless equation 4.19, page 349, and Chapeau-Blondeau equation 20, page 2162.
|
|
954
|
+
return w;
|
|
955
|
+
// std::cout << "w max " << max_w << std::endl; // double 703.227
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
//////////////////////////////////////////////////////////////////////////////////////////
|
|
959
|
+
|
|
960
|
+
//! \brief Lambert_w0 implementations for float, double and higher precisions.
|
|
961
|
+
//! 3rd parameter used to select which version is used.
|
|
962
|
+
|
|
963
|
+
//! /details Rational polynomials are provided for several range of argument z.
|
|
964
|
+
//! For very small values of z, and for z very near the branch singularity at -e^-1 (~= -0.367879),
|
|
965
|
+
//! two other series functions are used.
|
|
966
|
+
|
|
967
|
+
//! float precision polynomials are used for 32-bit (usually float) precision (for speed)
|
|
968
|
+
//! double precision polynomials are used for 64-bit (usually double) precision.
|
|
969
|
+
//! For higher precisions, a 64-bit double approximation is computed first,
|
|
970
|
+
//! and then refined using Halley iterations.
|
|
971
|
+
|
|
972
|
+
template <typename T>
|
|
973
|
+
inline T do_get_near_singularity_param(T z)
|
|
974
|
+
{
|
|
975
|
+
BOOST_MATH_STD_USING
|
|
976
|
+
const T p2 = 2 * (boost::math::constants::e<T>() * z + 1);
|
|
977
|
+
const T p = sqrt(p2);
|
|
978
|
+
return p;
|
|
979
|
+
}
|
|
980
|
+
template <typename T, typename Policy>
|
|
981
|
+
inline T get_near_singularity_param(T z, const Policy)
|
|
982
|
+
{
|
|
983
|
+
using value_type = typename policies::evaluation<T, Policy>::type;
|
|
984
|
+
return static_cast<T>(do_get_near_singularity_param(static_cast<value_type>(z)));
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
// Forward declarations:
|
|
988
|
+
|
|
989
|
+
//template <typename T, typename Policy> T lambert_w0_small_z(T z, const Policy& pol);
|
|
990
|
+
//template <typename T, typename Policy>
|
|
991
|
+
//T lambert_w0_imp(T w, const Policy& pol, const std::integral_constant<int, 0>&); // 32 bit usually float.
|
|
992
|
+
//template <typename T, typename Policy>
|
|
993
|
+
//T lambert_w0_imp(T w, const Policy& pol, const std::integral_constant<int, 1>&); // 64 bit usually double.
|
|
994
|
+
//template <typename T, typename Policy>
|
|
995
|
+
//T lambert_w0_imp(T w, const Policy& pol, const std::integral_constant<int, 2>&); // 80-bit long double.
|
|
996
|
+
|
|
997
|
+
template <typename T>
|
|
998
|
+
T lambert_w_positive_rational_float(T z)
|
|
999
|
+
{
|
|
1000
|
+
BOOST_MATH_STD_USING
|
|
1001
|
+
if (z < 2)
|
|
1002
|
+
{
|
|
1003
|
+
if (z < T(0.5))
|
|
1004
|
+
{ // 0.05 < z < 0.5
|
|
1005
|
+
// Maximum Deviation Found: 2.993e-08
|
|
1006
|
+
// Expected Error Term : 2.993e-08
|
|
1007
|
+
// Maximum Relative Change in Control Points : 7.555e-04 Y offset : -8.196592331e-01
|
|
1008
|
+
// LCOV_EXCL_START
|
|
1009
|
+
static const T Y = 8.196592331e-01f;
|
|
1010
|
+
static const T P[] = {
|
|
1011
|
+
1.803388345e-01f,
|
|
1012
|
+
-4.820256838e-01f,
|
|
1013
|
+
-1.068349741e+00f,
|
|
1014
|
+
-3.506624319e-02f,
|
|
1015
|
+
};
|
|
1016
|
+
static const T Q[] = {
|
|
1017
|
+
1.000000000e+00f,
|
|
1018
|
+
2.871703469e+00f,
|
|
1019
|
+
1.690949264e+00f,
|
|
1020
|
+
};
|
|
1021
|
+
// LCOV_EXCL_STOP
|
|
1022
|
+
return z * (Y + boost::math::tools::evaluate_polynomial(P, z) / boost::math::tools::evaluate_polynomial(Q, z));
|
|
1023
|
+
}
|
|
1024
|
+
else
|
|
1025
|
+
{ // 0.5 < z < 2
|
|
1026
|
+
// Max error in interpolated form: 1.018e-08
|
|
1027
|
+
// LCOV_EXCL_START
|
|
1028
|
+
static const T Y = 5.503368378e-01f;
|
|
1029
|
+
static const T P[] = {
|
|
1030
|
+
4.493332766e-01f,
|
|
1031
|
+
2.543432707e-01f,
|
|
1032
|
+
-4.808788799e-01f,
|
|
1033
|
+
-1.244425316e-01f,
|
|
1034
|
+
};
|
|
1035
|
+
static const T Q[] = {
|
|
1036
|
+
1.000000000e+00f,
|
|
1037
|
+
2.780661241e+00f,
|
|
1038
|
+
1.830840318e+00f,
|
|
1039
|
+
2.407221031e-01f,
|
|
1040
|
+
};
|
|
1041
|
+
// LCOV_EXCL_STOP
|
|
1042
|
+
return z * (Y + boost::math::tools::evaluate_rational(P, Q, z));
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
else if (z < 6)
|
|
1046
|
+
{
|
|
1047
|
+
// 2 < z < 6
|
|
1048
|
+
// Max error in interpolated form: 2.944e-08
|
|
1049
|
+
// LCOV_EXCL_START
|
|
1050
|
+
static const T Y = 1.162393570e+00f;
|
|
1051
|
+
static const T P[] = {
|
|
1052
|
+
-1.144183394e+00f,
|
|
1053
|
+
-4.712732855e-01f,
|
|
1054
|
+
1.563162512e-01f,
|
|
1055
|
+
1.434010911e-02f,
|
|
1056
|
+
};
|
|
1057
|
+
static const T Q[] = {
|
|
1058
|
+
1.000000000e+00f,
|
|
1059
|
+
1.192626340e+00f,
|
|
1060
|
+
2.295580708e-01f,
|
|
1061
|
+
5.477869455e-03f,
|
|
1062
|
+
};
|
|
1063
|
+
// LCOV_EXCL_STOP
|
|
1064
|
+
return Y + boost::math::tools::evaluate_rational(P, Q, z);
|
|
1065
|
+
}
|
|
1066
|
+
else if (z < 18)
|
|
1067
|
+
{
|
|
1068
|
+
// 6 < z < 18
|
|
1069
|
+
// Max error in interpolated form: 5.893e-08
|
|
1070
|
+
// LCOV_EXCL_START
|
|
1071
|
+
static const T Y = 1.809371948e+00f;
|
|
1072
|
+
static const T P[] = {
|
|
1073
|
+
-1.689291769e+00f,
|
|
1074
|
+
-3.337812742e-01f,
|
|
1075
|
+
3.151434873e-02f,
|
|
1076
|
+
1.134178734e-03f,
|
|
1077
|
+
};
|
|
1078
|
+
static const T Q[] = {
|
|
1079
|
+
1.000000000e+00f,
|
|
1080
|
+
5.716915685e-01f,
|
|
1081
|
+
4.489521292e-02f,
|
|
1082
|
+
4.076716763e-04f,
|
|
1083
|
+
};
|
|
1084
|
+
// LCOV_EXCL_STOP
|
|
1085
|
+
return Y + boost::math::tools::evaluate_rational(P, Q, z);
|
|
1086
|
+
}
|
|
1087
|
+
else if (z < T(9897.12905874)) // 2.8 < log(z) < 9.2
|
|
1088
|
+
{
|
|
1089
|
+
// Max error in interpolated form: 1.771e-08
|
|
1090
|
+
// LCOV_EXCL_START
|
|
1091
|
+
static const T Y = -1.402973175e+00f;
|
|
1092
|
+
static const T P[] = {
|
|
1093
|
+
1.966174312e+00f,
|
|
1094
|
+
2.350864728e-01f,
|
|
1095
|
+
-5.098074353e-02f,
|
|
1096
|
+
-1.054818339e-02f,
|
|
1097
|
+
};
|
|
1098
|
+
static const T Q[] = {
|
|
1099
|
+
1.000000000e+00f,
|
|
1100
|
+
4.388208264e-01f,
|
|
1101
|
+
8.316639634e-02f,
|
|
1102
|
+
3.397187918e-03f,
|
|
1103
|
+
-1.321489743e-05f,
|
|
1104
|
+
};
|
|
1105
|
+
// LCOV_EXCL_STOP
|
|
1106
|
+
T log_w = log(z);
|
|
1107
|
+
return log_w + Y + boost::math::tools::evaluate_polynomial(P, log_w) / boost::math::tools::evaluate_polynomial(Q, log_w);
|
|
1108
|
+
}
|
|
1109
|
+
else if (z < T(7.896296e+13)) // 9.2 < log(z) <= 32
|
|
1110
|
+
{
|
|
1111
|
+
// Max error in interpolated form: 5.821e-08
|
|
1112
|
+
// LCOV_EXCL_START
|
|
1113
|
+
static const T Y = -2.735729218e+00f;
|
|
1114
|
+
static const T P[] = {
|
|
1115
|
+
3.424903470e+00f,
|
|
1116
|
+
7.525631787e-02f,
|
|
1117
|
+
-1.427309584e-02f,
|
|
1118
|
+
-1.435974178e-05f,
|
|
1119
|
+
};
|
|
1120
|
+
static const T Q[] = {
|
|
1121
|
+
1.000000000e+00f,
|
|
1122
|
+
2.514005579e-01f,
|
|
1123
|
+
6.118994652e-03f,
|
|
1124
|
+
-1.357889535e-05f,
|
|
1125
|
+
7.312865624e-08f,
|
|
1126
|
+
};
|
|
1127
|
+
// LCOV_EXCL_STOP
|
|
1128
|
+
T log_w = log(z);
|
|
1129
|
+
return log_w + Y + boost::math::tools::evaluate_polynomial(P, log_w) / boost::math::tools::evaluate_polynomial(Q, log_w);
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
// Max error in interpolated form: 1.491e-08
|
|
1133
|
+
// LCOV_EXCL_START
|
|
1134
|
+
static const T Y = -4.012863159e+00f;
|
|
1135
|
+
static const T P[] = {
|
|
1136
|
+
4.431629226e+00f,
|
|
1137
|
+
2.756690487e-01f,
|
|
1138
|
+
-2.992956930e-03f,
|
|
1139
|
+
-4.912259384e-05f,
|
|
1140
|
+
};
|
|
1141
|
+
static const T Q[] = {
|
|
1142
|
+
1.000000000e+00f,
|
|
1143
|
+
2.015434591e-01f,
|
|
1144
|
+
4.949426142e-03f,
|
|
1145
|
+
1.609659944e-05f,
|
|
1146
|
+
-5.111523436e-09f,
|
|
1147
|
+
};
|
|
1148
|
+
// LCOV_EXCL_STOP
|
|
1149
|
+
T log_w = log(z);
|
|
1150
|
+
return log_w + Y + boost::math::tools::evaluate_polynomial(P, log_w) / boost::math::tools::evaluate_polynomial(Q, log_w);
|
|
1151
|
+
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
template <typename T, typename Policy>
|
|
1155
|
+
T lambert_w_negative_rational_float(T z, const Policy& pol)
|
|
1156
|
+
{
|
|
1157
|
+
BOOST_MATH_STD_USING
|
|
1158
|
+
if (z > T(-0.27))
|
|
1159
|
+
{
|
|
1160
|
+
if (z < T(-0.051))
|
|
1161
|
+
{
|
|
1162
|
+
// -0.27 < z < -0.051
|
|
1163
|
+
// Max error in interpolated form: 5.080e-08
|
|
1164
|
+
// LCOV_EXCL_START
|
|
1165
|
+
static const T Y = 1.255809784e+00f;
|
|
1166
|
+
static const T P[] = {
|
|
1167
|
+
-2.558083412e-01f,
|
|
1168
|
+
-2.306524098e+00f,
|
|
1169
|
+
-5.630887033e+00f,
|
|
1170
|
+
-3.803974556e+00f,
|
|
1171
|
+
};
|
|
1172
|
+
static const T Q[] = {
|
|
1173
|
+
1.000000000e+00f,
|
|
1174
|
+
5.107680783e+00f,
|
|
1175
|
+
7.914062868e+00f,
|
|
1176
|
+
3.501498501e+00f,
|
|
1177
|
+
};
|
|
1178
|
+
// LCOV_EXCL_STOP
|
|
1179
|
+
return z * (Y + boost::math::tools::evaluate_rational(P, Q, z));
|
|
1180
|
+
}
|
|
1181
|
+
else
|
|
1182
|
+
{
|
|
1183
|
+
// Very small z so use a series function.
|
|
1184
|
+
return lambert_w0_small_z(z, pol);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
else if (z > T(-0.3578794411714423215955237701))
|
|
1188
|
+
{ // Very close to branch singularity.
|
|
1189
|
+
// Max error in interpolated form: 5.269e-08
|
|
1190
|
+
// LCOV_EXCL_START
|
|
1191
|
+
static const T Y = 1.220928431e-01f;
|
|
1192
|
+
static const T P[] = {
|
|
1193
|
+
-1.221787446e-01f,
|
|
1194
|
+
-6.816155875e+00f,
|
|
1195
|
+
7.144582035e+01f,
|
|
1196
|
+
1.128444390e+03f,
|
|
1197
|
+
};
|
|
1198
|
+
static const T Q[] = {
|
|
1199
|
+
1.000000000e+00f,
|
|
1200
|
+
6.480326790e+01f,
|
|
1201
|
+
1.869145243e+02f,
|
|
1202
|
+
-1.361804274e+03f,
|
|
1203
|
+
1.117826726e+03f,
|
|
1204
|
+
};
|
|
1205
|
+
// LCOV_EXCL_STOP
|
|
1206
|
+
T d = z + 0.367879441171442321595523770161460867445811f;
|
|
1207
|
+
return -d / (Y + boost::math::tools::evaluate_polynomial(P, d) / boost::math::tools::evaluate_polynomial(Q, d));
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
return lambert_w_singularity_series(get_near_singularity_param(z, pol));
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
//! Lambert_w0 @b 'float' implementation, selected when T is 32-bit precision.
|
|
1214
|
+
template <typename T, typename Policy>
|
|
1215
|
+
inline T lambert_w0_imp(T z, const Policy& pol, const std::integral_constant<int, 1>&)
|
|
1216
|
+
{
|
|
1217
|
+
static const char* function = "boost::math::lambert_w0<%1%>"; // For error messages.
|
|
1218
|
+
BOOST_MATH_STD_USING // Aid ADL of std functions.
|
|
1219
|
+
|
|
1220
|
+
if ((boost::math::isnan)(z))
|
|
1221
|
+
{
|
|
1222
|
+
return boost::math::policies::raise_domain_error<T>(function, "Expected a value > -e^-1 (-0.367879...) but got %1%.", z, pol);
|
|
1223
|
+
}
|
|
1224
|
+
if ((boost::math::isinf)(z))
|
|
1225
|
+
{
|
|
1226
|
+
return boost::math::policies::raise_overflow_error<T>(function, "Expected a finite value but got %1%.", z, pol);
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
if (z >= T(0.05)) // Fukushima switch point.
|
|
1230
|
+
// if (z >= 0.045) // 34 terms makes 128-bit 'exact' below 0.045.
|
|
1231
|
+
{ // Normal ranges using several rational polynomials.
|
|
1232
|
+
return lambert_w_positive_rational_float(z);
|
|
1233
|
+
}
|
|
1234
|
+
else if (z <= -0.3678794411714423215955237701614608674458111310f)
|
|
1235
|
+
{
|
|
1236
|
+
if (z < -0.3678794411714423215955237701614608674458111310f)
|
|
1237
|
+
return boost::math::policies::raise_domain_error<T>(function, "Expected z >= -e^-1 (-0.367879...) but got %1%.", z, pol);
|
|
1238
|
+
return -1;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
return lambert_w_negative_rational_float(z, pol);
|
|
1242
|
+
} // T lambert_w0_imp(T z, const Policy& pol, const std::integral_constant<int, 1>&) for 32-bit usually float.
|
|
1243
|
+
|
|
1244
|
+
template <typename T>
|
|
1245
|
+
T lambert_w_positive_rational_double(T z)
|
|
1246
|
+
{
|
|
1247
|
+
BOOST_MATH_STD_USING
|
|
1248
|
+
if (z < 2)
|
|
1249
|
+
{
|
|
1250
|
+
if (z < 0.5)
|
|
1251
|
+
{
|
|
1252
|
+
// Max error in interpolated form: 2.255e-17
|
|
1253
|
+
// LCOV_EXCL_START
|
|
1254
|
+
static const T offset = 8.19659233093261719e-01;
|
|
1255
|
+
static const T P[] = {
|
|
1256
|
+
1.80340766906685177e-01,
|
|
1257
|
+
3.28178241493119307e-01,
|
|
1258
|
+
-2.19153620687139706e+00,
|
|
1259
|
+
-7.24750929074563990e+00,
|
|
1260
|
+
-7.28395876262524204e+00,
|
|
1261
|
+
-2.57417169492512916e+00,
|
|
1262
|
+
-2.31606948888704503e-01
|
|
1263
|
+
};
|
|
1264
|
+
static const T Q[] = {
|
|
1265
|
+
1.00000000000000000e+00,
|
|
1266
|
+
7.36482529307436604e+00,
|
|
1267
|
+
2.03686007856430677e+01,
|
|
1268
|
+
2.62864592096657307e+01,
|
|
1269
|
+
1.59742041380858333e+01,
|
|
1270
|
+
4.03760534788374589e+00,
|
|
1271
|
+
2.91327346750475362e-01
|
|
1272
|
+
};
|
|
1273
|
+
// LCOV_EXCL_STOP
|
|
1274
|
+
return z * (offset + boost::math::tools::evaluate_polynomial(P, z) / boost::math::tools::evaluate_polynomial(Q, z));
|
|
1275
|
+
}
|
|
1276
|
+
else
|
|
1277
|
+
{
|
|
1278
|
+
// Max error in interpolated form: 3.806e-18
|
|
1279
|
+
// LCOV_EXCL_START
|
|
1280
|
+
static const T offset = 5.50335884094238281e-01;
|
|
1281
|
+
static const T P[] = {
|
|
1282
|
+
4.49664083944098322e-01,
|
|
1283
|
+
1.90417666196776909e+00,
|
|
1284
|
+
1.99951368798255994e+00,
|
|
1285
|
+
-6.91217310299270265e-01,
|
|
1286
|
+
-1.88533935998617058e+00,
|
|
1287
|
+
-7.96743968047750836e-01,
|
|
1288
|
+
-1.02891726031055254e-01,
|
|
1289
|
+
-3.09156013592636568e-03
|
|
1290
|
+
};
|
|
1291
|
+
static const T Q[] = {
|
|
1292
|
+
1.00000000000000000e+00,
|
|
1293
|
+
6.45854489419584014e+00,
|
|
1294
|
+
1.54739232422116048e+01,
|
|
1295
|
+
1.72606164253337843e+01,
|
|
1296
|
+
9.29427055609544096e+00,
|
|
1297
|
+
2.29040824649748117e+00,
|
|
1298
|
+
2.21610620995418981e-01,
|
|
1299
|
+
5.70597669908194213e-03
|
|
1300
|
+
};// LCOV_EXCL_STOP
|
|
1301
|
+
return z * (offset + boost::math::tools::evaluate_rational(P, Q, z));
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
else if (z < 6)
|
|
1305
|
+
{
|
|
1306
|
+
// 2 < z < 6
|
|
1307
|
+
// Max error in interpolated form: 1.216e-17
|
|
1308
|
+
// LCOV_EXCL_START
|
|
1309
|
+
static const T Y = 1.16239356994628906e+00;
|
|
1310
|
+
static const T P[] = {
|
|
1311
|
+
-1.16230494982099475e+00,
|
|
1312
|
+
-3.38528144432561136e+00,
|
|
1313
|
+
-2.55653717293161565e+00,
|
|
1314
|
+
-3.06755172989214189e-01,
|
|
1315
|
+
1.73149743765268289e-01,
|
|
1316
|
+
3.76906042860014206e-02,
|
|
1317
|
+
1.84552217624706666e-03,
|
|
1318
|
+
1.69434126904822116e-05,
|
|
1319
|
+
};
|
|
1320
|
+
static const T Q[] = {
|
|
1321
|
+
1.00000000000000000e+00,
|
|
1322
|
+
3.77187616711220819e+00,
|
|
1323
|
+
4.58799960260143701e+00,
|
|
1324
|
+
2.24101228462292447e+00,
|
|
1325
|
+
4.54794195426212385e-01,
|
|
1326
|
+
3.60761772095963982e-02,
|
|
1327
|
+
9.25176499518388571e-04,
|
|
1328
|
+
4.43611344705509378e-06,
|
|
1329
|
+
};
|
|
1330
|
+
// LCOV_EXCL_STOP
|
|
1331
|
+
return Y + boost::math::tools::evaluate_rational(P, Q, z);
|
|
1332
|
+
}
|
|
1333
|
+
else if (z < 18)
|
|
1334
|
+
{
|
|
1335
|
+
// 6 < z < 18
|
|
1336
|
+
// Max error in interpolated form: 1.985e-19
|
|
1337
|
+
// LCOV_EXCL_START
|
|
1338
|
+
static const T offset = 1.80937194824218750e+00;
|
|
1339
|
+
static const T P[] =
|
|
1340
|
+
{
|
|
1341
|
+
-1.80690935424793635e+00,
|
|
1342
|
+
-3.66995929380314602e+00,
|
|
1343
|
+
-1.93842957940149781e+00,
|
|
1344
|
+
-2.94269984375794040e-01,
|
|
1345
|
+
1.81224710627677778e-03,
|
|
1346
|
+
2.48166798603547447e-03,
|
|
1347
|
+
1.15806592415397245e-04,
|
|
1348
|
+
1.43105573216815533e-06,
|
|
1349
|
+
3.47281483428369604e-09
|
|
1350
|
+
};
|
|
1351
|
+
static const T Q[] = {
|
|
1352
|
+
1.00000000000000000e+00,
|
|
1353
|
+
2.57319080723908597e+00,
|
|
1354
|
+
1.96724528442680658e+00,
|
|
1355
|
+
5.84501352882650722e-01,
|
|
1356
|
+
7.37152837939206240e-02,
|
|
1357
|
+
3.97368430940416778e-03,
|
|
1358
|
+
8.54941838187085088e-05,
|
|
1359
|
+
6.05713225608426678e-07,
|
|
1360
|
+
8.17517283816615732e-10
|
|
1361
|
+
};
|
|
1362
|
+
// LCOV_EXCL_STOP
|
|
1363
|
+
return offset + boost::math::tools::evaluate_rational(P, Q, z);
|
|
1364
|
+
}
|
|
1365
|
+
else if (z < 9897.12905874) // 2.8 < log(z) < 9.2
|
|
1366
|
+
{
|
|
1367
|
+
// Max error in interpolated form: 1.195e-18
|
|
1368
|
+
// LCOV_EXCL_START
|
|
1369
|
+
static const T Y = -1.40297317504882812e+00;
|
|
1370
|
+
static const T P[] = {
|
|
1371
|
+
1.97011826279311924e+00,
|
|
1372
|
+
1.05639945701546704e+00,
|
|
1373
|
+
3.33434529073196304e-01,
|
|
1374
|
+
3.34619153200386816e-02,
|
|
1375
|
+
-5.36238353781326675e-03,
|
|
1376
|
+
-2.43901294871308604e-03,
|
|
1377
|
+
-2.13762095619085404e-04,
|
|
1378
|
+
-4.85531936495542274e-06,
|
|
1379
|
+
-2.02473518491905386e-08,
|
|
1380
|
+
};
|
|
1381
|
+
static const T Q[] = {
|
|
1382
|
+
1.00000000000000000e+00,
|
|
1383
|
+
8.60107275833921618e-01,
|
|
1384
|
+
4.10420467985504373e-01,
|
|
1385
|
+
1.18444884081994841e-01,
|
|
1386
|
+
2.16966505556021046e-02,
|
|
1387
|
+
2.24529766630769097e-03,
|
|
1388
|
+
9.82045090226437614e-05,
|
|
1389
|
+
1.36363515125489502e-06,
|
|
1390
|
+
3.44200749053237945e-09,
|
|
1391
|
+
};
|
|
1392
|
+
// LCOV_EXCL_STOP
|
|
1393
|
+
T log_w = log(z);
|
|
1394
|
+
return log_w + Y + boost::math::tools::evaluate_rational(P, Q, log_w);
|
|
1395
|
+
}
|
|
1396
|
+
else if (z < 7.896296e+13) // 9.2 < log(z) <= 32
|
|
1397
|
+
{
|
|
1398
|
+
// Max error in interpolated form: 6.529e-18
|
|
1399
|
+
// LCOV_EXCL_START
|
|
1400
|
+
static const T Y = -2.73572921752929688e+00;
|
|
1401
|
+
static const T P[] = {
|
|
1402
|
+
3.30547638424076217e+00,
|
|
1403
|
+
1.64050071277550167e+00,
|
|
1404
|
+
4.57149576470736039e-01,
|
|
1405
|
+
4.03821227745424840e-02,
|
|
1406
|
+
-4.99664976882514362e-04,
|
|
1407
|
+
-1.28527893803052956e-04,
|
|
1408
|
+
-2.95470325373338738e-06,
|
|
1409
|
+
-1.76662025550202762e-08,
|
|
1410
|
+
-1.98721972463709290e-11,
|
|
1411
|
+
};
|
|
1412
|
+
static const T Q[] = {
|
|
1413
|
+
1.00000000000000000e+00,
|
|
1414
|
+
6.91472559412458759e-01,
|
|
1415
|
+
2.48154578891676774e-01,
|
|
1416
|
+
4.60893578284335263e-02,
|
|
1417
|
+
3.60207838982301946e-03,
|
|
1418
|
+
1.13001153242430471e-04,
|
|
1419
|
+
1.33690948263488455e-06,
|
|
1420
|
+
4.97253225968548872e-09,
|
|
1421
|
+
3.39460723731970550e-12,
|
|
1422
|
+
};
|
|
1423
|
+
// LCOV_EXCL_STOP
|
|
1424
|
+
T log_w = log(z);
|
|
1425
|
+
return log_w + Y + boost::math::tools::evaluate_rational(P, Q, log_w);
|
|
1426
|
+
}
|
|
1427
|
+
else if (z < 2.6881171e+43) // 32 < log(z) < 100
|
|
1428
|
+
{
|
|
1429
|
+
// Max error in interpolated form: 2.015e-18
|
|
1430
|
+
// LCOV_EXCL_START
|
|
1431
|
+
static const T Y = -4.01286315917968750e+00;
|
|
1432
|
+
static const T P[] = {
|
|
1433
|
+
5.07714858354309672e+00,
|
|
1434
|
+
-3.32994414518701458e+00,
|
|
1435
|
+
-8.61170416909864451e-01,
|
|
1436
|
+
-4.01139705309486142e-02,
|
|
1437
|
+
-1.85374201771834585e-04,
|
|
1438
|
+
1.08824145844270666e-05,
|
|
1439
|
+
1.17216905810452396e-07,
|
|
1440
|
+
2.97998248101385990e-10,
|
|
1441
|
+
1.42294856434176682e-13,
|
|
1442
|
+
};
|
|
1443
|
+
static const T Q[] = {
|
|
1444
|
+
1.00000000000000000e+00,
|
|
1445
|
+
-4.85840770639861485e-01,
|
|
1446
|
+
-3.18714850604827580e-01,
|
|
1447
|
+
-3.20966129264610534e-02,
|
|
1448
|
+
-1.06276178044267895e-03,
|
|
1449
|
+
-1.33597828642644955e-05,
|
|
1450
|
+
-6.27900905346219472e-08,
|
|
1451
|
+
-9.35271498075378319e-11,
|
|
1452
|
+
-2.60648331090076845e-14,
|
|
1453
|
+
};
|
|
1454
|
+
// LCOV_EXCL_STOP
|
|
1455
|
+
T log_w = log(z);
|
|
1456
|
+
return log_w + Y + boost::math::tools::evaluate_rational(P, Q, log_w);
|
|
1457
|
+
}
|
|
1458
|
+
else // 100 < log(z) < 710
|
|
1459
|
+
{
|
|
1460
|
+
// Max error in interpolated form: 5.277e-18
|
|
1461
|
+
// LCOV_EXCL_START
|
|
1462
|
+
static const T Y = -5.70115661621093750e+00;
|
|
1463
|
+
static const T P[] = {
|
|
1464
|
+
6.42275660145116698e+00,
|
|
1465
|
+
1.33047964073367945e+00,
|
|
1466
|
+
6.72008923401652816e-02,
|
|
1467
|
+
1.16444069958125895e-03,
|
|
1468
|
+
7.06966760237470501e-06,
|
|
1469
|
+
5.48974896149039165e-09,
|
|
1470
|
+
-7.00379652018853621e-11,
|
|
1471
|
+
-1.89247635913659556e-13,
|
|
1472
|
+
-1.55898770790170598e-16,
|
|
1473
|
+
-4.06109208815303157e-20,
|
|
1474
|
+
-2.21552699006496737e-24,
|
|
1475
|
+
};
|
|
1476
|
+
static const T Q[] = {
|
|
1477
|
+
1.00000000000000000e+00,
|
|
1478
|
+
3.34498588416632854e-01,
|
|
1479
|
+
2.51519862456384983e-02,
|
|
1480
|
+
6.81223810622416254e-04,
|
|
1481
|
+
7.94450897106903537e-06,
|
|
1482
|
+
4.30675039872881342e-08,
|
|
1483
|
+
1.10667669458467617e-10,
|
|
1484
|
+
1.31012240694192289e-13,
|
|
1485
|
+
6.53282047177727125e-17,
|
|
1486
|
+
1.11775518708172009e-20,
|
|
1487
|
+
3.78250395617836059e-25,
|
|
1488
|
+
};
|
|
1489
|
+
// LCOV_EXCL_STOP
|
|
1490
|
+
T log_w = log(z);
|
|
1491
|
+
return log_w + Y + boost::math::tools::evaluate_rational(P, Q, log_w);
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
template <typename T, typename Policy>
|
|
1496
|
+
T lambert_w_negative_rational_double(T z, const Policy& pol)
|
|
1497
|
+
{
|
|
1498
|
+
BOOST_MATH_STD_USING
|
|
1499
|
+
if (z > -0.1)
|
|
1500
|
+
{
|
|
1501
|
+
if (z < -0.051)
|
|
1502
|
+
{
|
|
1503
|
+
// -0.1 < z < -0.051
|
|
1504
|
+
// Maximum Deviation Found: 4.402e-22
|
|
1505
|
+
// Expected Error Term : 4.240e-22
|
|
1506
|
+
// Maximum Relative Change in Control Points : 4.115e-03
|
|
1507
|
+
// LCOV_EXCL_START
|
|
1508
|
+
static const T Y = 1.08633995056152344e+00;
|
|
1509
|
+
static const T P[] = {
|
|
1510
|
+
-8.63399505615014331e-02,
|
|
1511
|
+
-1.64303871814816464e+00,
|
|
1512
|
+
-7.71247913918273738e+00,
|
|
1513
|
+
-1.41014495545382454e+01,
|
|
1514
|
+
-1.02269079949257616e+01,
|
|
1515
|
+
-2.17236002836306691e+00,
|
|
1516
|
+
};
|
|
1517
|
+
static const T Q[] = {
|
|
1518
|
+
1.00000000000000000e+00,
|
|
1519
|
+
7.44775406945739243e+00,
|
|
1520
|
+
2.04392643087266541e+01,
|
|
1521
|
+
2.51001961077774193e+01,
|
|
1522
|
+
1.31256080849023319e+01,
|
|
1523
|
+
2.11640324843601588e+00,
|
|
1524
|
+
};
|
|
1525
|
+
// LCOV_EXCL_STOP
|
|
1526
|
+
return z * (Y + boost::math::tools::evaluate_rational(P, Q, z));
|
|
1527
|
+
}
|
|
1528
|
+
else
|
|
1529
|
+
{
|
|
1530
|
+
// Very small z > 0.051:
|
|
1531
|
+
return lambert_w0_small_z(z, pol);
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
else if (z > -0.2)
|
|
1535
|
+
{
|
|
1536
|
+
// -0.2 < z < -0.1
|
|
1537
|
+
// Maximum Deviation Found: 2.898e-20
|
|
1538
|
+
// Expected Error Term : 2.873e-20
|
|
1539
|
+
// Maximum Relative Change in Control Points : 3.779e-04
|
|
1540
|
+
// LCOV_EXCL_START
|
|
1541
|
+
static const T Y = 1.20359611511230469e+00;
|
|
1542
|
+
static const T P[] = {
|
|
1543
|
+
-2.03596115108465635e-01,
|
|
1544
|
+
-2.95029082937201859e+00,
|
|
1545
|
+
-1.54287922188671648e+01,
|
|
1546
|
+
-3.81185809571116965e+01,
|
|
1547
|
+
-4.66384358235575985e+01,
|
|
1548
|
+
-2.59282069989642468e+01,
|
|
1549
|
+
-4.70140451266553279e+00,
|
|
1550
|
+
};
|
|
1551
|
+
static const T Q[] = {
|
|
1552
|
+
1.00000000000000000e+00,
|
|
1553
|
+
9.57921436074599929e+00,
|
|
1554
|
+
3.60988119290234377e+01,
|
|
1555
|
+
6.73977699505546007e+01,
|
|
1556
|
+
6.41104992068148823e+01,
|
|
1557
|
+
2.82060127225153607e+01,
|
|
1558
|
+
4.10677610657724330e+00,
|
|
1559
|
+
};
|
|
1560
|
+
// LCOV_EXCL_STOP
|
|
1561
|
+
return z * (Y + boost::math::tools::evaluate_rational(P, Q, z));
|
|
1562
|
+
}
|
|
1563
|
+
else if (z > -0.3178794411714423215955237)
|
|
1564
|
+
{
|
|
1565
|
+
// Max error in interpolated form: 6.996e-18
|
|
1566
|
+
// LCOV_EXCL_START
|
|
1567
|
+
static const T Y = 3.49680423736572266e-01;
|
|
1568
|
+
static const T P[] = {
|
|
1569
|
+
-3.49729841718749014e-01,
|
|
1570
|
+
-6.28207407760709028e+01,
|
|
1571
|
+
-2.57226178029669171e+03,
|
|
1572
|
+
-2.50271008623093747e+04,
|
|
1573
|
+
1.11949239154711388e+05,
|
|
1574
|
+
1.85684566607844318e+06,
|
|
1575
|
+
4.80802490427638643e+06,
|
|
1576
|
+
2.76624752134636406e+06,
|
|
1577
|
+
};
|
|
1578
|
+
static const T Q[] = {
|
|
1579
|
+
1.00000000000000000e+00,
|
|
1580
|
+
1.82717661215113000e+02,
|
|
1581
|
+
8.00121119810280100e+03,
|
|
1582
|
+
1.06073266717010129e+05,
|
|
1583
|
+
3.22848993926057721e+05,
|
|
1584
|
+
-8.05684814514171256e+05,
|
|
1585
|
+
-2.59223192927265737e+06,
|
|
1586
|
+
-5.61719645211570871e+05,
|
|
1587
|
+
6.27765369292636844e+04,
|
|
1588
|
+
};
|
|
1589
|
+
// LCOV_EXCL_STOP
|
|
1590
|
+
T d = z + 0.367879441171442321595523770161460867445811;
|
|
1591
|
+
return -d / (Y + boost::math::tools::evaluate_polynomial(P, d) / boost::math::tools::evaluate_polynomial(Q, d));
|
|
1592
|
+
}
|
|
1593
|
+
else if (z > -0.3578794411714423215955237701)
|
|
1594
|
+
{
|
|
1595
|
+
// Max error in interpolated form: 1.404e-17
|
|
1596
|
+
// LCOV_EXCL_START
|
|
1597
|
+
static const T Y = 5.00126481056213379e-02;
|
|
1598
|
+
static const T P[] = {
|
|
1599
|
+
-5.00173570682372162e-02,
|
|
1600
|
+
-4.44242461870072044e+01,
|
|
1601
|
+
-9.51185533619946042e+03,
|
|
1602
|
+
-5.88605699015429386e+05,
|
|
1603
|
+
-1.90760843597427751e+06,
|
|
1604
|
+
5.79797663818311404e+08,
|
|
1605
|
+
1.11383352508459134e+10,
|
|
1606
|
+
5.67791253678716467e+10,
|
|
1607
|
+
6.32694500716584572e+10,
|
|
1608
|
+
};
|
|
1609
|
+
static const T Q[] = {
|
|
1610
|
+
1.00000000000000000e+00,
|
|
1611
|
+
9.08910517489981551e+02,
|
|
1612
|
+
2.10170163753340133e+05,
|
|
1613
|
+
1.67858612416470327e+07,
|
|
1614
|
+
4.90435561733227953e+08,
|
|
1615
|
+
4.54978142622939917e+09,
|
|
1616
|
+
2.87716585708739168e+09,
|
|
1617
|
+
-4.59414247951143131e+10,
|
|
1618
|
+
-1.72845216404874299e+10,
|
|
1619
|
+
};
|
|
1620
|
+
// LCOV_EXCL_STOP
|
|
1621
|
+
T d = z + 0.36787944117144232159552377016146086744581113103176804;
|
|
1622
|
+
return -d / (Y + boost::math::tools::evaluate_polynomial(P, d) / boost::math::tools::evaluate_polynomial(Q, d));
|
|
1623
|
+
}
|
|
1624
|
+
else
|
|
1625
|
+
{ // z is very close (within 0.01) of the singularity at -e^-1,
|
|
1626
|
+
// so use a series expansion from R. M. Corless et al.
|
|
1627
|
+
const T p2 = 2 * (boost::math::constants::e<T>() * z + 1);
|
|
1628
|
+
const T p = sqrt(p2);
|
|
1629
|
+
return lambert_w_detail::lambert_w_singularity_series(p);
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
//! Lambert_w0 @b 'double' implementation, selected when T is 64-bit precision.
|
|
1634
|
+
template <typename T, typename Policy>
|
|
1635
|
+
inline T lambert_w0_imp(T z, const Policy& pol, const std::integral_constant<int, 2>&)
|
|
1636
|
+
{
|
|
1637
|
+
static const char* function = "boost::math::lambert_w0<%1%>";
|
|
1638
|
+
BOOST_MATH_STD_USING // Aid ADL of std functions.
|
|
1639
|
+
|
|
1640
|
+
// Detect unusual case of 32-bit double with a wider/64-bit long double
|
|
1641
|
+
static_assert(std::numeric_limits<double>::digits >= 53,
|
|
1642
|
+
"Our double precision coefficients will be truncated, "
|
|
1643
|
+
"please file a bug report with details of your platform's floating point types "
|
|
1644
|
+
"- or possibly edit the coefficients to have "
|
|
1645
|
+
"an appropriate size-suffix for 64-bit floats on your platform - L?");
|
|
1646
|
+
|
|
1647
|
+
if ((boost::math::isnan)(z))
|
|
1648
|
+
{
|
|
1649
|
+
return boost::math::policies::raise_domain_error<T>(function, "Expected a value > -e^-1 (-0.367879...) but got %1%.", z, pol);
|
|
1650
|
+
}
|
|
1651
|
+
if ((boost::math::isinf)(z))
|
|
1652
|
+
{
|
|
1653
|
+
return boost::math::policies::raise_overflow_error<T>(function, "Expected a finite value but got %1%.", z, pol);
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
if (z >= 0.05)
|
|
1657
|
+
{
|
|
1658
|
+
return lambert_w_positive_rational_double(z);
|
|
1659
|
+
}
|
|
1660
|
+
else if (z <= -0.36787944117144232159552377016146086744581113103176804) // Precision is max_digits10(cpp_bin_float_50).
|
|
1661
|
+
{
|
|
1662
|
+
if (z < -0.36787944117144232159552377016146086744581113103176804)
|
|
1663
|
+
{
|
|
1664
|
+
return boost::math::policies::raise_domain_error<T>(function, "Expected z >= -e^-1 (-0.367879...) but got %1%.", z, pol);
|
|
1665
|
+
}
|
|
1666
|
+
return -1;
|
|
1667
|
+
}
|
|
1668
|
+
else
|
|
1669
|
+
{
|
|
1670
|
+
return lambert_w_negative_rational_double(z, pol);
|
|
1671
|
+
}
|
|
1672
|
+
} // T lambert_w0_imp(T z, const Policy& pol, const std::integral_constant<int, 2>&) 64-bit precision, usually double.
|
|
1673
|
+
|
|
1674
|
+
//! lambert_W0 implementation for extended precision types including
|
|
1675
|
+
//! long double (80-bit and 128-bit), ???
|
|
1676
|
+
//! quad float128, Boost.Multiprecision types like cpp_bin_float_quad, cpp_bin_float_50...
|
|
1677
|
+
|
|
1678
|
+
template <typename T, typename Policy>
|
|
1679
|
+
inline T lambert_w0_imp(T z, const Policy& pol, const std::integral_constant<int, 0>&)
|
|
1680
|
+
{
|
|
1681
|
+
static const char* function = "boost::math::lambert_w0<%1%>";
|
|
1682
|
+
BOOST_MATH_STD_USING // Aid ADL of std functions.
|
|
1683
|
+
|
|
1684
|
+
// Filter out special cases first:
|
|
1685
|
+
if ((boost::math::isnan)(z))
|
|
1686
|
+
{
|
|
1687
|
+
return boost::math::policies::raise_domain_error<T>(function, "Expected z >= -e^-1 (-0.367879...) but got %1%.", z, pol);
|
|
1688
|
+
}
|
|
1689
|
+
if (fabs(z) <= 0.05f)
|
|
1690
|
+
{
|
|
1691
|
+
// Very small z:
|
|
1692
|
+
return lambert_w0_small_z(z, pol);
|
|
1693
|
+
}
|
|
1694
|
+
if (z > (std::numeric_limits<double>::max)())
|
|
1695
|
+
{
|
|
1696
|
+
if ((boost::math::isinf)(z))
|
|
1697
|
+
{
|
|
1698
|
+
return policies::raise_overflow_error<T>(function, nullptr, pol);
|
|
1699
|
+
// Or might return infinity if available else max_value,
|
|
1700
|
+
// but other Boost.Math special functions raise overflow.
|
|
1701
|
+
}
|
|
1702
|
+
// z is larger than the largest double, so cannot use the polynomial to get an approximation,
|
|
1703
|
+
// so use the asymptotic approximation and Halley iterate:
|
|
1704
|
+
|
|
1705
|
+
T w = lambert_w0_approx(z); // Make an inline function as also used elsewhere.
|
|
1706
|
+
//T lz = log(z);
|
|
1707
|
+
//T llz = log(lz);
|
|
1708
|
+
//T w = lz - llz + (llz / lz); // Corless equation 4.19, page 349, and Chapeau-Blondeau equation 20, page 2162.
|
|
1709
|
+
return lambert_w_halley_iterate(w, z);
|
|
1710
|
+
}
|
|
1711
|
+
if (z < -0.3578794411714423215955237701)
|
|
1712
|
+
{ // Very close to branch point so rational polynomials are not usable.
|
|
1713
|
+
if (z <= -boost::math::constants::exp_minus_one<T>())
|
|
1714
|
+
{
|
|
1715
|
+
if (z == -boost::math::constants::exp_minus_one<T>())
|
|
1716
|
+
{ // Exactly at the branch point singularity.
|
|
1717
|
+
return -1;
|
|
1718
|
+
}
|
|
1719
|
+
return boost::math::policies::raise_domain_error<T>(function, "Expected z >= -e^-1 (-0.367879...) but got %1%.", z, pol);
|
|
1720
|
+
}
|
|
1721
|
+
// z is very close (within 0.01) of the branch singularity at -e^-1
|
|
1722
|
+
// so use a series approximation proposed by Corless et al.
|
|
1723
|
+
const T p2 = 2 * (boost::math::constants::e<T>() * z + 1);
|
|
1724
|
+
const T p = sqrt(p2);
|
|
1725
|
+
T w = lambert_w_detail::lambert_w_singularity_series(p);
|
|
1726
|
+
return lambert_w_halley_iterate(w, z);
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
// Phew! If we get here we are in the normal range of the function,
|
|
1730
|
+
// so get a double precision approximation first, then iterate to full precision of T.
|
|
1731
|
+
// We define a tag_type that is:
|
|
1732
|
+
// true_type if there are so many digits precision wanted that iteration is necessary.
|
|
1733
|
+
// false_type if a single Halley step is sufficient.
|
|
1734
|
+
|
|
1735
|
+
using precision_type = typename policies::precision<T, Policy>::type;
|
|
1736
|
+
using tag_type = std::integral_constant<bool,
|
|
1737
|
+
(precision_type::value == 0) || (precision_type::value > 113) ?
|
|
1738
|
+
true // Unknown at compile-time, variable/arbitrary, or more than float128 or cpp_bin_quad 128-bit precision.
|
|
1739
|
+
: false // float, double, float128, cpp_bin_quad 128-bit, so single Halley step.
|
|
1740
|
+
>;
|
|
1741
|
+
|
|
1742
|
+
// For speed, we also cast z to type double when that is possible
|
|
1743
|
+
// if (std::is_constructible<double, T>() == true).
|
|
1744
|
+
T w = lambert_w0_imp(maybe_reduce_to_double(z, std::is_constructible<double, T>()), pol, std::integral_constant<int, 2>());
|
|
1745
|
+
|
|
1746
|
+
return lambert_w_maybe_halley_iterate(w, z, tag_type());
|
|
1747
|
+
|
|
1748
|
+
} // T lambert_w0_imp(T z, const Policy& pol, const std::integral_constant<int, 0>&) all extended precision types.
|
|
1749
|
+
|
|
1750
|
+
// Lambert w-1 implementation
|
|
1751
|
+
// ==============================================================================================
|
|
1752
|
+
|
|
1753
|
+
//! Lambert W for W-1 branch, -max(z) < z <= -1/e.
|
|
1754
|
+
// TODO is -max(z) allowed?
|
|
1755
|
+
template<typename T, typename Policy>
|
|
1756
|
+
T lambert_wm1_imp(const T z, const Policy& pol)
|
|
1757
|
+
{
|
|
1758
|
+
// Catch providing an integer value as parameter x to lambert_w, for example, lambert_w(1).
|
|
1759
|
+
// Need to ensure it is a floating-point type (of the desired type, float 1.F, double 1., or long double 1.L),
|
|
1760
|
+
// or static_casted integer, for example: static_cast<float>(1) or static_cast<cpp_dec_float_50>(1).
|
|
1761
|
+
// Want to allow fixed_point types too, so do not just test for floating-point.
|
|
1762
|
+
// Integral types should be promoted to double by user Lambert w functions.
|
|
1763
|
+
// If integral type provided to user function lambert_w0 or lambert_wm1,
|
|
1764
|
+
// then should already have been promoted to double.
|
|
1765
|
+
static_assert(!std::is_integral<T>::value,
|
|
1766
|
+
"Must be floating-point or fixed type (not integer type), for example: lambert_wm1(1.), not lambert_wm1(1)!");
|
|
1767
|
+
|
|
1768
|
+
BOOST_MATH_STD_USING // Aid argument dependent lookup (ADL) of abs.
|
|
1769
|
+
|
|
1770
|
+
const char* function = "boost::math::lambert_wm1<RealType>(<RealType>)"; // Used for error messages.
|
|
1771
|
+
|
|
1772
|
+
// Check for edge and corner cases first:
|
|
1773
|
+
if ((boost::math::isnan)(z))
|
|
1774
|
+
{
|
|
1775
|
+
return policies::raise_domain_error(function, "Argument z is NaN!", z, pol);
|
|
1776
|
+
} // isnan
|
|
1777
|
+
|
|
1778
|
+
if ((boost::math::isinf)(z))
|
|
1779
|
+
{
|
|
1780
|
+
return policies::raise_domain_error(function, "Argument z is infinite!", z, pol);
|
|
1781
|
+
} // isinf
|
|
1782
|
+
|
|
1783
|
+
if (z == static_cast<T>(0))
|
|
1784
|
+
{ // z is exactly zero so return -std::numeric_limits<T>::infinity();
|
|
1785
|
+
return -policies::raise_overflow_error(function, nullptr, z, pol);
|
|
1786
|
+
}
|
|
1787
|
+
if (boost::math::detail::has_denorm_now<T>())
|
|
1788
|
+
{ // All real types except arbitrary precision.
|
|
1789
|
+
if (!(boost::math::isnormal)(z))
|
|
1790
|
+
{ // Almost zero - might also just return infinity like z == 0 or max_value?
|
|
1791
|
+
return -policies::raise_overflow_error(function, "Argument z = %1% is denormalized! (must be z > (std::numeric_limits<RealType>::min)() or z == 0)", z, pol);
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
if (z > static_cast<T>(0))
|
|
1796
|
+
{ //
|
|
1797
|
+
return policies::raise_domain_error(function, "Argument z = %1% is out of range (z <= 0) for Lambert W-1 branch! (Try Lambert W0 branch?)", z, pol);
|
|
1798
|
+
}
|
|
1799
|
+
if (z == -boost::math::constants::exp_minus_one<T>()) // == singularity/branch point z = -exp(-1) = -0.36787944.
|
|
1800
|
+
{ // At singularity, so return exactly -1.
|
|
1801
|
+
return -static_cast<T>(1);
|
|
1802
|
+
}
|
|
1803
|
+
// z is too negative for the W-1 (or W0) branch.
|
|
1804
|
+
if (z < -boost::math::constants::exp_minus_one<T>()) // > singularity/branch point z = -exp(-1) = -0.36787944.
|
|
1805
|
+
{
|
|
1806
|
+
return policies::raise_domain_error(function, "Argument z = %1% is out of range (require -exp(-1) = -0.36787944... < z <= 0) for Lambert W-1 (or W0) branch!", z, pol);
|
|
1807
|
+
}
|
|
1808
|
+
if (z < static_cast<T>(-0.35))
|
|
1809
|
+
{ // Close to singularity/branch point z = -0.3678794411714423215955237701614608727 but on W-1 branch.
|
|
1810
|
+
const T p2 = 2 * (boost::math::constants::e<T>() * z + 1);
|
|
1811
|
+
// Commented out, requires z = -1 / 2e which is greater than -0.35 so this whole branch is not taken.
|
|
1812
|
+
//if (p2 == 0)
|
|
1813
|
+
//{ // At the singularity at branch point.
|
|
1814
|
+
// return -1;
|
|
1815
|
+
// }
|
|
1816
|
+
BOOST_MATH_ASSERT(p2 > 0);
|
|
1817
|
+
T w_series = lambert_w_singularity_series(T(-sqrt(p2)));
|
|
1818
|
+
if (boost::math::tools::digits<T>() > 53)
|
|
1819
|
+
{ // Multiprecision, so try a Halley refinement.
|
|
1820
|
+
w_series = lambert_w_detail::lambert_w_halley_iterate(w_series, z);
|
|
1821
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_WM1_NOT_BUILTIN
|
|
1822
|
+
std::streamsize saved_precision = std::cout.precision(std::numeric_limits<T>::max_digits10);
|
|
1823
|
+
std::cout << "Lambert W-1 Halley updated to " << w_series << std::endl;
|
|
1824
|
+
std::cout.precision(saved_precision);
|
|
1825
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_WM1_NOT_BUILTIN
|
|
1826
|
+
}
|
|
1827
|
+
return w_series;
|
|
1828
|
+
} // if (z < -0.35)
|
|
1829
|
+
|
|
1830
|
+
using lambert_w_lookup::wm1es;
|
|
1831
|
+
using lambert_w_lookup::wm1zs;
|
|
1832
|
+
using lambert_w_lookup::noof_wm1zs; // size == 64
|
|
1833
|
+
|
|
1834
|
+
// std::cout <<" Wm1zs[63] (== G[64]) = " << " " << wm1zs[63] << std::endl; // Wm1zs[63] (== G[64]) = -1.0264389699511283e-26
|
|
1835
|
+
// Check that z argument value is not smaller than lookup_table G[64]
|
|
1836
|
+
// std::cout << "(z > wm1zs[63]) = " << std::boolalpha << (z > wm1zs[63]) << std::endl;
|
|
1837
|
+
|
|
1838
|
+
if (z >= T(wm1zs[63])) // wm1zs[63] = -1.0264389699511282259046957018510946438e-26L W = 64.00000000000000000
|
|
1839
|
+
{ // z >= -1.0264389699511303e-26 (but z != 0 and z >= std::numeric_limits<T>::min() and so NOT denormalized).
|
|
1840
|
+
|
|
1841
|
+
// Some info on Lambert W-1 values for extreme values of z.
|
|
1842
|
+
// std::streamsize saved_precision = std::cout.precision(std::numeric_limits<T>::max_digits10);
|
|
1843
|
+
// std::cout << "-std::numeric_limits<float>::min() = " << -(std::numeric_limits<float>::min)() << std::endl;
|
|
1844
|
+
// std::cout << "-std::numeric_limits<double>::min() = " << -(std::numeric_limits<double>::min)() << std::endl;
|
|
1845
|
+
// -std::numeric_limits<float>::min() = -1.1754943508222875e-38
|
|
1846
|
+
// -std::numeric_limits<double>::min() = -2.2250738585072014e-308
|
|
1847
|
+
// N[productlog(-1, -1.1754943508222875 * 10^-38 ), 50] = -91.856775324595479509567756730093823993834155027858
|
|
1848
|
+
// N[productlog(-1, -2.2250738585072014e-308 * 10^-308 ), 50] = -1424.8544521230553853558132180518404363617968042942
|
|
1849
|
+
// N[productlog(-1, -1.4325445274604020119111357113179868158* 10^-27), 37] = -65.99999999999999999999999999999999955
|
|
1850
|
+
|
|
1851
|
+
// R.M.Corless, G.H.Gonnet, D.E.G.Hare, D.J.Jeffrey, and D.E.Knuth,
|
|
1852
|
+
// On the Lambert W function, Adv.Comput.Math., vol. 5, pp. 329, 1996.
|
|
1853
|
+
// Francois Chapeau-Blondeau and Abdelilah Monir
|
|
1854
|
+
// Numerical Evaluation of the Lambert W Function
|
|
1855
|
+
// IEEE Transactions On Signal Processing, VOL. 50, NO. 9, Sep 2002
|
|
1856
|
+
// https://pdfs.semanticscholar.org/7a5a/76a9369586dd0dd34dda156d8f2779d1fd59.pdf
|
|
1857
|
+
// Estimate Lambert W using ln(-z) ...
|
|
1858
|
+
// This is roughly the power of ten * ln(10) ~= 2.3. n ~= 10^n
|
|
1859
|
+
// and improve by adding a second term -ln(ln(-z))
|
|
1860
|
+
T guess; // bisect lowest possible Gk[=64] (for lookup_t type)
|
|
1861
|
+
T lz = log(-z);
|
|
1862
|
+
T llz = log(-lz);
|
|
1863
|
+
guess = lz - llz + (llz / lz); // Chapeau-Blondeau equation 20, page 2162.
|
|
1864
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_WM1_TINY
|
|
1865
|
+
std::streamsize saved_precision = std::cout.precision(std::numeric_limits<T>::max_digits10);
|
|
1866
|
+
std::cout << "z = " << z << ", guess = " << guess << ", ln(-z) = " << lz << ", ln(-ln(-z) = " << llz << ", llz/lz = " << (llz / lz) << std::endl;
|
|
1867
|
+
// z = -1.0000000000000001e-30, guess = -73.312782616731482, ln(-z) = -69.077552789821368, ln(-ln(-z) = 4.2352298269101114, llz/lz = -0.061311231447304194
|
|
1868
|
+
// z = -9.9999999999999999e-91, guess = -212.56650048504233, ln(-z) = -207.23265836946410, ln(-ln(-z) = 5.3338421155782205, llz/lz = -0.025738424423764311
|
|
1869
|
+
// >z = -2.2250738585072014e-308, guess = -714.95942238244606, ln(-z) = -708.39641853226408, ln(-ln(-z) = 6.5630038501819854, llz/lz = -0.0092645920821846622
|
|
1870
|
+
int d10 = policies::digits_base10<T, Policy>(); // policy template parameter digits10
|
|
1871
|
+
int d2 = policies::digits<T, Policy>(); // digits base 2 from policy.
|
|
1872
|
+
std::cout << "digits10 = " << d10 << ", digits2 = " << d2 // For example: digits10 = 1, digits2 = 5
|
|
1873
|
+
<< std::endl;
|
|
1874
|
+
std::cout.precision(saved_precision);
|
|
1875
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_WM1_TINY
|
|
1876
|
+
if (policies::digits<T, Policy>() < 12)
|
|
1877
|
+
{ // For the worst case near w = 64, the error in the 'guess' is ~0.008, ratio ~ 0.0001 or 1 in 10,000 digits 10 ~= 4, or digits2 ~= 12.
|
|
1878
|
+
return guess; // LCOV_EXCL_LINE We don't have a test type with few enough digits to trigger this.
|
|
1879
|
+
}
|
|
1880
|
+
T result = lambert_w_detail::lambert_w_halley_iterate(guess, z);
|
|
1881
|
+
return result;
|
|
1882
|
+
|
|
1883
|
+
// Was Fukushima
|
|
1884
|
+
// G[k=64] == g[63] == -1.02643897e-26
|
|
1885
|
+
//return policies::raise_domain_error(function,
|
|
1886
|
+
// "Argument z = %1% is too small (< -1.02643897e-26) ! (Should not occur, please report.",
|
|
1887
|
+
// z, pol);
|
|
1888
|
+
} // Z too small so use approximation and Halley.
|
|
1889
|
+
// Else Use a lookup table to find the nearest integer part of Lambert W-1 as starting point for Bisection.
|
|
1890
|
+
|
|
1891
|
+
if (boost::math::tools::digits<T>() > 53)
|
|
1892
|
+
{ // T is more precise than 64-bit double (or long double, or ?),
|
|
1893
|
+
// so compute an approximate value using only one Schroeder refinement,
|
|
1894
|
+
// (avoiding any double-precision Halley refinement from policy double_digits2<50> 53 - 3 = 50
|
|
1895
|
+
// because are next going to use Halley refinement at full/high precision using this as an approximation).
|
|
1896
|
+
using boost::math::policies::precision;
|
|
1897
|
+
using boost::math::policies::digits10;
|
|
1898
|
+
using boost::math::policies::digits2;
|
|
1899
|
+
using boost::math::policies::policy;
|
|
1900
|
+
// Compute a 50-bit precision approximate W0 in a double (no Halley refinement).
|
|
1901
|
+
T double_approx(static_cast<T>(lambert_wm1_imp(must_reduce_to_double(z, std::is_constructible<double, T>()), policy<digits2<50>>())));
|
|
1902
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_WM1_NOT_BUILTIN
|
|
1903
|
+
std::streamsize saved_precision = std::cout.precision(std::numeric_limits<T>::max_digits10);
|
|
1904
|
+
std::cout << "Lambert_wm1 Argument Type " << typeid(T).name() << " approximation double = " << double_approx << std::endl;
|
|
1905
|
+
std::cout.precision(saved_precision);
|
|
1906
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_WM1
|
|
1907
|
+
// Perform additional Halley refinement(s) to ensure that
|
|
1908
|
+
// get a near as possible to correct result (usually +/- one epsilon).
|
|
1909
|
+
T result = lambert_w_halley_iterate(double_approx, z);
|
|
1910
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_WM1
|
|
1911
|
+
std::streamsize saved_precision = std::cout.precision(std::numeric_limits<T>::max_digits10);
|
|
1912
|
+
std::cout << "Result " << typeid(T).name() << " precision Halley refinement = " << result << std::endl;
|
|
1913
|
+
std::cout.precision(saved_precision);
|
|
1914
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_WM1
|
|
1915
|
+
return result;
|
|
1916
|
+
} // digits > 53 - higher precision than double.
|
|
1917
|
+
else // T is double or less precision.
|
|
1918
|
+
{ // Use a lookup table to find the nearest integer part of Lambert W as starting point for Bisection.
|
|
1919
|
+
using namespace boost::math::lambert_w_detail::lambert_w_lookup;
|
|
1920
|
+
// Bracketing sequence n = (2, 4, 8, 16, 32, 64) for W-1 branch. (0 is -infinity)
|
|
1921
|
+
// Since z is probably quite small, start with lowest n (=2).
|
|
1922
|
+
int n = 2;
|
|
1923
|
+
if (T(wm1zs[n - 1]) > z)
|
|
1924
|
+
{
|
|
1925
|
+
goto bisect;
|
|
1926
|
+
}
|
|
1927
|
+
for (int j = 1; j <= 5; ++j)
|
|
1928
|
+
{
|
|
1929
|
+
n *= 2;
|
|
1930
|
+
if (T(wm1zs[n - 1]) > z)
|
|
1931
|
+
{
|
|
1932
|
+
goto overshot;
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
// else z < g[63] == -1.0264389699511303e-26, so Lambert W-1 integer part > 64.
|
|
1936
|
+
// This should not now occur (should be caught by test and code above) so should be a logic_error?
|
|
1937
|
+
return policies::raise_evaluation_error(function, "Argument z = %1% is too small (< -1.026439e-26) (logic error - please report!)", z, pol); // LCOV_EXCL_LINE
|
|
1938
|
+
overshot:
|
|
1939
|
+
{
|
|
1940
|
+
int nh = n / 2;
|
|
1941
|
+
for (int j = 1; j <= 5; ++j)
|
|
1942
|
+
{
|
|
1943
|
+
nh /= 2; // halve step size.
|
|
1944
|
+
if (nh <= 0)
|
|
1945
|
+
{
|
|
1946
|
+
break; // goto bisect;
|
|
1947
|
+
}
|
|
1948
|
+
if (T(wm1zs[n - nh - 1]) > z)
|
|
1949
|
+
{
|
|
1950
|
+
n -= nh;
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
bisect:
|
|
1955
|
+
--n;
|
|
1956
|
+
// g[n] now holds lambert W of floor integer n and g[n+1] the ceil part;
|
|
1957
|
+
// these are used as initial values for bisection.
|
|
1958
|
+
#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_WM1_LOOKUP
|
|
1959
|
+
std::streamsize saved_precision = std::cout.precision(std::numeric_limits<T>::max_digits10);
|
|
1960
|
+
std::cout << "Result lookup W-1(" << z << ") bisection between wm1zs[" << n - 1 << "] = " << wm1zs[n - 1] << " and wm1zs[" << n << "] = " << wm1zs[n]
|
|
1961
|
+
<< ", bisect mean = " << (wm1zs[n - 1] + wm1zs[n]) / 2 << std::endl;
|
|
1962
|
+
std::cout.precision(saved_precision);
|
|
1963
|
+
#endif // BOOST_MATH_INSTRUMENT_LAMBERT_WM1_LOOKUP
|
|
1964
|
+
|
|
1965
|
+
// Compute bisections is the number of bisections computed from n,
|
|
1966
|
+
// such that a single application of the fifth-order Schroeder update formula
|
|
1967
|
+
// after the bisections is enough to evaluate Lambert W-1 with (near?) 53-bit accuracy.
|
|
1968
|
+
// Fukushima established these by trial and error?
|
|
1969
|
+
int bisections = 11; // Assume maximum number of bisections will be needed (most common case).
|
|
1970
|
+
if (n >= 8)
|
|
1971
|
+
{
|
|
1972
|
+
bisections = 8;
|
|
1973
|
+
}
|
|
1974
|
+
else if (n >= 3)
|
|
1975
|
+
{
|
|
1976
|
+
bisections = 9;
|
|
1977
|
+
}
|
|
1978
|
+
else if (n >= 2)
|
|
1979
|
+
{
|
|
1980
|
+
bisections = 10;
|
|
1981
|
+
}
|
|
1982
|
+
// Bracketing, Fukushima section 2.3, page 82:
|
|
1983
|
+
// (Avoiding using exponential function for speed).
|
|
1984
|
+
// Only use @c lookup_t precision, default double, for bisection (again for speed),
|
|
1985
|
+
// and use later Halley refinement for higher precisions.
|
|
1986
|
+
using lambert_w_lookup::halves;
|
|
1987
|
+
using lambert_w_lookup::sqrtwm1s;
|
|
1988
|
+
|
|
1989
|
+
using calc_type = typename std::conditional<std::is_constructible<lookup_t, T>::value, lookup_t, T>::type;
|
|
1990
|
+
|
|
1991
|
+
calc_type w = -static_cast<calc_type>(n); // Equation 25,
|
|
1992
|
+
calc_type y = static_cast<calc_type>(z * T(wm1es[n - 1])); // Equation 26,
|
|
1993
|
+
// Perform the bisections fractional bisections for necessary precision.
|
|
1994
|
+
for (int j = 0; j < bisections; ++j)
|
|
1995
|
+
{ // Equation 27.
|
|
1996
|
+
calc_type wj = w - halves[j]; // Subtract 1/2, 1/4, 1/8 ...
|
|
1997
|
+
calc_type yj = y * sqrtwm1s[j]; // Multiply by sqrt(1/e), ...
|
|
1998
|
+
if (wj < yj)
|
|
1999
|
+
{
|
|
2000
|
+
w = wj;
|
|
2001
|
+
y = yj;
|
|
2002
|
+
}
|
|
2003
|
+
} // for j
|
|
2004
|
+
return static_cast<T>(schroeder_update(w, y)); // Schroeder 5th order method refinement.
|
|
2005
|
+
|
|
2006
|
+
// else // Perform additional Halley refinement(s) to ensure that
|
|
2007
|
+
// // get a near as possible to correct result (usually +/- epsilon).
|
|
2008
|
+
// {
|
|
2009
|
+
// // result = lambert_w_halley_iterate(result, z);
|
|
2010
|
+
// result = lambert_w_halley_step(result, z); // Just one Halley step should be enough.
|
|
2011
|
+
//#ifdef BOOST_MATH_INSTRUMENT_LAMBERT_WM1_HALLEY
|
|
2012
|
+
// std::streamsize saved_precision = std::cout.precision(std::numeric_limits<T>::max_digits10);
|
|
2013
|
+
// std::cout << "Halley refinement estimate = " << result << std::endl;
|
|
2014
|
+
// std::cout.precision(saved_precision);
|
|
2015
|
+
//#endif // BOOST_MATH_INSTRUMENT_LAMBERT_W1_HALLEY
|
|
2016
|
+
// return result; // Halley
|
|
2017
|
+
// } // Schroeder or Schroeder and Halley.
|
|
2018
|
+
}
|
|
2019
|
+
} // template<typename T = double> T lambert_wm1_imp(const T z)
|
|
2020
|
+
} // namespace lambert_w_detail
|
|
2021
|
+
|
|
2022
|
+
///////////////////////////// User Lambert w functions. //////////////////////////////
|
|
2023
|
+
|
|
2024
|
+
//! Lambert W0 using User-defined policy.
|
|
2025
|
+
template <typename T, typename Policy>
|
|
2026
|
+
inline
|
|
2027
|
+
typename boost::math::tools::promote_args<T>::type
|
|
2028
|
+
lambert_w0(T z, const Policy& pol)
|
|
2029
|
+
{
|
|
2030
|
+
// Promote integer or expression template arguments to double,
|
|
2031
|
+
// without doing any other internal promotion like float to double.
|
|
2032
|
+
using result_type = typename tools::promote_args<T>::type;
|
|
2033
|
+
|
|
2034
|
+
// Work out what precision has been selected,
|
|
2035
|
+
// based on the Policy and the number type.
|
|
2036
|
+
using precision_type = typename policies::precision<result_type, Policy>::type;
|
|
2037
|
+
// and then select the correct implementation based on that precision (not the type T):
|
|
2038
|
+
using tag_type = std::integral_constant<int,
|
|
2039
|
+
(precision_type::value == 0) || (precision_type::value > 53) ?
|
|
2040
|
+
0 // either variable precision (0), or greater than 64-bit precision.
|
|
2041
|
+
: (precision_type::value <= 24) ? 1 // 32-bit (probably float) precision.
|
|
2042
|
+
: 2 // 64-bit (probably double) precision.
|
|
2043
|
+
>;
|
|
2044
|
+
|
|
2045
|
+
return lambert_w_detail::lambert_w0_imp(result_type(z), pol, tag_type()); //
|
|
2046
|
+
} // lambert_w0(T z, const Policy& pol)
|
|
2047
|
+
|
|
2048
|
+
//! Lambert W0 using default policy.
|
|
2049
|
+
template <typename T>
|
|
2050
|
+
inline
|
|
2051
|
+
typename tools::promote_args<T>::type
|
|
2052
|
+
lambert_w0(T z)
|
|
2053
|
+
{
|
|
2054
|
+
// Promote integer or expression template arguments to double,
|
|
2055
|
+
// without doing any other internal promotion like float to double.
|
|
2056
|
+
using result_type = typename tools::promote_args<T>::type;
|
|
2057
|
+
|
|
2058
|
+
// Work out what precision has been selected, based on the Policy and the number type.
|
|
2059
|
+
// For the default policy version, we want the *default policy* precision for T.
|
|
2060
|
+
using precision_type = typename policies::precision<result_type, policies::policy<>>::type;
|
|
2061
|
+
// and then select the correct implementation based on that (not the type T):
|
|
2062
|
+
using tag_type = std::integral_constant<int,
|
|
2063
|
+
(precision_type::value == 0) || (precision_type::value > 53) ?
|
|
2064
|
+
0 // either variable precision (0), or greater than 64-bit precision.
|
|
2065
|
+
: (precision_type::value <= 24) ? 1 // 32-bit (probably float) precision.
|
|
2066
|
+
: 2 // 64-bit (probably double) precision.
|
|
2067
|
+
>;
|
|
2068
|
+
return lambert_w_detail::lambert_w0_imp(result_type(z), policies::policy<>(), tag_type());
|
|
2069
|
+
} // lambert_w0(T z) using default policy.
|
|
2070
|
+
|
|
2071
|
+
//! W-1 branch (-max(z) < z <= -1/e).
|
|
2072
|
+
|
|
2073
|
+
//! Lambert W-1 using User-defined policy.
|
|
2074
|
+
template <typename T, typename Policy>
|
|
2075
|
+
inline
|
|
2076
|
+
typename tools::promote_args<T>::type
|
|
2077
|
+
lambert_wm1(T z, const Policy& pol)
|
|
2078
|
+
{
|
|
2079
|
+
// Promote integer or expression template arguments to double,
|
|
2080
|
+
// without doing any other internal promotion like float to double.
|
|
2081
|
+
using result_type = typename tools::promote_args<T>::type;
|
|
2082
|
+
return lambert_w_detail::lambert_wm1_imp(result_type(z), pol); //
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
//! Lambert W-1 using default policy.
|
|
2086
|
+
template <typename T>
|
|
2087
|
+
inline
|
|
2088
|
+
typename tools::promote_args<T>::type
|
|
2089
|
+
lambert_wm1(T z)
|
|
2090
|
+
{
|
|
2091
|
+
using result_type = typename tools::promote_args<T>::type;
|
|
2092
|
+
return lambert_w_detail::lambert_wm1_imp(result_type(z), policies::policy<>());
|
|
2093
|
+
} // lambert_wm1(T z)
|
|
2094
|
+
|
|
2095
|
+
// First derivative of Lambert W0 and W-1.
|
|
2096
|
+
namespace lambert_w_detail {
|
|
2097
|
+
template <typename T, typename Policy>
|
|
2098
|
+
inline typename tools::promote_args<T>::type
|
|
2099
|
+
lambert_w0_prime(T z, const Policy& pol)
|
|
2100
|
+
{
|
|
2101
|
+
using result_type = typename tools::promote_args<T>::type;
|
|
2102
|
+
using std::numeric_limits;
|
|
2103
|
+
if (z == 0)
|
|
2104
|
+
{
|
|
2105
|
+
return static_cast<result_type>(1);
|
|
2106
|
+
}
|
|
2107
|
+
// This is the sensible choice if we regard the Lambert-W function as complex analytic.
|
|
2108
|
+
// Of course on the real line, it's just undefined.
|
|
2109
|
+
if (z == -boost::math::constants::exp_minus_one<result_type>())
|
|
2110
|
+
{
|
|
2111
|
+
return boost::math::policies::raise_overflow_error("lambert_w0_prime", nullptr, z, pol);
|
|
2112
|
+
}
|
|
2113
|
+
// if z < -1/e, we'll let lambert_w0 do the error handling:
|
|
2114
|
+
result_type w = lambert_w0(result_type(z), pol);
|
|
2115
|
+
// If w ~ -1, then presumably this can get inaccurate.
|
|
2116
|
+
// Is there an accurate way to evaluate 1 + W(-1/e + eps)?
|
|
2117
|
+
// Yes: This is discussed in the Princeton Companion to Applied Mathematics,
|
|
2118
|
+
// 'The Lambert-W function', Section 1.3: Series and Generating Functions.
|
|
2119
|
+
// 1 + W(-1/e + x) ~ sqrt(2ex).
|
|
2120
|
+
// Nick is not convinced this formula is more accurate than the naive one.
|
|
2121
|
+
// However, for z != -1/e, we never get rounded to w = -1 in any precision I've tested (up to cpp_bin_float_100).
|
|
2122
|
+
return w / (z * (1 + w));
|
|
2123
|
+
} // lambert_w0_prime(T z)
|
|
2124
|
+
}
|
|
2125
|
+
// First derivative of Lambert W0 and W-1.
|
|
2126
|
+
template <typename T, typename Policy>
|
|
2127
|
+
inline typename tools::promote_args<T>::type
|
|
2128
|
+
lambert_w0_prime(T z, const Policy& pol)
|
|
2129
|
+
{
|
|
2130
|
+
using result_type = typename tools::promote_args<T>::type;
|
|
2131
|
+
return lambert_w_detail::lambert_w0_prime(static_cast<result_type>(z), pol);
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
template <typename T>
|
|
2135
|
+
inline typename tools::promote_args<T>::type
|
|
2136
|
+
lambert_w0_prime(T z)
|
|
2137
|
+
{
|
|
2138
|
+
return lambert_w0_prime(z, policies::policy<>());
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
template <typename T, typename Policy>
|
|
2142
|
+
inline typename tools::promote_args<T>::type
|
|
2143
|
+
lambert_wm1_prime(T z, const Policy& pol)
|
|
2144
|
+
{
|
|
2145
|
+
using std::numeric_limits;
|
|
2146
|
+
using result_type = typename tools::promote_args<T>::type;
|
|
2147
|
+
//if (z == 0)
|
|
2148
|
+
//{
|
|
2149
|
+
// return static_cast<result_type>(1);
|
|
2150
|
+
//}
|
|
2151
|
+
//if (z == - boost::math::constants::exp_minus_one<result_type>())
|
|
2152
|
+
if (z == 0 || z == - boost::math::constants::exp_minus_one<result_type>())
|
|
2153
|
+
{
|
|
2154
|
+
return -boost::math::policies::raise_overflow_error("lambert_wm1_prime", nullptr, z, pol);
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
result_type w = lambert_wm1(z, pol);
|
|
2158
|
+
return w/(z*(1+w));
|
|
2159
|
+
} // lambert_wm1_prime(T z)
|
|
2160
|
+
|
|
2161
|
+
template <typename T>
|
|
2162
|
+
inline typename tools::promote_args<T>::type
|
|
2163
|
+
lambert_wm1_prime(T z)
|
|
2164
|
+
{
|
|
2165
|
+
return lambert_wm1_prime(z, policies::policy<>());
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
}} //boost::math namespaces
|
|
2169
|
+
|
|
2170
|
+
#endif // #ifdef BOOST_MATH_SF_LAMBERT_W_HPP
|
|
2171
|
+
|