diff options
Diffstat (limited to 'boost/random/subtract_with_carry.hpp')
-rw-r--r-- | boost/random/subtract_with_carry.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/boost/random/subtract_with_carry.hpp b/boost/random/subtract_with_carry.hpp index dc430e6d55..acaf69ac69 100644 --- a/boost/random/subtract_with_carry.hpp +++ b/boost/random/subtract_with_carry.hpp @@ -402,7 +402,7 @@ public: SeedSeq, seq) { detail::seed_array_real<w>(seq, x); - carry = (x[long_lag-1] ? 0 : 1 / _modulus); + carry = (x[long_lag-1] ? result_type(0) : result_type(1 / _modulus)); k = 0; } @@ -416,7 +416,7 @@ public: void seed(It& first, It last) { detail::fill_array_real<w>(first, last, x); - carry = (x[long_lag-1] ? 0 : 1 / _modulus); + carry = (x[long_lag-1] ? result_type(0) : result_type(1 / _modulus)); k = 0; } |