Re: [Boost-bugs] [Boost C++ Libraries] #6627: nonfinite_num_put formatting of 0.0 is incorrect

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6627: nonfinite_num_put formatting of 0.0 is incorrect
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-03-23 09:57:36


#6627: nonfinite_num_put formatting of 0.0 is incorrect
------------------------------------------+---------------------------------
  Reporter: krwalker@… | Owner: pbristow
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: math
   Version: Boost 1.48.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------------+---------------------------------

Comment (by pbristow):

 Tests reveal that, for some combinations of options, there is a difference
 in output between Dinkumware STL and other STL implementations, for
 example:

 #if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) // Dinkumware outputs
 "0.00"
     CHECKOUT(std::showpoint << 0., "0.000000"); // std::setprecision(6)
     CHECKOUT(std::setprecision(2) << std::showpoint << 0., "0.00");
 #else // others output "0.0"
     CHECKOUT(std::showpoint << 0., "0.00000"); // std::setprecision(6)
     CHECKOUT(std::setprecision(2) << std::showpoint << 0., "0.0");
 #endif

 I am unclear if either of these is 'wrong' according the C/C++ Standards,
 but this is outside control of Boost.Math code, so I propose to declare
 this fixed in trunk.

 (There are also some STL libraries that use two exponent digits rather
 than three - this is standards conformant).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6627#comment:9>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:09 UTC