Subject: Re: libc arch/*/gen cleanup
To: Christos Zoulas <christos@zoulas.com>
From: Klaus Klein <kleink@reziprozitaet.de>
List: tech-userlevel
Date: 10/29/2001 20:56:48
christos@zoulas.com (Christos Zoulas) writes:
> On Oct 29, 1:05pm, simonb@wasabisystems.com (Simon Burge) wrote:
> -- Subject: Re: libc arch/*/gen cleanup
>
> | Christos Zoulas wrote:
> |
> | > >
> | > > union __infinity_u {
> | > > unsigned char val[8];
> | > > double dummy;
> | > > };
> | > > extern __const union __infinity_u __infinity;
> | > > #define HUGE_VAL (*(__const double *)(__const void *)&__infinity)
> | >
> | > I don't see why we need to have more than two union types. One for double
> | > and one for float.
> |
> | Yes, true. So "__double_u" and "__single_u" sound reasonable? What
> | about "long double", or that format not well defined?
> |
>
> __double_u and __float_u prolly.
I concur with those names.
> I would leave long double out for now.
You have choice but leaving this to machine-dependent headers; while
in C99 "float" always matches single format and "double" always
matches double format, the format matched by "long double" is
machine-dependent and may be either an extended format or double
format.
> Do we have constants for it.
Not quite clear what you mean by this, but yes, C99 specifies a
HUGE_VALL.
- Klaus