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

Module fsums

Class Fsum for running, precision floating point summation.


Version: 22.01.21

Classes
  Fsum
Precision summation similar to standard Python function math.fsum.
  Fsum2Tuple
2-Tuple (fsum, residual) with the accurate, running fsum and residual the precision sum of the remaining partials, both float.
Functions
 
fsum(iterable)
Return an accurate floating point sum of values in the iterable.
 
fsum_(*xs)
Precision summation of all positional arguments.
 
fsum1(xs)
Precision summation, primed with 1.0.
 
fsum1_(*xs)
Precision summation of a few arguments, primed with 1.0.
Variables
  __all__ = _ALL_LAZY.fsums
Function Details

fsum (iterable)

 

Return an accurate floating point sum of values in the iterable. Assumes IEEE-754 floating point arithmetic.

fsum_ (*xs)

 

Precision summation of all positional arguments.

Arguments:
  • xs - Values to be added (scalars).
Returns:
Accurate fsum (float).
Raises:
  • OverflowError - Partial 2sum overflow.
  • TypeError - Non-scalar xs value.
  • ValueError - Invalid or non-finite xs value.

fsum1 (xs)

 

Precision summation, primed with 1.0.

Arguments:
  • xs - Iterable, list, tuple, etc. of values (scalars).
Returns:
Accurate fsum (float).
Raises:
  • OverflowError - Partial 2sum overflow.
  • TypeError - Non-scalar xs value.
  • ValueError - Invalid or non-finite xs value.

fsum1_ (*xs)

 

Precision summation of a few arguments, primed with 1.0.

Arguments:
  • xs - Values to be added (scalars), all positional.
Returns:
Accurate fsum (float).
Raises:
  • OverflowError - Partial 2sum overflow.
  • TypeError - Non-scalar xs value.
  • ValueError - Invalid or non-finite xs value.