Subject: [Boost-bugs] [Boost C++ Libraries] #6893: Inaccurate Radians/Degrees conversion
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-05-13 10:19:17
#6893: Inaccurate Radians/Degrees conversion
---------------------------------+------------------------------------------
Reporter: pieterb@⦠| Owner: matthiasschabel
Type: Bugs | Status: new
Milestone: To Be Determined | Component: units
Version: Boost 1.49.0 | Severity: Problem
Keywords: |
---------------------------------+------------------------------------------
LS,
The conversion from angles in degrees to radians currently uses a
conversion factor of 6.28318530718/360. (File:
boost\units\base_units\angle\degree.hpp), which equals
0.0174532925199444444...
This is unnecessarily inaccurate (only 14 significant digits are correct)
and gives problems in my application - the actual value reads:
0.017453292519943295769236907684886127134428718885417...
Using this value improves conversion accuracy significantly.
Please consider using this more accurate value. Alternatively, the use of
boost::math::constants could be considered, making the factor:
boost::math::constants::pi<double>()/180.0
which works fine as well.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6893> 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