This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A bug in the current _M_insert_float/_M_group_float


Paolo Carlini writes:
 > Hi,
 > 
 > I think there is a bug, which, however, probably I'm not going to
 > fix since we are in the process of replacing all of this with the
 > fast code adapted from v2. But it may be worth pointing it out,
 > also to be sure that we do this right in the new framework.
 > 
 > Basically, in _M_group_float, if __p is NULL - this means that no
 > decimal digit was found - the whole [__cs, __cs + __len) is considered
 > for grouping, irrespective of the use of a scientific notation!
 > 
 > Paolo.
 > 
 > P.S. Hummm, first blush the problem is present also in the last
 > version I have of Jerry's code... Jerry?

The problem is definitely still present in my version of floating
point.  I didn't touch grouping processing in my stuff.

The real issue is the standard didn't address floating point output
grouping at all.  I would think the reasonable think is to terminate
grouping when you hit the exponent, whether or not there's a
fractional part.

Issue 282 says adds floating point grouping.  Issue 358 says don't
group beyond the decimal point.  Perhaps another issue is needed to
say that grouping shouldn't be applied to the exponent section.  Or
could issue 358 be extended to deal with this as well?

Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]