serenity
serenity copied to clipboard
Calculator: Finish operation-in-progress only on new binary operations
Calculator: Finish operation-in-progress only on new binary operations
Because of this the unary operations got applied to the result of the
operation-in-progress instead of the current argument as shown here:
`16 + 9 <sqrt> =`
Previous output: `sqrt(16 + 9)` = `5`
Expected output: `16 + sqrt(9)` = `19`
this also fixes the following bug i found which i didn't mention in the commit message:
- do
5 * 5 = <MS>
- then
100 - <MR> =
(output:-75
instead of75
)
should i open issues for bugs even if i have a fix for it ready?