Package pygeodesy :: Module fsums |
[frames] | no frames]

# Module fsums

Class Fsum for precision running floating point summation.

Set env variable `PYGEODESY_FSUM_RESIDUAL` to nay non-empty string to throw a ResidualError for division or exponention by an Fsum instance with a non-zero `residual`, see methoda Fsum.fdiv and Fsum.fpow.

Version: 22.02.09

Classes
| ResidualError Error raised for an operation involving an Fsum with a non-zero residual.
| Fsum Precision running floating point summation similar to standard Python's `math.fsum`.
| Fsum2Tuple 2-Tuple `(fsum, residual)` with the precision running `fsum` and the `residual`, the sum of the remaining partials if any.

Functions
fsum(xs) Precision floating point summation based on or like Python's `math.fsum`. |
fsum_(*xs) Precision floating point summation of all positional arguments. |
fsum1(xs) Precision floating point summation of a few values, 1-primed. |
fsum1_(*xs) Precision floating point summation of a few arguments, 1-primed. |

Variables
| __all__ = `_ALL_LAZY.fsums`

Function Details

### fsum (xs) |
Precision floating point summation based on or like Python's `math.fsum`. Arguments: `xs` - Iterable, list, tuple, etc. of values (`scalar` or Fsum instances). Returns: Precision `fsum` (`float`). Raises: `OverflowError` - Partial `2sum` overflow. `TypeError` - Non-scalar `xs` value. `ValueError` - Invalid or non-finite `xs` value. Note: Exceptions and non-finite handling may differ if not based on Python's `math.fsum`. See Also: Class Fsum and methods Fsum.fsum and Fsum.fadd.

### fsum_ (*xs) |
Precision floating point summation of all positional arguments. Arguments: `xs` - Values to be added (`scalar` or Fsum instances), all positional. Returns: Precision `fsum` (`float`). See Also: Function `fsum`.

### fsum1 (xs) |
Precision floating point summation of a few values, 1-primed. Arguments: `xs` - Iterable, list, tuple, etc. of values (`scalar` or Fsum instances). Returns: Precision `fsum` (`float`). See Also: Function `fsum`.

### fsum1_ (*xs) |
Precision floating point summation of a few arguments, 1-primed. Arguments: `xs` - Values to be added (`scalar` or Fsum instances), all positional. Returns: Precision `fsum` (`float`). See Also: Function `fsum`