[Cfp-interest 1292] Next representable for a double-double

Fred J. Tydeman tydeman at tybor.com
Thu Apr 25 20:44:34 PDT 2019


How to find next representable number for long double being a
double-double.

long double ld = some value;
double dhi, dlo;

dhi = ld;       /* get high word */
dlo = ld - dhi; /* get low word */
dlo = nextafter(dlo,INFINITY); /* next representable */
ld = dhi + dlo; /* next representable after ld */


---
Fred J. Tydeman        Tydeman Consulting
tydeman at tybor.com      Testing, numerics, programming
+1 (702) 608-6093      Vice-chair of PL22.11 (ANSI "C")
Sample C99+FPCE tests: http://www.tybor.com
Savers sleep well, investors eat well, spenders work forever.



More information about the Cfp-interest mailing list