math: add make_quiet_nan()
This commit is contained in:
parent
6d93197f86
commit
7751d487ed
1 changed files with 8 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define C536E080_25D7_476D_B8E3_25912B9CFC3B
|
||||
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
namespace mesytec::mnode
|
||||
{
|
||||
|
|
@ -13,6 +14,13 @@ inline int64_t round_up(int64_t n, int64_t p)
|
|||
return (n + mask) & ~mask;
|
||||
}
|
||||
|
||||
inline double make_quiet_nan()
|
||||
{
|
||||
double result = std::numeric_limits<double>::quiet_NaN();
|
||||
assert(((uintptr_t)(result) & 0xffffffff) == 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif /* C536E080_25D7_476D_B8E3_25912B9CFC3B */
|
||||
|
|
|
|||
Loading…
Reference in a new issue