mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
fix math functions
This commit is contained in:
parent
7794e56192
commit
56cb7702ea
19 changed files with 157 additions and 69 deletions
|
@ -187,13 +187,13 @@ namespace sprout {
|
|||
: x <= 0 && sprout::math::is_integer(x) ? std::numeric_limits<FloatType>::infinity()
|
||||
: x == -std::numeric_limits<FloatType>::infinity() ? std::numeric_limits<FloatType>::infinity()
|
||||
: x == std::numeric_limits<FloatType>::infinity() ? std::numeric_limits<FloatType>::infinity()
|
||||
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
|
||||
: std::lgamma(x)
|
||||
#else
|
||||
//#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
|
||||
// : std::lgamma(x)
|
||||
//#else
|
||||
: x == 1 ? FloatType(0)
|
||||
: x == 2 ? FloatType(0)
|
||||
: static_cast<FloatType>(sprout::math::detail::lgamma_impl(static_cast<typename sprout::math::detail::float_compute<FloatType>::type>(x)))
|
||||
#endif
|
||||
//#endif
|
||||
;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue