esa / pagmo2

A C++ platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
https://esa.github.io/pagmo2/
GNU General Public License v3.0
804 stars 159 forks source link

Avoid multiple definitions of mathematical constants #565

Closed bluescarni closed 4 months ago

bluescarni commented 4 months ago

Describe the bug As highlighted in #564, there are at least a few places in the source code where we are defining multiple times the same mathematical constants, leading to needless code duplication.

We should be really using always and consistently Boost's numerical constants or C++20 constants:

https://en.cppreference.com/w/cpp/numeric/constants