Skip to content

polykin.math¤

RootResult dataclass ¤

Dataclass with root solution results.

ATTRIBUTE DESCRIPTION
success

If True, the root was found.

TYPE: bool

niter

Number of iterations.

TYPE: int

x

Root value.

TYPE: float

f

Function value at root.

TYPE: float

Source code in src/polykin/math/solvers.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@dataclass
class RootResult():
    """Dataclass with root solution results.

    Attributes
    ----------
    success: bool
        If `True`, the root was found.
    niter: int
        Number of iterations.
    x: float
        Root value.
    f: float
        Function value at root.
    """
    success: bool
    niter: int
    x: float
    f: float