Re: [RFC] decimal float point patch based on libdecnumber: testcase

Daniel Jacobowitz
2006-06-23T02:38:12Z

On Fri, Jun 23, 2006 at 07:27:29AM +0800, Wu Zhou wrote:
> That is because they have different precision/exponent. Number
> 1234567890123456.dd have 16 digits, its coefficient is 1234567890123456,
> and exponent is 0, so it won't print back with an exponent. While in the
> case of "1.2E10dd", the coefficient is 12, exponent is 9, so it will print
> back with an exponent. And in exponent display mode, the coefficient will
> be normalized, in this case, to 1.2; and exponent get to 10 respectively.
>
> For "p 1200000000000000.dd", it will return 1200000000000000. It is
> equal to but different than 1.2E+15. Their precison is not the same.

So they map down to different bit patterns. How bizarre.

> Do you mean that we need to output something more close to the fact. to
> say, "Addition/Multiple of decimal floating point is not supported right
> now". or something other like this. If you want, I can do that.

No, I think what's there is fine - but add a test or two for that error
message.

--
Daniel Jacobowitz
CodeSourcery