units icon indicating copy to clipboard operation
units copied to clipboard

Arguments of hyperbolic functions should not be angles.

Open nholthaus-units-user opened this issue 3 years ago • 0 comments

I am using the units.h file as of commit ea6d126942cb3225a341568ab57ec52513977875. The issue described below can be reproduced using gcc-11.2.0 (and probably using any other C++14 compiler).

The hyperbolic functions in units.h (such as units::math::cosh(), for example) require that their arguments be in units of angles. However, this does not appear to be correct. Unlike trigonometric functions, arguments of hyperbolic functions are dimensionless real numbers. Compare the behaviors of std::cos() and std::cosh(), for example.

From Wikipedia:

The hyperbolic functions take a real argument called a hyperbolic angle...

In geometric applications, the argument of a trigonometric function is generally the measure of an angle. For this purpose, any angular unit is convenient, and angles are most commonly measured in conventional units of degrees in which a right angle is 90° and a complete turn is 360° (particularly in elementary mathematics).

nholthaus-units-user avatar Mar 05 '22 23:03 nholthaus-units-user