Mail Archives: djgpp-workers/2000/03/28/06:52:07
On Mon, 27 Mar 2000, Martin Str|mberg wrote:
> > in situations like printf("%Lf"). But in the definition space provided by
> > C99, we have only limited choices what to fpclassify() an unnormal as:
> >
> > infinite
> > NaN
> > normal
> > subnormal
> > zero
>
> That's not true. In 7.12, about <math.h> it says:
> The macros
> FP_INFINITE
> FP_NAN
> FP_NORMAL
> FP_SUBNORMAL
> FP_ZERO
> are for number classification. ... Additional implementation-defined
> floating-point classifications, ..., may also be specified by the
> implementation."
Seems they must have changed that really late in the process of
drafting the C99 standard. There is no such passage in the C99 draft
I have here, dated January 18, 1999. To quote it verbatim:
[#6] The macros
FP_INFINITE
FP_NAN
FP_NORMAL
FP_SUBNORMAL
FP_ZERO
are for number classification. They represent the mutually
exclusive kinds of floating-point values. They expand to
integer constant expressions with distinct values.
[#7] The macro
FP_FAST_FMA
[...]
No mention of additional implementation-defined classes. Neither here,
nor in the paragraph on fpclassify() itself, in 7.12.3.1:
[#2] The fpclassify macro classifies its argument value as
NaN, infinite, normal, subnormal, or zero. First, an
argument represented in a format wider than its semantic
type is converted to its semantic type. Then classification
is based on the type of the argument.184)
What's the date and status of the C99 document you're citing? Is it by any
chance the final official one, already? I would have got one, myself, but
without a credit card, it's hard to shop overseas via the internet...
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -