microsoft / microsoft/calculator

Calculator Does Not Support Multiplying By Negative Numbers

Open
#2,138 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
31.1k
Forks
5.8k
PR merge metrics
No merged PRs in 30d

Description

In Microsoft Calculator, in both "Standard" and "Scientific" modes, entering an input sequence such as "3*-3" either using the on-screen buttons or via keyboard input will yield a result of "0" as the calculator will interpret this input as "3-3". This is because currently when the user inputs two different operators consecutively, the input will change to only the most recent one input. This results in it being difficult to multiply by negative numbers.

Currently, the only viable workarounds involve having to press the "+/-", or (if in scientific mode) use brackets. This vastly slows down the typing experience and adversely affects the user experience.

The issue can be reproduced by:

  1. Entering any whole number
  2. Pressing "*"
  3. Pressing "-"
  4. Entering an additional number
  5. Pressing "Enter"
  6. Observe Error

OS: Microsoft Windows Version 22H2 (OS Build 19045.4170)
64-bit computer
Calculator Version 11.2401.0.0

  • OS Build: 10.0.19045.0
  • Architecture: X64
  • Application Version: 11.2401.0.0
  • Region: en-AU
  • Dev Version Installed: False

Requested Assignment
I'm just reporting this problem. I don't want to fix it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported 3*-3 sequence in Standard and Scientific modes, then trace the input handling for consecutive operators. Done means multiplying by a negative number produces the correct result through both on-screen and keyboard input without requiring +/- or brackets.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.