mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-16 15:14:13 +00:00
add sprout/math/comparison.hpp
This commit is contained in:
parent
d51bd06eda
commit
1c65d59971
20 changed files with 379 additions and 109 deletions
|
@ -87,8 +87,7 @@ namespace sprout {
|
|||
private:
|
||||
public:
|
||||
static SPROUT_CONSTEXPR RealType init_log_1mp(RealType p) {
|
||||
using sprout::log;
|
||||
return log(1 - p);
|
||||
return sprout::log(1 - p);
|
||||
}
|
||||
private:
|
||||
public:
|
||||
|
@ -97,10 +96,8 @@ namespace sprout {
|
|||
private:
|
||||
template<typename Engine, typename Random>
|
||||
SPROUT_CONSTEXPR sprout::random::random_result<Engine, geometric_distribution> generate_1(Random const& rnd) const {
|
||||
using sprout::log;
|
||||
using sprout::floor;
|
||||
return sprout::random::random_result<Engine, geometric_distribution>(
|
||||
static_cast<IntType>(floor(log(RealType(1) - rnd.result()) / log_1mp_)),
|
||||
static_cast<IntType>(sprout::floor(sprout::log(RealType(1) - rnd.result()) / log_1mp_)),
|
||||
rnd.engine(),
|
||||
*this
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue