-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
C-C++Code - Pull requests that update C++ code.Code - Pull requests that update C++ code.T-BugType - Bug and unexpected behavior.Type - Bug and unexpected behavior.T-ImprovementType - Improvements to components.Type - Improvements to components.
Milestone
Description
Describe the bug
When trying to multiply two numbers, where one of them is a power of 10, calc_multiply tries to move decimal places.
However, it did not take the sign of the number into consideration, leading to a wrong result.
To Reproduce
Steps to reproduce the behavior:
- Run the
calc_multiplyprogram with arguments-1.0and-1.2222222222222. - The output is
, which is of the incorrect sign.
Since -1.0 is a power of 10, we can move the decimal places to obtain the result. -1.22
Expected behavior
The sign should be positive.
Screenshots
None yet
OS
- All OSs are affected
Additional context
None yet
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-C++Code - Pull requests that update C++ code.Code - Pull requests that update C++ code.T-BugType - Bug and unexpected behavior.Type - Bug and unexpected behavior.T-ImprovementType - Improvements to components.Type - Improvements to components.
Projects
Status
Done