https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79528

--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
On Wed, 15 Feb 2017, jakub at gcc dot gnu.org wrote:

> It seems besides conversion from integer to decimal{32,64} also all the
> arithmetics e.g. in real_arithmetics are performed in _Decimal128 precision 
> and
> rounded according to that and then rounded again to the corresponding
> _Decimal{32,64} type.  As the precision in decimal digits of _Decimal64 is 
> just
> 16 and _Decimal128 is 34 decimal digits, perhaps it is just fine for +/-, but
> not sure about multiplication or FMA (if we ever allow that for decimal 
> float).

Multiplication is trivially OK (as the product of any two _Decimal64 
numbers is exactly representable in _Decimal128).

Division and square root may well be OK but would require a more detailed 
analysis.

Double rounding for fma is never OK (in round-to-nearest) as the product 
of two values can be an exactly half-way value, which is then added to 
something much smaller.

Reply via email to