units: Improve precision of angle conversion#18
units: Improve precision of angle conversion#18ghost wants to merge 1 commit intoboostorg:developfrom rleigh-codelibre:angle-precision
Conversation
Use high precision constants from boost/math/constants/constants.hpp to fix trac#6893.
|
Looks good to me, but I don't know what's the policy about dependencies on other Boost libraries. Anyone? |
|
We already depend on Boost.Math, see units/cmath.hpp for the functions used there. But I'd like to have a unit test for this. My main concern is the question of hardcoding double precision instead of using whatever precision the user wants. |
|
@jhunold But the double is hardcoded here: I opened https://svn.boost.org/trac/boost/ticket/11389 about this issue. |
|
@rleigh-dundee the original double is okay as it is a POD and is subject to the usual decaying rules for PODs. Using a double as a template parameter triggers template instantiation rules which opens up a different can of worms . So the hardcoding of double is not a separate issue, but a part of the original issue #6893. Those are the reasons I want an unit test case which shows that different constants are used for different underlying floating types and makes sure that this stays so. |
|
Is #44 a valid solution? The current constants do not have acceptable precision when using double. |
Use high precision constants from boost/math/constants/constants.hpp
to fix trac#6893.