bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#68871: Can't use od to print half-precision floats


From: Paul Eggert
Subject: bug#68871: Can't use od to print half-precision floats
Date: Thu, 1 Feb 2024 11:08:18 -0800
User-agent: Mozilla Thunderbird

Thanks for writing that. One suggestion I'd make is to change this:

 #ifndef FLT16_MAX
 /* This is just a place-holder to avoid a few '#if' directives.
    In this case, the type isn't actually used.  */
 typedef float _Float16;
 #endif

to something like this:

 #ifdef FLT16_MAX
 typedef _Float16 float16;
 #else
 /* This is just a place-holder to avoid a few '#if' directives.
    In this case, the type isn't actually used.  */
 typedef float float16;
 #endif

and use 'float16' thereafter. That way, the code doesn't usurp the system namespace on older platforms, some of which might define _Float16 but not FLT16_MAX.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]