Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Scientific Computing
  3. accupy

accupy

GPL-3.0Python0.3.6

A Python library for computing accurate sums and dot products, mitigating floating-point errors in numerical computations.

GitHubGitHub
107 stars15 forks0 contributors

What is accupy?

Accupy is a Python library that provides accurate summation and dot product computations to mitigate floating-point rounding errors. It implements several high-precision algorithms like Kahan summation, Shewchuck's algorithm, and K-fold precision methods, addressing numerical instability in ill-conditioned problems. The library is particularly useful when standard NumPy functions produce inaccurate results due to digit cancellation or large condition numbers.

Target Audience

Scientific computing researchers, data scientists, engineers, and developers working with numerical algorithms where floating-point accuracy is critical, such as in computational geometry, financial modeling, or physics simulations.

Value Proposition

Developers choose Accupy for its provably accurate algorithms that guarantee higher precision than standard Python/NumPy functions, along with tools for condition number analysis and ill-conditioned problem generation. It fills a niche for numerical stability without requiring arbitrary-precision arithmetic.

Overview

:dart: Accurate sums and dot products for Python.

Use Cases

Best For

  • Summing large sequences of floating-point numbers with minimal rounding errors
  • Computing dot products in high-dimensional spaces where accuracy is paramount
  • Benchmarking numerical algorithms against ill-conditioned test cases
  • Scientific simulations requiring reproducible and precise numerical results
  • Educational purposes to demonstrate floating-point error mitigation techniques
  • Financial or statistical calculations where small errors can accumulate significantly

Not Ideal For

  • High-performance numerical computing where speed is critical and minor rounding errors are acceptable, such as real-time signal processing or machine learning inference.
  • Applications deployed in environments with restricted C++ library installations, like serverless functions or lightweight containers, due to the Eigen dependency.
  • Projects that only involve well-conditioned sums or dot products where standard NumPy functions provide sufficient accuracy without performance penalties.
  • Teams relying on GPU-accelerated linear algebra libraries for large-scale data processing, as accupy is CPU-based and slower.

Pros & Cons

Pros

Provably Accurate Algorithms

Implements Shewchuck's fsum algorithm, which guarantees accurate summation up to the last digit, as demonstrated in accuracy comparisons where it outperforms naive methods for ill-conditioned sums.

Multiple Precision Options

Offers Kahan summation, fsum, and adjustable K-fold precision (ksum), allowing users to balance accuracy and performance based on their specific numerical stability needs.

Condition Number Analysis

Provides functions to compute condition numbers for sums and dot products, helping users assess numerical stability and identify potential error sources before relying on results.

Benchmarking Utilities

Includes tools to generate ill-conditioned test cases with specified condition numbers, useful for validating algorithms and educational demonstrations of floating-point errors.

Cons

Significant Performance Overhead

Runtime comparisons in the README show that accupy's methods, especially fsum, are much slower than NumPy's optimized functions, making it unsuitable for speed-critical applications.

C++ Dependency Complexity

Requires the Eigen C++ library for installation, which adds setup hurdles and may not be available in all Python environments, limiting portability and ease of use.

Limited Operational Scope

Focused solely on summation and dot products, lacking support for other numerical operations like matrix multiplication or integration that might also benefit from high-precision computations.

Frequently Asked Questions

Quick Stats

Stars107
Forks15
Contributors0
Open Issues2
Last commit4 years ago
CreatedSince 2018

Tags

#pypi#scientific-computing#mathematics#python-library#engineering#python#accuracy#numerical-computing#numpy#numerical-methods

Built With

E
Eigen
P
Python
N
NumPy
C
C++

Included in

Scientific Computing1.5k
Auto-fetched 17 hours ago

Related Projects

quadpyquadpy

:triangular_ruler: Numerical integration (quadrature, cubature) in Python

Stars789
Forks90
Last commit2 months ago
orthopyorthopy

:triangular_ruler: Orthogonal polynomials in all shapes and sizes.

Stars191
Forks18
Last commit2 months ago
HPDDMHPDDM

A framework for high-performance domain decomposition methods.

Stars153
Forks38
Last commit1 month ago
PyDMDPyDMD

mathLab mirror of Python Dynamic Mode Decomposition

Stars126
Forks10
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub