microsoft / microsoft/calculator
Incorrect result for exponational and logarithmic functions with exact results
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 31.1k
- Forks
- 5.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
The below example shows a case that shown answer (2) doesn't match the real answer
log(e^2)/log(e)-2 != 0
Steps To Reproduce
Steps to reproduce the behavior:
- Go to
Scientific mode - enter log(e^2)/log(e^1)-2
- See error
Expected behavior
log(e^2)/log(e^1)-2 should be 0 as base changing formula for logarithms:
Screenshots
Device and Application Information
- OS Build: 10.0.17134.0
- Architecture: X64
- Application Version: 10.1905.28.0
- Region: zh-CN
- Dev Version Installed: False
Additional context
This is a new issue related with #309 and #222
Requested Assignment
I'm just reporting this problem. I don't know how to fix it.
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
Reproduce the issue in Scientific mode with log(e^2)/log(e^1)-2, then trace the calculator's exponential and logarithmic evaluation path. The fix is complete when this expression evaluates to 0 and the related exact-result cases described in issues #309 and #222 remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100