kesjam/calculator

Incorrect result when using memory recall (MR) followed by multiply operation

Opened this issue · 0 comments

When performing a calculation using a value recalled from memory (MR) and then immediately multiplying, the calculator returns an incorrect result of 0 instead of the expected multiplication.

Steps to reproduce:

Enter a value and store it to memory (e.g. 80000, then press the "M+" button to save to memory)
Press "MR" to recall the stored value of 80000
Press "x" to multiply
Enter a value to multiply by (e.g. .20)
Observe that the calculator shows "0 x 80000 = 0" instead of the correct "80000 x 0.2 = 16000"

Expected behavior:

When a value is recalled from memory using MR and then multiplied by another number, the calculator should perform the multiplication correctly and return the expected result.

Actual behavior:

The calculator is incorrectly showing a multiplication by 0 and returning an incorrect result of 0, rather than multiplying the memory recall value by the entered multiplier.

Please investigate this bug with MR followed by the multiply operation. Let me know if you need any other details to reproduce or troubleshoot the issue. Thank you!

I hope this bug report template is helpful for documenting the issue you encountered with your calculator app. Let me know if you would like me to modify anything in the report.
Screenshot 2024-03-18 at 10 12 24 PM