This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libstdc++] numeric_limits: is_iec559


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]