Lucky hour! Grab a free trial license — offer ends in 00:59:58. Claim now
The analyzer has detected a potential error: the expression can output a different result than expected because addition, subtraction, division, and multiplication operations have a higher precedence than shift operations.
The example:
private BigInteger OddPow (uint b, BigInteger exp)
{
uint [] wkspace = new uint [mod.length << 1 + 1];
....
}
Most likely, it is expected that the shifting result of mod.length by 1 would add up to 1. However, according to the operator precedence, the addition occurs first, followed by the shift. To fix it, add parentheses.
The fixed code:
private BigInteger OddPow (uint b, BigInteger exp)
{
uint [] wkspace = new uint [(mod.length << 1) + 1];
....
}
This diagnostic is classified as:
Was this page helpful?
Your message has been sent. We will email you at
If you do not see the email in your inbox, please check if it is filtered to one of the following folders: