Lines Matching full:numbers
1 .. title:: clang-tidy - modernize-use-std-numbers
3 modernize-use-std-numbers
7 with C++20's mathematical constants from the ``numbers`` header and offers
12 matched and replaced with the ``std::numbers`` constant.
13 The use of macros gets replaced with the corresponding ``std::numbers``
16 The following list of constants from the ``numbers`` header are supported:
35 casts, i.e., switching between ``std::numbers::e``,
36 ``std::numbers::e_v<float>`` and ``std::numbers::e_v<long double>`` where
49 const double Pi = 3.141592653589; // const double Pi = std::numbers::pi
51 … static constexpr double Euler = 2.7182818; // static constexpr double Euler = std::numbers::e;
53 log2(exp(1)); // std::numbers::log2e;
54 log2(Euler); // std::numbers::log2e;
55 1 / sqrt(MY_PI); // std::numbers::inv_sqrtpi;
56 sink(MY_PI); // sink(std::numbers::pi);
57 floatSink(MY_PI); // floatSink(std::numbers::pi);
58 floatSink(static_cast<float>(MY_PI)); // floatSink(std::numbers::pi_v<float>);