mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-02-20 14:52:24 +00:00
Small optimisation for integer modulus.
[SVN r81477]
This commit is contained in:
@@ -1636,8 +1636,7 @@ inline typename enable_if<is_unsigned<Integer>, Integer>::type eval_integer_modu
|
||||
{
|
||||
if((sizeof(Integer) <= sizeof(long)) || (val <= (std::numeric_limits<unsigned long>::max)()))
|
||||
{
|
||||
gmp_int r;
|
||||
return mpz_tdiv_r_ui(r.data(), x.data(), val);
|
||||
return mpz_tdiv_ui(x.data(), val);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user