Re: [Boost-bugs] [Boost C++ Libraries] #6953: Cannot serialialize some double values

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6953: Cannot serialialize some double values
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-15 20:01:58


#6953: Cannot serialialize some double values
-------------------------------+--------------------------------------------
  Reporter: dbaciu@… | Owner: ramey
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: serialization
   Version: Boost 1.43.0 | Severity: Problem
Resolution: invalid | Keywords: serialization
-------------------------------+--------------------------------------------
Changes (by ramey):

  * status: new => closed
  * resolution: => invalid

Comment:

 I'm gueesing that is not an issue with the serialization library but
 rather floating point i/o when converting to text. Rework you example to
 use just standard stream i/o.

 your test case .98123024735605502 has 17 significant decimal digits. This
 is approximatly 58 binary digits. Which shouldn't be a problem on an 80
 bit IEEE754 implementation. But it could be a problem with a 64 bit
 implementation.

 Also, some decimal fractional numbers might not be exactly representable
 in binary. This would lead to a truncation or rounding when he number is
 converted to binary. This would only be noticable on output.

 I'm pretty sure I'm right here so I'm going to close this ticket.

 Robert Ramey

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6953#comment:1>
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:10 UTC