Articles contenant le tag integer arithmetic

Overflow-safe integer mul&div

When you do a multiply & divide operation, to ensure you don’t loose precision, you would start by the multiplication before the division. But in that case, it could be that the result of the multiplication overflows. The natural solution would go to use an intermediate storage of larger size. This uses concepts (C++20). For […]

, ,

Pas de commentaire