This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: IEEE128 binary float to decimal float conversion routines
- From: Steven Munroe <munroesj at linux dot vnet dot ibm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: Christoph Lauter <christoph dot lauter at lip6 dot fr>, "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, Steve Munroe <sjmunroe at us dot ibm dot com>, Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>, Michael R Meissner <mrmeissn at us dot ibm dot com>
- Date: Wed, 23 Dec 2015 11:33:07 -0600
- Subject: Re: IEEE128 binary float to decimal float conversion routines
- Authentication-results: sourceware.org; auth=none
- References: <564A16D5 dot 3020105 at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 10 dot 1511161803500 dot 30498 at digraph dot polyomino dot org dot uk> <564A53CE dot 8080500 at lip6 dot fr> <alpine dot DEB dot 2 dot 10 dot 1511162234340 dot 32387 at digraph dot polyomino dot org dot uk> <1450473096 dot 8390 dot 75 dot camel at oc7878010663> <alpine dot DEB dot 2 dot 10 dot 1512182118350 dot 11373 at digraph dot polyomino dot org dot uk> <1450501415 dot 8390 dot 111 dot camel at oc7878010663> <alpine dot DEB dot 2 dot 10 dot 1512191632440 dot 19330 at digraph dot polyomino dot org dot uk>
- Reply-to: munroesj at linux dot vnet dot ibm dot com
On Sat, 2015-12-19 at 16:40 +0000, Joseph Myers wrote:
> On Fri, 18 Dec 2015, Steven Munroe wrote:
>
> > > Well, I'd think the starting point is to implement operations following
> > > the correct semantics, which are quite clear in both TR 24732:2009 and TS
> > > 18661-2: as per IEEE 754-2008, conversions are correctly rounded with
> > > correct exceptions.
> >
> > Then you should be specific! Specific examples with test cases.
>
> https://github.com/libdfp/libdfp/issues/29
> https://github.com/libdfp/libdfp/issues/30
> https://github.com/libdfp/libdfp/issues/31
> https://github.com/libdfp/libdfp/issues/32
> https://github.com/libdfp/libdfp/issues/33
> https://github.com/libdfp/libdfp/issues/34
>
> All include testcases, tested with current git libdfp on POWER8
> little-endian. Five of the six work correctly with the libgcc
> conversions. All should be understood to be likely to apply to most of
> the binary/decimal conversions in libdfp, in both directions, not just to
> the conversions from _Decimal128 to double used to illustrate them,
> because of the similarity of code used for different conversions. I think
> together those issues provide reasonable coverage of the problems with
> libdfp conversions that I've identified in this thread.
>
Yes this is specific and sufficient, we will start working on resolving
these.
I suspect some of these are errors copied from the ieee sources long ago
that you have since corrected. We will use this a guide.
As for the conversions and rounding, libgcc meets your goal because it
is using the decnumber soft-dfp library. So we have that to fall back
on.
That libdfp is only 1ULP off is actually reassuring. As the tables use
for these conversions are program generated and need to expanded for
_float128, now is good time to revisit this. Also it is good time to
measure and quantify the performance delta to make appropriate
engineering trade-offs.
Thank you.