[Cfp-interest 1331] AI to review 5abc rationale

Jim Thomas jaswthomas at sbcglobal.net
Tue Jun 18 14:07:46 PDT 2019


Action item:
>     All: Review the rationale for part 5 a, b, c proposal.


Here are discussion notes for this topic for tomorrow’s CFP teleconference.

TS 5abc 
http://wiki.edg.com/pub/CFP/WebHome/cfp5x-20180624.pdf <http://wiki.edg.com/pub/CFP/WebHome/cfp5x-20180624.pdf>

Included are pragmas for
Evaluation methods
Optimization
Reproducibility

 Intended to help with
1.     Porting floating-point code between platforms and tool sets, including debugging ported code
2.     Obtaining reproducible results (on same of different platforms)

 Major reasons for failures include differences in
1.     Evaluation methods
2.     Value changing optimizations

 Controls to manage evaluation methods and optimizations are implementation specific,  both in syntax and semantics. They often come in complicated combinations and are vaguely defined. It’s difficult to impossible to map controls on one system to equivalent ones on another.

5a requires support for evaluation to type for standard types and for evaluation to _Decimal64 for decimal types. Most implementations already provide evaluation to type for standard types, by some means.
5a specifies a pragma to set supported evaluation methods, at block scope like other FP pragmas.
5a also specifies a user definable macro to have tgmath macros follow the evaluation method like operators do. This is to allow wide evaluation that is consistent for all floating-point operations.

5b specifies pragmas to allow common optimizations. The controlled optimizations are well defined.

5c specifies a pragma to set the evaluation method, optimization, and other existing controls for reproducible results, and guidelines for code intended to be reproducible.

Could be recast as an annex.

Currently written so that 5c depends on 5a and 5b.

 A low-quality implementation could have a conformance mode where only evaluate to type is supported, optimizations are disabled, and pragmas are ignored.

Original proposals to WG14:
http://wiki.edg.com/pub/CFP/WebHome/n2120.pdf <http://wiki.edg.com/pub/CFP/WebHome/n2120.pdf>
http://wiki.edg.com/pub/CFP/WebHome/n2121.pdf <http://wiki.edg.com/pub/CFP/WebHome/n2121.pdf>
http://wiki.edg.com/pub/CFP/WebHome/n2122.pdf <http://wiki.edg.com/pub/CFP/WebHome/n2122.pdf>

- Jim Thomas
 

 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20190618/c3f0878f/attachment-0001.html 


More information about the Cfp-interest mailing list