boostorg / boostorg/units

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

Open
#52 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39
Forks
60
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.