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 s and e such that s + e = a + b exactly with s = \operatorname{fl}(a + b) (Knuth's TwoSum, no precondition; Dekker's FastTwoSum, requiring \operatorname{exponent}(a) \ge \operatorname{exponent}(b) or a = 0), or p + e = ab exactly with p = \operatorname{fl}(ab) (with fma; requires that ab neither overflows nor underflows, that is |ab| \ge 2^{-969} or ab = 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-10-20).