Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Degree definition causes quite big conversion error between degrees and radians. #52

Open
Razumihin opened this issue Oct 7, 2021 · 0 comments

Comments

@Razumihin
Copy link

I just noticed that the degree definition in boost/units/base_units/angle/degree.hpp uses quite inaccurate value:

BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(angle,degree,"degree","deg",6.28318530718/360.,boost::units::angle::radian_base_unit,-101);

as units is meant for scientific calculation I'd think that it would be a great benefit to use the highest possible accuracy for the definition. Right now the accuracy will cause significant error over time, when for instance when stepping an integration that uses this conversion for the angles.

It seems like units doesn't have it's own constants definitions, so maybe we should just use the value from the math/constants here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant