[Cfp-interest 3102] Re: Issue: frexp and double-double underflow

Fred J. Tydeman tydeman at tybor.com
Tue Apr 23 22:09:43 PDT 2024


On Tue, 23 Apr 2024 22:56:50 -0600 (PDT) Fred J. Tydeman wrote:
>
>It is no different than frexp( DBL_TRUE_MIN*2.2, &exp);
>which returns DBL_TRUE_MIN*1.1 (which is not underflow)

Oops.  Wrong example.  That frexp() would return a value
between 0.5 and 1.0.

long double a = 1.L + DBL_TRUE_MIN;
long double b;

b = a / 2.L;  /* would return 0.5L + DBL_TRUE_MIN/2.L */

Which is not an underflow


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



More information about the Cfp-interest mailing list