mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add math::lgamma
This commit is contained in:
parent
a55c430f09
commit
5f40808f75
58 changed files with 323 additions and 116 deletions
|
@ -23,27 +23,27 @@ namespace sprout {
|
|||
return x == 0
|
||||
? y < 0 ? std::numeric_limits<FloatType>::infinity()
|
||||
: y > 0 ? FloatType(0)
|
||||
: sprout::math::exp(y * sprout::math::log(x))
|
||||
: sprout::exp(y * sprout::log(x))
|
||||
: x == -1 && (y == std::numeric_limits<FloatType>::infinity() || y == -std::numeric_limits<FloatType>::infinity()) ? FloatType(1)
|
||||
: x == 1 ? FloatType(1)
|
||||
: y == 0 ? FloatType(1)
|
||||
: y == -std::numeric_limits<FloatType>::infinity()
|
||||
? x < 1 && x > -1 ? std::numeric_limits<FloatType>::infinity()
|
||||
: x > 1 || x < -1 ? FloatType(0)
|
||||
: sprout::math::exp(y * sprout::math::log(x))
|
||||
: sprout::exp(y * sprout::log(x))
|
||||
: y == std::numeric_limits<FloatType>::infinity()
|
||||
? x < 1 && x > -1 ? FloatType(0)
|
||||
: x > 1 || x < -1 ? std::numeric_limits<FloatType>::infinity()
|
||||
: sprout::math::exp(y * sprout::math::log(x))
|
||||
: sprout::exp(y * sprout::log(x))
|
||||
: x == -std::numeric_limits<FloatType>::infinity()
|
||||
? y < 0 ? FloatType(0)
|
||||
: y > 0 ? std::numeric_limits<FloatType>::infinity()
|
||||
: sprout::math::exp(y * sprout::math::log(x))
|
||||
: sprout::exp(y * sprout::log(x))
|
||||
: x == std::numeric_limits<FloatType>::infinity()
|
||||
? y < 0 ? FloatType(0)
|
||||
: y > 0 ? std::numeric_limits<FloatType>::infinity()
|
||||
: sprout::math::exp(y * sprout::math::log(x))
|
||||
: sprout::math::exp(y * sprout::math::log(x))
|
||||
: sprout::exp(y * sprout::log(x))
|
||||
: sprout::exp(y * sprout::log(x))
|
||||
;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue