FLINT3.7.0-dev

DFLOAT_TWO_SUM, DFLOAT_FAST_TWO_SUM, DFLOAT_TWO_PROD

Synopsis#include <flint/dfloat.h>
DFLOAT_TWO_SUM(s, e, a, b)source
DFLOAT_FAST_TWO_SUM(s, e, a, b)source
DFLOAT_TWO_PROD(p, e, a, b)source

Error-free transformations: set ss and ee such that s+e=a+bs + e = a + b exactly with s=fl⁡(a+b)s = \operatorname{fl}(a + b) (Knuth's TwoSum, no precondition; Dekker's FastTwoSum, requiring exponent⁡(a)≥exponent⁡(b)\operatorname{exponent}(a) \ge \operatorname{exponent}(b) or a=0a = 0), or p+e=abp + e = ab exactly with p=fl⁡(ab)p = \operatorname{fl}(ab) (with fma; requires that abab neither overflows nor underflows, that is ∣ab∣≥2−969|ab| \ge 2^{-969} or ab=0ab = 0). See Error-free transformations.

Cite this page

The FLINT team, “DFLOAT_TWO_SUM, DFLOAT_FAST_TWO_SUM, DFLOAT_TWO_PROD (dfloat.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/dfloat/DFLOAT_TWO_SUM.html (generated 2026-11-02).