[Cfp-interest 1657] decimal math functions

Fred J. Tydeman tydeman at tybor.com
Mon Jun 22 13:52:28 PDT 2020


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.



More information about the Cfp-interest mailing list