mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
fix exponential functions
This commit is contained in:
parent
32c3ba02d4
commit
dad3acceea
41 changed files with 180 additions and 354 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue