[cfp-interest 3671] Re: Confusingly long sentence in F.3#6

Fred J. Tydeman tydeman at tybor.com
Mon Oct 20 06:47:49 PDT 2025


On Mon, 20 Oct 2025 17:23:19 +1100 (AEDT) Damian McGuckin wrote:
>
>
>Still confused.
>
>On Sat, 18 Oct 2025, Damian McGuckin wrote:
>
>>       The C classification macros fpclassify, iscanonical, isfinite,
>>       isinf, isnan, isnormal, issignaling, issubnormal, iszero,
>>       and signbit provide the ISO/IEC 60559 operations indicated in
>>       Table F.2 provided their arguments are in the format of their
>>       semantic type.
>
>The first 'their', i.e. their argument, refers to the one of those macros.
>
>To what does the second 'their' refer. It cannot again be referring to the macros as they have no semantic types.
>
>Very confused - Damian

float can be a double  or  long double  in format (depends upon FLT_EVAL_METHOD).
To force a value to be in the format of their semantic type requires a cast to that type.

So, 1e-315f could be zero (as a float), subnormal (as a double), or normal (as a long double).

So, if FLT_EVAL_METHOD is 2
(float)1e-315f  is zero
(double)1e-315f is subnormal
(long double)1e-315f is normal


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