fix exponential functions

This commit is contained in:
bolero-MURAKAMI 2013-04-25 15:36:19 +09:00
parent 32c3ba02d4
commit dad3acceea
41 changed files with 180 additions and 354 deletions

View file

@ -26,16 +26,15 @@ namespace sprout {
>
inline SPROUT_CONSTEXPR int
ilogb2(FloatType x) {
return sprout::ilogb(x);
return sprout::math::ilogb(x);
}
template<
typename IntType,
typename sprout::enabler_if<std::is_integral<IntType>::value>::type = sprout::enabler
>
inline SPROUT_CONSTEXPR int
ilogb2(IntType x) {
return sprout::ilogb(x);
return sprout::math::ilogb(x);
}
#else
template<
@ -44,13 +43,12 @@ namespace sprout {
>
inline SPROUT_CONSTEXPR int
ilogb2(FloatType x) {
return sprout::iszero(x) ? FP_ILOGB0
: sprout::isinf(x) ? INT_MAX
: sprout::isnan(x) ? FP_ILOGBNAN
: static_cast<int>(sprout::logb2(x))
return sprout::math::iszero(x) ? FP_ILOGB0
: sprout::math::isinf(x) ? INT_MAX
: sprout::math::isnan(x) ? FP_ILOGBNAN
: static_cast<int>(sprout::math::logb2(x))
;
}
template<
typename IntType,
typename sprout::enabler_if<std::is_integral<IntType>::value>::type = sprout::enabler