[Cfp-interest] CFP document ideas
Rajan Bhakta
rbhakta at ca.ibm.com
Thu Nov 10 10:18:24 PST 2011
WG 14 Fall 2011 meeting notes for IEEE 754-2008 binding
IEEE 754-2008 C Binding
Jim Thomas presenting, 11:00 am, October 25th, 2011
Notes by Rajan Bhakta
Changes required:
Slide 2: Vendor (spelling mistake)
Slide 3: Goal change: TS that superscedes the Decimal FP TR and specifies
the binding to IEEE 754-2008.
Alternate exception handling (recommended): "substitute" has a typo
Key Comments:
** What is the market for tihs?
We need macros for widths of integers to make use of these easy (New
Operations (3))
Small manpower implies the CFP group should do parts of this instead of
everything. It is call of the CFP group what they want to do.
Suggestion: The reduction functions can be a later part after the core
part is issued.
John Benito will work with us to get the idea of the how to write and
organize the base document.
Full Discussion Notes:
Blaine: What are the implications on Annex F?
Jim: Will specify changes to Annex F and the standard itself.
Tom: Annex F covers the old IEEE spec. If you want the new spec you use
the TS
Blaine: There are changes that could cause Annex F to change. Since Annex
F is Conditionally Normative
Jim: Current Annex F allows flexibility where the new TS won't
Blaine: This could be the new Annex F in the next revision of the C
standard
Jim: This would be an "extension" to the standard
Doug: What language recommendations were made by IEEE?
Jim: We'll go through them in the later slides
Tom: Anyone from Fortran on the committee?
Jim: Intel is interested in Fortran. David Huff is also there from Oracle.
Slide 5:
Doug: Does quad conflict with Annex F?
Jim: If we do make this required it would pin down a flexibility.
Bill: What does arithmetic format mean?
Jim: You can do arithmetic with it?
Doug: Interchange formats don't need types.
Blaine: They have to be some opaque types.
Clive: What is a non-arithmetic type?
Jim: It is just a storage type, you can convert it to an arithmetic type
to do operations
Slide 6:
Blaine: 32 extended can have 64 or 128 sizes?
Jim: Yes
Slide 9:
Blaine: Implicit conversions?
Jim: No, through assignments and casts
Doug: Are the conversions by source constants or through runtime via
scanf/printf?
Jim: We'll cover this later
Tom: Do the new operations use tgmath?
Jim: There are fixed versions. Type generic will apply as well.
P.J.: What is the difference between nextUp/Down vs nextAfter/nextTowards
functions.
Jim: Difference is that these take one argument. Not removing old ones.
Blaine: What does integer logb currently do?
Jim: Currently unspecified.
Blaine: Will the narrowing functions be type generic or functions?
Jim: Functions. Only used to narrow types.
Doug: How does it handle all floating types?
Jim: One set of these for each floating type
*Doug: Implies we need macros for widths of integers to make use of these
easy (New Operations (3))
New Operations (4):
Blaine: What are the types?
Jim: They are the containers for the bits in those encodings
Doug: Can you feed a binary into the encoder and get a decimal?
Jim: IBM gives DPD encoding, use the dpdencodingdN_t, and then use the
decode function to get it in BID format
Blaine: How do you get the bytes of these? For transmittal?
Jim: Use sizeof, fixed size.
Tom: Is there a way to make an entry canonical
Jim: There is a canonical function
P.J.: Isn't there a trick to do this?
Fred: Multiple by one but it may be optimized out
New operations (6):
P.J.: Could be used for hashtables. Why not just look at the magnitudes?
Doug: What sort of value does this give?
Jim: Gives the greater/less ordering. Bit ordering gives different results
for decimal
P.J.: Yes, for decimal it doesn't work
Character string conversions:
Doug: Why 3?
Jim: It is a cushion. IEEE recommends Infinity, but has to be at least 3.
NaN:
Bill: Is the payload an interesting quantity?
Jim: It can be. For example, diagnostic information.
Doug: Is there a range for the payload?
Jim: Significand - 1 (sign) is used to representing an integer. The IEEE
spec specifies that the pl argument has to be in the range needed.
Bill: So it can be a DPD interpreted value, not just bits
Static rounding attributes:
P.J.: Static could mean compile time or code exectuted before main. Which
ones?
Jim: Means both. Compilers always default to round to nearest.
Doug: Dynamic overrides static?
Jim: No, the other way around. Static overrides dynamic.
Doug: Library functions?
Jim: Dynamic rounding can be used to emulate static rounding.
P.J.: sqrt has to know the static rounding mode?
Jim: sqrt already has to know the dynamic rounding mode
Martin: How does the pragma interact with thread storage?
P.J.: A good implementation should follow the static value
Jim: Follows the same rules as the other std pragma
Martin: So it needs to be stashed somewhere for the thread
Scaled reduction functions (recommended):
Blaine: Surprised they are not type generic
Jim: In the same style, there are float and long double versions, just
listing the double version for examples
Slide before "Alternate exception handling (recommended)" (mode
setting/getting)
Doug: Can you reset back to default mode after a lot of changes?
Jim: Yes.
Blaine: By global do you mean thread?
Jim: Yes. Each thread has their own mode.
Alternate exception handling (recommended):
Martin: "substitute" has a typo
After:
*P.J.: What is the market for tihs?
Doug: Referenced in the C standard so we will need to acknowedge it. Could
be subset.
Blaine: Huge, so probably parts will be taken
*Benito: Small manpower implies the CFP group should do parts of this
instead of everything. It is call of the group.
David Keaton: Maybe as parts? Part 1, part 2, etc. to cover everything.
*Blaine: The reduction functions can be a later part
Doug: The study group is not implementing anything. They are just
specifying which is a great service to the implementors.
Blaine: The edge cases are where the most of the work is. This is where it
needs to be covered. Where the group invents is where the problems will
lie.
Jim: IEEE spec does go over in detail the cases.
Blaine: Can we phrase the TS to make parts optional to avoid burdening
implementers
Regards,
Rajan Bhakta
z/OS XL C/C++ Compiler Technical Architect
ISO C Standards Representative for Canada
C Compiler Development
Contact: rbhakta at ca.ibm.com, Rajan Bhakta/Toronto/IBM
Telephone: (905) 413-3995
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20111110/7ec8bfd0/attachment.html
More information about the Cfp-interest
mailing list