--- Comment #9 from Don <> 2009-09-07 04:25:35 PDT ---
(In reply to comment #8)
> (In reply to comment #4)
> > As far as I understand it, removing trailing zeros from .8 precision and (c)
> > are the same.
> I doubt it ... I think the optimal number of decimal s.f. would depend on the
> binary exponent.  But I'll experiment when I have time.

You are correct. Some numbers need an extra digit.

> > I remember .dig being 6 for all floats (could be wrong here, not close to 
> > any
> > dmd.exe)
> The spec describes .dig as "number of decimal digits of precision", which 
> seems
> ambiguous.  Is it a property of the type or the value? 

It's a property of the type. 

 If it's a type
> property, is it the maximum number of s.f. that may be required to express a
> number of the type unambiguously, or the number of s.f. to which numbers are
> guaranteed to be storeable unambiguously?  

Neither. It's the number of sic figs which are accurate in the worst case. So
it's the _minimum_ number of digits which are stored. To unambiguously define
the number, more digits are almost always required.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to