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:
parent
4b3d4e82d7
commit
d05b597e80
13 changed files with 218 additions and 11 deletions
|
@ -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)))
|
||||
;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue