calculator
calculator copied to clipboard
Speed conversion to miles per hour is inaccurate
Describe the bug When using Speed conversion, you get an inaccurate result when converting to/from miles per hour.
This is caused by inaccurate cm/s value for miles per hour, 44.7 which appears in:
src/CalcViewModel/DataLoaders/UnitConverterDataLoader.cpp: { ViewMode::Speed, UnitConverterUnits::Speed_MilesPerHour, 44.7 },
as well as in src/CalculatorUnitTests/Test.resw:
The accurate value is 44.704, which is (1.609344 / 3600) * 100000
Steps To Reproduce Use Length mode and convert 1 mile to km, answer = 1.609344 km Use Speed mode and convert 1 miles per hour to km/h, answer = 1.6092 km/h
Expected behavior In Speed mode 1 mile per hour should convert to 1.609344 km/h
Screenshots n/a
Device and Application Information
- OS Build: 10.0.22631.0
- Architecture: X64
- Application Version: 11.2210.0.0
- Region: nl-NL
- Dev Version Installed: False
Additional context n/a
Requested Assignment I'm just reporting this problem. I don't want to fix it.
This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.
Hi @gerardvanderland, You are right about the value of 44.704.
So the expected behavior should be 1.609344 not 1,1609334. I guess you have a typo there.
@sravanth299, you are right, there was a typo, but also in your comment, because I had 1.1609344, not 1.1609334. :-)
Corrected the values, also to use decimal dot instead of comma.
Hey! I have tried to correct the issue, please check it once at #2033 Thanks!
Is this issue still open? Can I try it ?