1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

add math functions: logb, ilogb

This commit is contained in:
bolero-MURAKAMI 2013-02-07 18:14:50 +09:00
parent 4b3d4e82d7
commit d05b597e80
13 changed files with 218 additions and 11 deletions

View file

@ -34,8 +34,8 @@ namespace sprout {
inline SPROUT_CONSTEXPR FloatType
exp(FloatType x) {
typedef double type;
return !(x > -1) ? 1 / sprout::math::detail::exp_impl(-static_cast<type>(x))
: sprout::math::detail::exp_impl(static_cast<type>(x))
return !(x > -1) ? static_cast<FloatType>(1 / sprout::math::detail::exp_impl(-static_cast<type>(x)))
: static_cast<FloatType>(sprout::math::detail::exp_impl(static_cast<type>(x)))
;
}