Skip to content

zuexact

0.1.0Package record

Exactly Rounded Sums, Means and Dot Products

0packages depend
48downloads / year
81.7%test coverage
10/10flavors OK

Overview

About

Sums of double-precision numbers computed exactly and rounded once, so the result is the correctly rounded true sum and does not depend on the order of the elements, the platform, or whether R was built with long doubles. Built on the small and large superaccumulators of Neal (2015) doi:10.48550/arXiv.1505.05571. Provides exactly rounded sums, means, cumulative sums, dot products and norms, row, column and grouped sums, accumulators that can be built in pieces and merged across processes, and a registered 'C' interface for other packages.

Changes in 0.1.0

First release.

  • Vendors Radford Neal's 'xsum' (stable version 3), patched so that no standard I/O reaches the compiled code; upstream's checker and fuzzer run against the vendored copy in CI.
  • A vignette, vignette("exact-summation"), explains why base sum() differs between platforms and how to sum in pieces and from C.
  • xsum() returns the exactly rounded sum of double, integer, logical and complex vectors, with na.rm, applying the same special-value rules on every platform. ALTREP vectors are read in blocks, never materialised.
  • zuexact_info() reports the vendored 'xsum' version, the accumulator threshold, SIMD and FMA support, and whether R has long doubles.
  • xsum_mean() divides the exact sum by the count with one rounding; xsum_weighted_mean() divides two exact sums.
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
  • xsum_dot(), xsum_sqnorm() and xsum_norm() include each product's rounding error (TwoProduct with fma()), so dot products are exactly rounded too.
  • xsum_cumsum() rounds every prefix sum exactly.
  • Accumulators as R values: xsum_acc(), xsum_add(), xsum_merge(), xsum_negate(), xsum_value() and xsum_mean_value() build exact sums in pieces, in any order, and across processes (they serialise).
  • xsum_rowsums(), xsum_colsums() and xsum_by() are exact versions of rowSums(), colSums() and rowsum(). Row sums work a block of rows at a time, so their extra memory does not grow with the number of rows.
  • A registered C interface, zuexact_api_v1 in inst/include/zuexact.h, gives other packages' C code the same exact accumulators, sums, dot products, merges and means, through LinkingTo: zuexact.
  • Every result is tested against exact rational arithmetic ('gmp'), PreciseSums::fsum(), the test262 Math.sumPrecise vectors and ill-conditioned inputs up to condition number 1e40, and must be bit-identical on every CI platform.

From NEWS.md in the release

Install

Health

CRAN checks
10OK
Slowest check: 2.6 min · r-devel-windows-x86_64
Status changes
  • OK10 OKNow
  • OK6 OK2026-10-23
Advisories

none known

Documentation

In release 0.1.0
READMEYes · 275 wordsVignettesYes · 1 · dynamicNEWSYes · 67% structured · mentions 0.1.0Citation fileNoWebsiteYes
Help pages
9 (1 internal)includes a package overview page
Examples that run
100%8 run in a plain check
Exported functions with examples
100%
Documented parameters
80%
Return-value docs
100%
Help pages citing references
0%
Vignettes (1)

Downloads

48
CRAN downloads in the past year
Rank #25,683 · ~0/day · ~4/mo
zuexact
Daily download trend is not available in this view yet.

Repository

0Stars
0Forks
2Open issues
0Open PRs
1Releases
46Commits
1Commit identities
46 commits · Last activity 2026-10-22
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
0
Median days to close, 50 most recently updated closed PRs
0
PracticesBeta

Repository github.com/pedrobtz/zuexact is linked, but repository-practices checks have not run for it yet.

How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
6 external dependencies (excludes base and recommended)

Installing zuexact adds no packages beyond those that come with R.

Depends (1)
R >= 4.1
Imports (0)
none
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (2)
Author, Maintainer since 0.1.0 (2026), Copyright holder
Copyright holder
Author of the vendored 'xsum' library
Releases (1)
  • 0.1.0Latest
    2026-10-22 · current release ·
    8 days in CRAN's queue
    Listed in CRAN's incoming queue from 2026-10-14 00:46 to 2026-10-22 06:53 UTC, in 50 readings.
  • R
    R 4.6.0 released · 2026-04-24
Across CRAN, the median accepted release of the past year spent 26 hours in the queue, 90% under 11 days.How queue time is measured

Package metadata

First published
2026-10-22
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1
Download size
82 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("zuexact")
Baltazar, P., & Neal, R. M. (2026). zuexact: Exactly Rounded Sums, Means and Dot Products (Version 0.1.0) [Computer software]. https://doi.org/10.32614/CRAN.package.zuexact

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for zuexact version 0.1.0 [Data set]. HJJB, LLC. Data release v2026-10-25. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy