Skip to content
Snippets Groups Projects
Commit fef5f72e authored by Ansgar Burchardt's avatar Ansgar Burchardt
Browse files

bigunsignedint: Fix operator-.

parent 156bf5db
No related branches found
No related tags found
No related merge requests found
......@@ -268,10 +268,13 @@ namespace Dune
{
std::int_fast32_t diff = static_cast<std::int_fast32_t>(digit[i]) - static_cast<std::int_fast32_t>(x.digit[i]) - overflow;
if (diff>=0)
{
result.digit[i] = static_cast<std::uint16_t>(diff);
overflow = 0;
}
else
{
result.digit[i] = static_cast<std::uint16_t>(diff+bitmask);
result.digit[i] = static_cast<std::uint16_t>(diff+bitmask+1);
overflow = 1;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment