Open Luthaf opened 5 years ago
What are the scenarios in which it would risk name-clashing with std::pow? If rename is needed to avoid this, I would favor something like ipow or int_pow, since the function is not "fast" is just implemented specifically for integer exponents.
What are the scenarios in which it would risk name-clashing with std::pow?
For example, in https://github.com/cosmo-epfl/librascal/pull/225#discussion_r348050113, @felixmusil changed some types to make sure a call to math::pow
was made, previous code was using std::pow
.
Also, since pow
is a C function from libm, it exists both as std::pow
and ::pow
in the global namespace. Thus calling pow
without namespace from inside rascal::math
can match both std::pow
and rascal::math::pow
Relying on the same name means that
std::pow
can be called instead (see https://github.com/cosmo-epfl/librascal/pull/225#discussion_r348050113)