Re: [Boost-bugs] [Boost C++ Libraries] #10103: setprecision(0) does displays too many digits of a float128

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10103: setprecision(0) does displays too many digits of a float128
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-15 03:41:15


#10103: setprecision(0) does displays too many digits of a float128
-----------------------------------------+----------------------------
  Reporter: Charles Karney <charles@…> | Owner: johnmaddock
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords: printing
-----------------------------------------+----------------------------

Comment (by Charles Karney <charles@…>):

 Perhaps boost can fruitfully distinguish the cases
   cout << fixed << setprecision(0) << x;
 and
   cout << scientific << setprecision(0) << x;
 with the former printing x as the nearest integer (ties go
 to even) and the latter retaining its current interpretation
 of printing "as many digits as you've got". This would
 certainly satisfy my requirements and, typically, the "as
 many digits as you've got" mode implies scientific notation.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10103#comment:3>
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:16 UTC