mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix math functions
This commit is contained in:
parent
dad3acceea
commit
2e2b6c96ab
30 changed files with 121 additions and 84 deletions
|
@ -101,6 +101,10 @@ namespace sprout {
|
|||
logb(FloatType x) {
|
||||
return x == 0 ? -std::numeric_limits<FloatType>::infinity()
|
||||
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
|
||||
# if defined(__GNUC__)
|
||||
: x == -std::numeric_limits<FloatType>::infinity()
|
||||
? std::numeric_limits<FloatType>::infinity()
|
||||
# endif
|
||||
: std::logb(x)
|
||||
#else
|
||||
: x == std::numeric_limits<FloatType>::infinity() || x == -std::numeric_limits<FloatType>::infinity()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue