mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-21 22:03:11 -07:00
Fix the case where eout % 3 produces a negative value
This commit is contained in:
parent
690b3001fb
commit
5ed7e55d65
1 changed files with 1 additions and 1 deletions
|
@ -1171,7 +1171,7 @@ wstring NumberToString(_Inout_ PNUMBER& pnum, NumberFormat format, uint32_t radi
|
|||
{
|
||||
if (format == NumberFormat::Engineering)
|
||||
{
|
||||
exponent = (eout % 3);
|
||||
exponent = (3 + (eout % 3)) % 3;
|
||||
eout -= exponent;
|
||||
exponent++;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue