[stlport-bugs] [ stlport-Bugs-1938765 ] grouping in num_put.cpp is wrong
Brought to you by:
complement
From: SourceForge.net <no...@so...> - 2008-04-09 16:03:56
|
Bugs item #1938765, was opened at 2008-04-09 16:02 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=766244&aid=1938765&group_id=146814 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General code Group: 5.1 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Herve Bronnimann (hervebronnimann) Assigned to: Nobody/Anonymous (nobody) Summary: grouping in num_put.cpp is wrong Initial Comment: Here is a very short program showing how doubles can be output with grouping. With STLPort, the output is as follows. Notice the wrong placement of the ',' separator in several places: * in front of last group (+,1.234) * in front of the sign (,+12,34,5.678) * in infimity and nans (ooops!) * in very long numbers, the CHAR_MAX does not terminate grouping, instead it is taken literally as 255 (128 on signed char machines). Positive numbers will work if the std::showpos is removed. Here is the output: Positive: +,1.234 +,12,3.456 +1,23,4.567 ,+12,34,5.678 +,123,45,6.789 +1,234,56,7.891 +123,456,78,9.123 +123456789012345680000000,000,00,0.000 +1797693134862315700000000000000000000000000000000,0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,000,00,0.000 +,in,f Negative: -,1.234 -,12,3.456 -1,23,4.567 ,-12,34,5.678 -,123,45,6.789 -1,234,56,7.891 -123,456,78,9.123 -123456789012345680000000,000,00,0.000 -1797693134862315700000000000000000000000000000000,0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,000,00,0.000 -,in,f ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=766244&aid=1938765&group_id=146814 |