IEEE128 binary float to decimal float conversion routines

Joseph Myers joseph@codesourcery.com
Mon Nov 16 22:42:00 GMT 2015


On Mon, 16 Nov 2015, Christoph Lauter wrote:

> For what it's worth: some colleagues of mine and myself have recently
> published a paper on exact binary-to-decimal conversions between all IEEE754
> formats, assuming BID as the encoding for decimal. None of the algorithms we
> proposed uses a table larger that a couple of dozens of kilobytes. Converting
> between binary and decimal FP with correct rounding is essentially the same
> problem, so people might wish to have a look at these results:
> 
> > http://www.computer.org/csdl/trans/tc/preprint/07271015-abs.html

Thanks.  I'm not at all expert on decimal floating-point or on its state 
in the GNU toolchain (I just noted the absence of these conversions in the 
course of reviewing patches for __float128 libgcc support for powerpc).  
My general impression is that the IEEE 754 conformance state is probably 
similar to or worse than that for binary floating-point - that is, various 
miscellaneous local issues along with the same general issues of 
optimizations not respecting the state involved in exceptions and rounding 
modes (but because decimal floating-point is less widely used, such issues 
are less likely to have been found, especially if some code is correct for 
binary floating-point and no-one thought about decimal when writing an 
optimization, and especially when involving issues such as preferred 
quantum that don't exist for binary).

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list