maths: style
This commit is contained in:
parent
99ee6ed04f
commit
cd841acc7b
@ -221,10 +221,13 @@ factorial [[gnu::pure]] (unsigned i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// stirlings approximation of factorials
|
||||||
constexpr uintmax_t
|
constexpr uintmax_t
|
||||||
stirling [[gnu::pure]] (unsigned n)
|
stirling [[gnu::pure]] (unsigned n)
|
||||||
{
|
{
|
||||||
return static_cast<uintmax_t> (std::sqrt (2 * PI<float> * n) * std::pow (n / E<float>, n));
|
return static_cast<uintmax_t> (
|
||||||
|
std::sqrt (2 * PI<float> * n) * std::pow (n / E<float>, n)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user