On Fri, Jan 29, 2021 at 03:45:49PM -0600, will schmidt wrote:
> On Thu, 2021-01-28 at 21:42 -0500, Michael Meissner via Gcc-patches wrote:
> > [PATCH] Add conversions between _Float128 and Decimal.
> > 
> 
> Hi, 
> Just a couple cosmetic nits in the description.  The changelog seems to
> match that patch contents OK.  
> 
> 
> > This patch implements conversions between _Float128 and the 3 Decimal
> > floating types.  It does by extendending the dfp-bit conversions to add a
> 
> nit: 'does so' or 'does this' 
> 
> > new binary floating point type (KF), and doing the conversions in the same
> > mannor as the other binary/decimal conversions.
> 
> manner.
> 
> > 
> > In particular for conversions from _Float128 to Decimal, it uses a sprintf
> > variant to convert _Float128 to strings, and a type specific function that
> > converts the string output to the appropriate Decimal type
> > 
> > For conversions from one of the Decimal types to _Float128, it uses a 
> > decimal
> > function to convert to string (i.e. __decimal<n>ToString), and then uses a
> > variant of strtold to convert to _Float128.
> 
> 
> Are the sprintf and strtold functions called actually variants? 

Normally sprintf and strtold are used for converting between binary and decimal
floating point types.

With these patches, when you are converting _Float128 to Decimal, __sprintfkf
is used instead of sprintf.  When you are converting Decimal to _Float128,
__strtokf is used instead of strtold.  These two functions handle checking
whether GLIBC 2.32 or newer was used and if so, it calls __sprintfieee128 or
__strtoieee128 respectively.  If GLIBC 2.31 or earlier was used, then it does
the conversion between __ibm128 and _Float128 to do the conversion.

> Other source files in libgcc/config appear to have the copyright range
> starting at a later date, presumably when the file was created.
> So.. I think this should be Copyright (C) 2021 FSF....

Well they were initially cloned from other files, so I kept the long copyright
date.  But I could use just 2021.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797

Reply via email to