Subject: [Boost-bugs] [Boost C++ Libraries] #7785: karma real generator limits precision to digits10 no matter exponent
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-12-11 10:51:30
#7785: karma real generator limits precision to digits10 no matter exponent
------------------------------+---------------------------------------------
Reporter: strk@⦠| Owner: djowel
Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
Version: Boost 1.52.0 | Severity: Problem
Keywords: |
------------------------------+---------------------------------------------
The real_inserter::call_n method here is limiting the user-provided
precision by the
http://svn.boost.org/svn/boost/trunk/boost/spirit/home/karma/numeric/detail/real_utils.hpp
But that value is later used to determine how many decimal digits to
print, independently on where the first non-zero digit is. This means
overlimiting the actual number of significant digit for no evident reason.
The user provided ::precision() function has access to the full number and
thus can judge when to provide more or less precision depending on
magnitude. Why not trusting that ?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7785> 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:11 UTC