VakintNumericalResult
symbolica.community.vakint Class
VakintNumericalResult(values: Sequence[tuple[int, tuple[float, float]]])Numerical Laurent series in the dimensional-regularization parameter epsilon.
Constructor
#Create a numerical Laurent series from (epsilon exponent, (real, imaginary)) tuples.
Examples
from symbolica.community.vakint import VakintNumericalResult
result = VakintNumericalResult([
(-3, (0.0, -11440.53140354612)),
(-2, (0.0, 57169.95521898031)),
(-1, (0.0, -178748.9838377694)),
(0, (0.0, 321554.1122184795)),
])
len(result.to_list())Parameters
| Name | Type | Default | Description |
|---|---|---|---|
values | Sequence[tuple[int, tuple[float, float]]] | — | A list of tuples, each containing an integer exponent of epsilon and a tuple of two floats representing the real and imaginary parts of the coefficient. |
Member details
__str__
Method__str__() -> strString representation of the numerical result.
Examples
from symbolica.community.vakint import VakintNumericalResult
result = VakintNumericalResult([
(-3, (0.0, -11440.53140354612)),
(-2, (0.0, 57169.95521898031)),
(-1, (0.0, -178748.9838377694)),
(0, (0.0, 321554.1122184795)),
])
str(result)to_list
Methodto_list() -> list[tuple[int, tuple[float, float]]]Convert the numerical result to a native Python list of (epsilon exponent, (real, imag)) tuples.
Examples
from symbolica.community.vakint import VakintNumericalResult
result = VakintNumericalResult([
(-3, (0.0, -11440.53140354612)),
(-2, (0.0, 57169.95521898031)),
(-1, (0.0, -178748.9838377694)),
(0, (0.0, 321554.1122184795)),
])
values = result.to_list()
values[0]compare_to
Methodcompare_to(other: VakintNumericalResult, relative_threshold: float, error: Optional[VakintNumericalResult] = None, max_pull: Optional[float] = None) -> tuple[bool, str]Compare this numerical result to another, returning a tuple of (bool, str) where the bool indicates whether the results match within the specified thresholds, and the str provides details of the comparison.
Examples
from symbolica.community.vakint import VakintNumericalResult
result1 = VakintNumericalResult([
(-3, (0.0, -11440.53140354612)),
])
result2 = VakintNumericalResult([
(-3, (0.0, -11440.53140354612)),
(-2, (0.0, 2.0)),
])
matches, details = result1.compare_to(result2, relative_threshold=1e-5)
matches
"ε^-2" in detailsParameters
| Name | Type | Default | Description |
|---|---|---|---|
other | VakintNumericalResult | — | The other numerical result to compare to. |
relative_threshold | float | — | The relative threshold for comparison. |
error | Optional[VakintNumericalResult] | None | An optional numerical result representing the error in the evaluation. |
max_pull | Optional[float] | None | The maximum pull for comparison. Default is 3.0. |
View generated signature source: docs/api/python/vakint-community.pyi:441