Skip to content

Wrong result for e.g. √(2.25) - 1.5 #222

@Wazhai

Description

@Wazhai

Describe the bug

√(2.25) is 1.5 and the result shown is correct. However, subtracting 1.5 from that shows an incorrect result such as -2.1115953280960553738983525708397e-38.

This bug happens in all equivalent cases, e.g. with √(0.81) or any other square root that is a terminating decimal.

Steps To Reproduce

  1. Use standard or scientific mode
  2. Enter 2.25
  3. Press √
  4. Subtract 1.5
  5. Result is wrong

Expected behavior

Result is 0

Device and Application Information (please complete the following information):

  • OS Build: 10 0 17763 0
  • Architecture: X64
  • Application Version: 10.1812.10048.0

Additional info
Until recently, it also used to be that "√(4) - 2" didn't result in 0. It was fixed in the UWP app, but is a bug in calc.exe in older versions of Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: User ExperienceIssue primarily affects end user experience and are not covered by other areasBugIssue is a bugPri: 2triage approvedIssue has been approved by Calculator team member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions