dependent_bterms
An extension to SageMath's module for computations with asymptotic expansions. Provides a special AsymptoticRing that allows to specify a secondary, dependent (monomially bounded) variable.
Quickstart and Summary
The package can be made available to your SageMath installation by running
$ sage -pip install dependent_bterms
from your terminal, or just
!pip install dependent_bterms
from within a SageMath Jupyter notebook. The package can then be used as follows:
sage: import dependent_bterms as dbt
sage: AR, n, k = dbt.AsymptoticRingWithDependentVariable( # create a special AsymptoticRing
....: 'n^QQ', # in one asymptotic (monomial) variable n with rational powers
....: 'k', 0, 1/2, # with a symbolic variable k assumed to be in the range n^0 <= k <= n^(1/2)
....: bterm_round_to=2 # and explicit error terms should be rounded to two decimal places
....: )
sage: k*n^2 + O(n^(3/2)) + k^3*n # summands are ordered w.r.t. their highest potential growth
k^3*n + k*n^2 + O(n^(3/2))
sage: asy = 1/n + AR.B(k/n^2, valid_from=10)
sage: asy_exp = dbt.taylor_with_explicit_error(lambda t: exp(t), asy, order=3, valid_from=10)
sage: asy_exp
1 + n^(-1) + B((abs(28/25*k + 73/100))*n^(-2), n >= 10)
sage: dbt.simplify_expansion(asy_exp, simplify_bterm_growth=True)
1 + n^(-1) + B(34/25*n^(-3/2), n >= 10)
One-line descriptions of the top-level members exported with this module are given below. A description of their respective input arguments and several examples are provided in the respective docstrings.
-
AsymptoticRingWithDependentVariables-- A special (univariate)AsymptoticRingthat is aware of a monomially bounded symbolic variable. -
evaluate-- Evaluate a symbolic expression without necessarily returning a result in the symbolic ring. -
simplify_expansion-- Simplify an asymptotic expansion by allowing error terms to try and absorb parts of exact terms. -
round_bterm_coefficients-- Round the coefficients of all B-terms in the given expansion to the next integer (or rational with respect to the provided precision). -
set_bterm_valid_from-- Changes the point from which a B-term bound is valid such that the term remains valid. -
expansion_upper_bound-- Returns an upper bound for the given asymptotic expansion by turning all B-term instances into exact terms -
taylor_with_explicit_error-- Determines the series expansion with explicit error bounds of a given functionfat a specified asymptotic term.
Demo
A worksheet containing a comprehensive introduction to the capabilities of
this package can be found here: toolbox_demo.ipynb.
Metadata
Release files for dependent-bterms 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dependent_bterms-1.0.2.tar.gz | 22.6 kB | Without provenance | Details for dependent_bterms-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dependent_bterms-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for dependent_bterms-1.0.2-py3-none-any.whl |
Total release size: 47.9 kB
Release files / dependent_bterms-1.0.2.tar.gz
| Download URL | dependent_bterms-1.0.2.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9e5ef9d92cb7719d1962555afaad48f5f99a3db4abe38284f3603ae8f9ab851
|
|
BLAKE2b-256 checksum How to use checksums |
77b74e3fba5fdb76e4f942782116e6d9f77901dd1e0a4ffdbf3d1a6172ceeab2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.6.4
|
Release files / dependent_bterms-1.0.2-py3-none-any.whl
| Download URL | dependent_bterms-1.0.2-py3-none-any.whl |
|---|---|
| Size | 25.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7db5b7f57600299245e0666238855cfa1c5d9081c71eb2df56c4255f04c632e
|
|
BLAKE2b-256 checksum How to use checksums |
66634b3f5e62cd0f06d5b8aad51cf82ca3eebeda3cf3eff25faf3f58427196a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.6.4
|
Security for dependent-bterms 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.