microsoft / microsoft/calculator

Incorrect result for exponational and logarithmic functions with exact results

Open
#574 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: User Experience Bug help wanted Pri: 3 triage approved
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:

  1. Go to Scientific mode
  2. enter log(e^2)/log(e^1)-2
  3. See error

Expected behavior
log(e^2)/log(e^1)-2 should be 0 as base changing formula for logarithms:
LaTex

Screenshots
non-zero result

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.