Closed
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_multiply
program with arguments-1.0
and-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
Metadata
Metadata
Assignees
Labels
Projects
Status
Done