add sprout::log10, log2, log1p

This commit is contained in:
bolero-MURAKAMI 2012-05-04 18:02:42 +09:00
parent 29a55bf31d
commit 6baf082234
6 changed files with 167 additions and 1 deletions

View file

@ -26,6 +26,34 @@ namespace sprout {
inline SPROUT_CONSTEXPR T root_two() {
return 1.414213562373095048801688724209698078569671875376948073L;
}
//
// half_root_two
//
template<typename T>
inline SPROUT_CONSTEXPR T half_root_two() {
return 0.70710678118654752440084436210484903928483593756084L;
}
//
// e
//
template<typename T>
inline SPROUT_CONSTEXPR T e() {
return 2.7182818284590452353602874713526624977572470936999595749669676L;
}
//
// ln_ten
//
template<typename T>
inline SPROUT_CONSTEXPR T ln_ten() {
return 2.302585092994045684017991454684364207601101488628772976L;
}
//
// ln_two
//
template<typename T>
inline SPROUT_CONSTEXPR T ln_two() {
return 0.693147180559945309417232121458176568075500134360255254L;
}
} // namespace math
} // namespace sprout