2
0
mirror of https://github.com/boostorg/random.git synced 2026-01-19 04:22:17 +00:00

Cast arguments prior to taking abs

This commit is contained in:
Matt Borland
2025-12-02 12:39:36 +01:00
parent b75f487382
commit 88d6840a19

View File

@@ -321,7 +321,7 @@ private:
IntType k = static_cast<IntType>(floor((2*_u.btrd.a/us + _u.btrd.b)*u + _u.btrd.c));
if(k < 0 || k > _t) continue;
v = v*_u.btrd.alpha/(_u.btrd.a/(us*us) + _u.btrd.b);
RealType km = abs(k - m);
RealType km = abs(static_cast<RealType>(k) - static_cast<RealType>(m));
if(km <= 15) {
RealType f = 1;
if(m < k) {