I will study real.c carefully along with the C99 std
to determine if I can find useful values for RMIN2 and RMINSCAL
for each format which are within range for all instances
of that format. A quick skim of real.c shows we have ieee half precision
and two arm half precision formats, for example.
I appreciate the pointer to real.c as I was sure that information
about various platform formats was somewhere in the src tree, but
had not found it on my own.
- patrick
On 6/10/2020 5:39 PM, Joseph Myers wrote:
On Wed, 10 Jun 2020, Patrick McGehearty wrote:
#ifdef L_divhc3
#define RBIG (correct value for half precision)
#define RMIN (correct value for half precision)
#define RMIN2 ... (correct value for half precision)
#define RMINSCAL ... (correct value for half precision)
#endif
#ifdef L_divsc3
#define RBIG FLT_MAX
#define RMIN FLT_MIN
#define RMIN2 ...
#define RMINSCAL ...
#endif
...
would get the job done once I determine (and test) the correct
values for all formats.
But some of those machine modes can represent several different
floating-point formats, depending on the target. There are many more
floating-point formats supported in real.c than there are names for
floating-point machine modes. Not all the differences are relevant here
(those differences relating to default NaNs, for example), but some are.