[Cfp-interest] AI about C vs IEEE 754 specifications of pow

Rajan Bhakta rbhakta at us.ibm.com
Wed Feb 7 09:05:20 PST 2018


I would lightly opine keeping it as is (i.e. don't add a note).

Regards,

Rajan Bhakta
z/OS XL C/C++ Compiler Technical Architect
ISO C Standards Representative for Canada
C Compiler Development
Contact: rbhakta at us.ibm.com, Rajan Bhakta/Houston/IBM



From:   Jim Thomas <jaswthomas at sbcglobal.net>
To:     CFP <cfp-interest at ucbtest.org>
Date:   02/06/2018 07:48 PM
Subject:        [Cfp-interest] AI about C vs IEEE 754 specifications of 
pow
Sent by:        cfp-interest-bounces at oakapple.net



    Jim: pow: Add a note to F10.4.4 pow to say it is the same as IEEE-754.



C11 annex F already has a general statement about this. With the changes 
in TS 18661-1, it appears in F.1 as

[3] An implementation that defines __STDC_IEC_60559_BFP__ to 201ymmL shall 
conform to the specifications in this annex.356) Where a binding between 
the C language and IEC 60559 is indicated, the IEC 60559-specified 
behavior is adopted by reference, unless stated otherwise.
Also, C11 F.10 #3 says

Special cases for functions in <math.h> are covered directly or indirectly 
by IEC 60559. The functions that IEC 60559 specifies directly are 
identified in F.3. 

TS 18661-1 adds in F.10

[4a] The functions bound to operations in IEC 60559 (F.3) are fully 
specified by IEC 60559, including rounding behaviors and floating-point 
exceptions.

Is this sufficient? 

We observed that for pow it’s especially difficult to compare the C and 
IEC 60559 specifications. We could add a (redundant) note in F10.4.4:

NOTE The pow functions, like the other functions bound to operations in 
IEC 60559 (F.3), are specified by IEC 60559. The IEC 60559 specification 
is adopted by reference. The specification here is intended to to match 
IEC 60559.


Jim Thomas
_______________________________________________
Cfp-interest mailing list
Cfp-interest at oakapple.net
https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.oakapple.net_mailman_listinfo_cfp-2Dinterest&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=MPb4GyWs7nd-w3OlFPs29W1dB3gHMdsdghhjcQMf428&m=C9SD9mx-dYuVvTrIb9sKG1lvX480C21q9os5FG54uXU&s=Z6ZIRHtVGWr37cYfN7a8xN1DX0J8w5p5iR5SLCF9WCI&e=




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20180207/60feebee/attachment.html 


More information about the Cfp-interest mailing list