Calculator: Precision is lost when switching conversions

Created on 7 Mar 2019  ยท  4Comments  ยท  Source: microsoft/calculator

Describe the bug

While general math does not lose precision (see #119), unit conversions do.

From my perspective, this is a bug, but I suspect fixing this would make it a feature request. I'm filing it as a bug because the information required here and the information I have available more closely fit the bug filing form.

Steps To Reproduce

  1. Open Calculator
  2. Tap โ‰ก
  3. Tap Power
  4. Tap Kilowatts (top unit -- this computer is en-US not en-GB where the default is Watts)
  5. Step 1: (โ€Ž3/โ€Ž7/โ€Ž2019 11:10:37 AM) User left click on "Six (button)" in "Cal"
  6. Step 2: (โ€Ž3/โ€Ž7/โ€Ž2019 11:10:38 AM) User left click on "Zero (button)" in "Cal"
  7. Step 3: (โ€Ž3/โ€Ž7/โ€Ž2019 11:10:41 AM) User left click on "Converts into โ€ช3.412141โ€ฌ BTUs/minute (text)" in "Cal"
  8. Step 4: (โ€Ž3/โ€Ž7/โ€Ž2019 11:10:42 AM) User left click on "Input unit (combo box)" in "Cal"
  9. Step 5: (โ€Ž3/โ€Ž7/โ€Ž2019 11:10:43 AM) User left click on "Foot-pounds/minute (text)" in "Cal"
  10. Step 6: (โ€Ž3/โ€Ž7/โ€Ž2019 11:10:46 AM) User left click on "Input unit (combo box)" in "Cal"
  11. Step 7: (โ€Ž3/โ€Ž7/โ€Ž2019 11:10:47 AM) User left click on "BTUs/minute (text)" in "Cal"
  12. Step 8: (โ€Ž3/โ€Ž7/โ€Ž2019 11:10:49 AM) User left click on "Converts into โ€ช59.9999972482667โ€ฌ Watts (text)" in "Cal"
  13. Step 9: (โ€Ž3/โ€Ž7/โ€Ž2019 11:10:50 AM) User left click on "Steps Recorder - 1 running window (button)"

Expected behavior

Ideally it would still show 60 Watts in the top field.
This would require unit conversions to cooperate with the ratpack

Screenshots
image
image

Note: this was recorded w/ psr.exe, so I have screen shots for all of the recorded steps (and I could trivially re-record w/ the missing initial setup steps.

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

  • OS Build: 10.0.17134.0
  • Architecture: X64
  • Application Version: 10.1811.3241.0

Additional context

User Experience 2 help wanted not repro

All 4 comments

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

Thanks for the report! I really appreciate your thoroughness when filing this bug. I was able to verify this across other converters as well, including Speed and Pressure.

Fwiw, I've started stepping through how to do this here:
https://github.com/jsoref/Microsoft-calculator/commits/issue-177

If someone familiar w/ RAT/PRAT could give me some pointers, I think this might be somewhat close to something. (I haven't touched the tests, nor have I fed this code to a compiler.)

If someone familiar w/ RAT/PRAT could give me some pointers, I think this might be somewhat close to something. (I haven't touched the tests, nor have I fed this code to a compiler.)

cc @joshkoon

Was this page helpful?
0 / 5 - 0 ratings