This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [libstdc++] numeric_limits: is_iec559
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Richard Henderson <rth at twiddle dot net>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: 22 Sep 2002 09:13:41 +0200
- Subject: Re: [libstdc++] numeric_limits: is_iec559
- Organization: Integrable Solutions
- References: <20020921154554.A2175@twiddle.net>
Richard Henderson <rth@twiddle.net> writes:
| Other than true IEC 559 targets, we have three variations:
|
| (1) Really really non-IEEE, e.g. VAX.
| (2a) IEEE, except missing Infinities, NaNs and denormals.
| (2b) IEEE, except missing denormals.
|
| In case 1, in no supported case do we have infinities or NaNs,
| so the definition used below is correct.
Agreed.
| In case 2a, the c++ standard requires that has_infinity,
| has_quiet_NaN, and has_signaling_NaN all be true, so we cannot
| set is_iec599.
Agreed.
| For case 2b, I cannot find a requirement that denormals be supported.
Well, the C++ Standard is a bit schyzophrenic about is_iec559. LIA-1,
in the Rationale (paragraph A.5.2.9), says:
[...] This means that a complete LIA-1 binding will include a
binding for IEC 559 as well.
However, the C++ standard library does not include most of the interesting
IEC 559 functions (now found in C99).
| Indeed, the example numeric_limits<float> in section 18.2.1.5 shows
| has_denorm=denorm_absent but is_iec559=true. Not that it matters at
| the moment, since we don't have an target that has this case.
I believe that example is bogus. I'll raise the issue on the Library
Reflector.
| Ok?
Yes.
Thanks!
-- Gaby