GNU bug report logs - #68871
Can't use od to print half-precision floats

Previous Next

Package: coreutils;

Reported by: "Rozenberg, Eyal (Consultant)" <Eyal.Rozenberg <at> gehealthcare.com>

Date: Thu, 1 Feb 2024 14:28:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Pádraig Brady <P <at> draigBrady.com>, "Rozenberg, Eyal (Consultant)" <Eyal.Rozenberg <at> gehealthcare.com>, 68871 <at> debbugs.gnu.org
Subject: bug#68871: Can't use od to print half-precision floats
Date: Thu, 1 Feb 2024 11:08:18 -0800
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.




This bug report was last modified 1 year and 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.