microsoft / microsoft/calculator
Update calc engine to remove existence of negative 0
Open
Nobody has claimed this yet.
approved
codebase quality
help wanted
Pri: 2
- Dominant language
- C#
- Stars
- 31.1k
- Forks
- 5.8k
- PR merge metrics
- No merged PRs in 30d
Description
The current calc engine has many cases that result in a calculation of negative 0. While there are a couple spots where this is checked and resolved (2, to be exact), this should be improved to prevent cases like "not(1-1) = -1".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the calculator engine and the two existing checks that resolve negative zero. Reproduce the reported not(1-1) = -1 behavior and inspect other negative-zero cases; the work is done when the engine consistently prevents negative zero results without breaking valid calculations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100