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.
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).
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 asunits::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 ofstd::cos()
andstd::cosh()
, for example.From Wikipedia: