add math::phi

This commit is contained in:
bolero-MURAKAMI 2014-03-17 17:06:41 +09:00
parent 57d2a8bc21
commit 6e09fc2ee5
3 changed files with 130 additions and 117 deletions

View file

@ -154,6 +154,13 @@ namespace sprout {
inline SPROUT_CONSTEXPR T ln_two() {
return static_cast<T>(0.693147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687542001481021L);
}
//
// phi
//
template<typename T>
inline SPROUT_CONSTEXPR T phi() {
return static_cast<T>(1.61803398874989484820458683436563811772030917980576286213544862270526046281890244970720720418939113748475408807L);
}
} // namespace math
} // namespace sprout