[Cfp-interest 1686] Re: decimal math functions

Jim Thomas jaswthomas at sbcglobal.net
Tue Jul 7 15:27:45 PDT 2020


My understanding is that when TS-2 was added to the C2X draft, WG 14 decided (and CFP agreed) that conditional features in the main body of the standard would not have their library interfaces (in the main body of the standard) guarded by a WANT macro (though such a macro was specified in TS-2). This would not apply to interfaces in an annex.

By the same principle, the TS-4a interfaces would not need a WANT macro. However, TS-4a went into C2X as a non-conditional feature, so there’s even less reason for a WANT macro. The purpose of N 2401 was to give the editor the TS-4a changes to C, highlighting text to be added and removed. Other parts of TS-4a were unchanged. In particular, the Conformance section which mentions the feature macro wasn’t removed. Note that the macro is not mentioned in any of the specified changes to C. 

- Jim Thomas

> On Jun 22, 2020, at 1:52 PM, Fred J. Tydeman <tydeman at tybor.com> wrote:
> 
> On Fri, 19 Jun 2020 10:11:01 -0700 (PDT) Fred J. Tydeman wrote:
>> 
>> Fred: Maybe also for part4a decimal math functions: asinpid32 needs
>> both decimal and extra functions.
>> NOTE: Needs to be on agenda for next meeting.
> 
> Decimal floating-point is optional (6.10.8.3 Conditional feature macros):
> 
>  __STDC_IEC_60559_DFP__ The integer constant yyyymmL, intended to
>  indicate support of decimal floating types and conformance to Annex
>  F for IEC 60559 decimal floating-point arithmetic.
> 
> and Annex F IEC 60559 floating-point arithmetic:
> 
>  An implementation that defines __STDC_IEC_60559_DFP__ to yyyymmL
>  shall conform to the specifications for decimal floating-point
>  arithmetic in the following subclauses of this annex: ....
> 
> 
> 
> TS 18661-4, Part 4a supplementary math functions are optional:
> 
> WG14 N1949 is TS 18661-4 for publication.  Later, for C2X, it was
> broken up into parts.
> 
> WG14 N2355 [C11 version] was voted in 2019 May meeting (London)[N2377
> WG14 minutes]. Along with N2309 [rootn bug fix].  However, N2355 is
> not a set of detailed changes to C2X.
> 
> WG14 N2401 [C17 version] 2019 October meeting (Ithaca)[N2451 WG14
> minutes] has the detailed updates to C2X.  In part, it has:
> 2 Conformance
>   c) it defines __STDC_IEC_60559_FUNCS__ to 201506L.   
> 
> However, that macro is not mentioned as a change to C2X in N2401; it
> was mentioned as a change to 6.10.8.3#1 in N1949.
> 
> I believe that, to get the decimal part 4a math functions, the
> implementation needs two things.
> 
> #define __STDC_IEC_60559_DFP__
> #define __STDC_IEC_60559_FUNCS__
> 
> Also, the user needs two things (as mentioned in N1949):
> 
> #define __STDC_WANT_IEC_60559_DFP_EXT__
> #define __STDC_WANT_IEC_60559_FUNCS_EXT__
> 
> 
> 
> ---
> Fred J. Tydeman        Tydeman Consulting
> tydeman at tybor.com      Testing, numerics, programming
> +1 (702) 608-6093      Vice-chair of PL22.11 (ANSI "C")
> Sample C99+FPCE tests: http://www.tybor.com
> Savers sleep well, investors eat well, spenders work forever.
> 
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest




More information about the Cfp-interest mailing list