[Cfp-interest 2282] Re: nextup/nextdown and HUGE_VAL definition

Fred J. Tydeman tydeman at tybor.com
Mon Nov 22 10:45:34 PST 2021


On Mon, 22 Nov 2021 10:06:22 -0800 Jim Thomas wrote:
>
>Reword the specification of the nextup and nextdown functions to not refer to the HUGE_VAL macros, along the lines Vincent suggested. For example,
>
>Replace 
>
>       nextup(HUGE_VAL) is HUGE_VAL,
>
>with 
>
>       If x is the maximum number in the type, nextup(x) is x.
>

So, on systems without infinity, since there is no next higher number
than the maximum finite number, should that be an overflow?
If not, than it would help to add "(without overflow)" at the end of
what you suggest.

---
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