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

Module fsums

Class Fsum for precision running floating point summation.

Set env variable PYGEODESY_FSUM_RESIDUAL to "std" to throw an exception for division or exponention by an Fsum instance with a non-zero residual, see method Fsum.fsum2.


Version: 22.02.01

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 residual the sum of the remaining partials, both float.
Functions
 
fsum(iterable)
Return an accurate floating point sum of values in the iterable.
 
fsum_(*xs)
Precision floating point summation of all positional arguments.
 
fsum1(xs)
Precision floating point summation, 1-primed.
 
fsum1_(*xs)
Precision floating point summation of a few arguments, 1-primed.
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 floating point summation of all positional arguments.

Arguments:
  • xs - Values to be added (scalars).
Returns:
Precision fsum (float).

See Also: Function fsum.

fsum1 (xs)

 

Precision floating point summation, 1-primed.

Arguments:
  • xs - Iterable, list, tuple, etc. of values (scalars).
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 (scalars), all positional.
Returns:
Precision fsum (float).

See Also: Function fsum