mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
fix math::exp implementation
This commit is contained in:
parent
66da9f4fea
commit
4b3d4e82d7
2 changed files with 12 additions and 10 deletions
|
@ -42,7 +42,7 @@ namespace sprout {
|
|||
typedef double type;
|
||||
return x == 0 ? std::numeric_limits<FloatType>::quiet_NaN()
|
||||
: !(x > 0) ? -std::numeric_limits<FloatType>::infinity()
|
||||
: x < 1 ? static_cast<FloatType>(-sprout::math::detail::log_impl(type(1) / static_cast<type>(x)))
|
||||
: x < 1 ? static_cast<FloatType>(-sprout::math::detail::log_impl(1 / static_cast<type>(x)))
|
||||
: static_cast<FloatType>(sprout::math::detail::log_impl(static_cast<type>(x)))
|
||||
;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue