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,14 +1,14 @@
|
|||
#ifndef SPROUT_MATH_FLOAT_PAIR_HPP
|
||||
#define SPROUT_MATH_FLOAT_PAIR_HPP
|
||||
|
||||
#include <cfloat>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/math/detail/config.hpp>
|
||||
#include <sprout/detail/pow.hpp>
|
||||
#include <sprout/math/float_exponent.hpp>
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
#include <sprout/utility/pair.hpp>
|
||||
#include <sprout/utility/pair/pair.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace math {
|
||||
|
@ -16,7 +16,7 @@ namespace sprout {
|
|||
template<typename T>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<T, int>
|
||||
float_pair_impl(T x, int exp) {
|
||||
return sprout::pair<T, int>(x / sprout::detail::pow_n(T(FLT_RADIX), exp), exp);
|
||||
return sprout::pair<T, int>(x / sprout::detail::pow_n(T(std::numeric_limits<T>::radix), exp), exp);
|
||||
}
|
||||
|
||||
template<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue