On Wed, Feb 20, 2013 at 6:10 PM, Dennis E. Hamilton <orc...@apache.org> wrote:
> Ah, very good.  Yes I see Normative Appendix F in ISO/IEC 9899:1999 (C99), 
> along with
>
> "An implementation that defines _ _STDC_IEC_559_ _ shall conform to the 
> specifications
>  in this annex. Where a binding between the C language and IEC 60559 is 
> indicated,
>  the IEC 60559-specified behavior is adopted by reference, unless stated 
> otherwise."
>  [section F.1]
>
> which is, of course, why it is not bolted into the main text of the standard.
>
> This carries through to ISO/IEC 9899:2011.
>
> Thanks for connecting that particular dot,
>

I don't know the background story on this, but it seems almost like a
"profile".  There is the core conformance clauses, in which some
things are implementation-defined, and then this additional annex
which profiles the requirements of the specification for use with
IEEE-conforming floating point processors.  So it tightens the
requirements.  Of course, one could claim conformance with or without
the Annex F requirements.

For traditional desktop use of AOO, I bet the Annex describes the
relevant set of requirements.  But down the road there are two areas
that might make this less certain:  1) mobile devices and 2) GPU's.
I'm not sure that IEEE 754 is guaranteed in those cases.    But if we
ever support those kinds of processors then we'll have bigger
headaches to worry about ;-)

Regards,

-Rob

>  - Dennis
>
> PS: There is no counterpart of Appendix F in ISO/IEC 14882:1998 (C++) nor 
> ISO/IEC 14882:2003 and ISO/IEC 14882:2011.  I assume this is because C++ has 
> the numeric_limits class to account for the variations in implementations 
> without any mention of IEC 60559 (or the IEEE counterpart on which it 
> derives).  Also, these rely on a variable is_iec559 and specify a number of 
> numeric_limits conditionally on iec559 != false.  The declaration of 
> conformance to IEC [60]559 (IEEE 754) does not make any of the exceptions 
> that are in ISO C Appendix F.
>
> -----Original Message-----
> From: Rob Weir [mailto:robw...@apache.org]
> Sent: Wednesday, February 20, 2013 14:08
> To: dev@openoffice.apache.org; orc...@apache.org
> Subject: Re: Solving this 0⁰ issue correctly (was Re: Calc behavior: result 
> of 0 ^ 0)
>
> On Wed, Feb 20, 2013 at 4:37 PM, Dennis E. Hamilton <orc...@apache.org> wrote:
>> I earlier quoted the applicable (and only) texts from the Standards 
>> themselves, particularly C++ and also the latest C Standard (2011 and C99 
>> with all Technical Corrigenda through 2007).
>>
>> No matter what is said about pow(0,0) in the C99 Rationale v5.10 Appendix F 
>> of April 2003, there are no such requirements in the Standards, including 
>> those versions that have been adopted since 2003.
>>
>>  - Dennis
>>
> [ ... ]
>
> In other words, C99, in a normative Annex F, section 9.4.4, for
> implementations that conform to IEEE 754 floating point, says:
>
> "pow(x, ±0) returns 1 for any x, even a NaN."
>
> Do you see something different?
>
> I'd like to make sure we're seeing the same thing here.
>
> -Rob
>
>
> [ ... ]
>

Reply via email to