mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-08-29 14:50:52 +00:00
support hash: floating point
This commit is contained in:
parent
63ef07d124
commit
7aa10d1e08
276 changed files with 542 additions and 325 deletions
|
@ -1,7 +1,7 @@
|
|||
#ifndef SPROUT_MATH_FLOAT_MANTISSA_HPP
|
||||
#define SPROUT_MATH_FLOAT_MANTISSA_HPP
|
||||
|
||||
#include <cfloat>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/math/detail/config.hpp>
|
||||
|
@ -18,7 +18,7 @@ namespace sprout {
|
|||
>
|
||||
inline SPROUT_CONSTEXPR FloatType
|
||||
float_mantissa(FloatType x) {
|
||||
return x / sprout::detail::pow_n(FloatType(FLT_RADIX), sprout::math::float_exponent(x));
|
||||
return x / sprout::detail::pow_n(FloatType(std::numeric_limits<FloatType>::radix), sprout::math::float_exponent(x));
|
||||
}
|
||||
|
||||
template<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue