VakintNumericalResult
Symbolica documentation for getting started, symbolic expressions, numerical evaluation, pattern matching, and APIs in Python and Rust.
VakintNumericalResult
class VakintNumericalResultNumerical Laurent series in the dimensional-regularization parameter epsilon.
Methods
| Name | Description |
|---|---|
__new__ |
Create a numerical Laurent series from (epsilon exponent, (real, imaginary)) tuples. |
__str__ |
String representation of the numerical result. |
compare_to |
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. |
to_list |
Convert the numerical result to a native Python list of (epsilon exponent, (real, imag)) tuples. |
__new__
VakintNumericalResult.__new__(values: typing.Sequence[tuple[builtins.int, tuple[builtins.float, builtins.float]]]) -> VakintNumericalResultCreate a numerical Laurent series from (epsilon exponent, (real, imaginary)) tuples.
Examples
>>> from symbolica.community.hepkit.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())
4Parameters
values(List[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.
__str__
VakintNumericalResult.__str__() -> builtins.strString representation of the numerical result.
Examples
>>> from symbolica.community.hepkit.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)
ε^-3 : (0+-11440.5314035461i)
ε^-2 : (0+57169.9552189803i)
ε^-1 : (0+-178748.983837769i)
ε^ 0 : (0+321554.112218480i)compare_to
VakintNumericalResult.compare_to(
other: VakintNumericalResult,
relative_threshold: builtins.float,
error: typing.Optional[VakintNumericalResult] = None,
max_pull: typing.Optional[builtins.float] = None,
) -> tuple[builtins.bool, builtins.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.hepkit.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
False
>>> "ε^-2" in details
TrueParameters
other(VakintNumericalResult) The other numerical result to compare to.relative_threshold(float) The relative threshold for comparison.error(Optional[VakintNumericalResult]) An optional numerical result representing the error in the evaluation.max_pull(Optional[float]) The maximum pull for comparison. Default is 3.0.
to_list
VakintNumericalResult.to_list() -> builtins.list[tuple[builtins.int, tuple[builtins.float, builtins.float]]]Convert the numerical result to a native Python list of (epsilon exponent, (real, imag)) tuples.
Examples
>>> from symbolica.community.hepkit.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]
(-3, (0.0, -11440.53140354612))