-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed conversion to miles per hour is inaccurate #2026
Comments
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. |
Issue microsoft#2026 Due to incorrect value of `ViewMode::Speed, UnitConverterUnits::Speed_MilesPerHour, 44.7`, calculated value was different from actual (which should be) `ViewMode::Speed, UnitConverterUnits::Speed_MilesPerHour, 44.704`. Please correct me if I am wrong, this is my first contribution.
Hey! I have tried to correct the issue, please check it once at #2033 |
Is this issue still open? |
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:
44.7
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
Additional context
n/a
Requested Assignment
I'm just reporting this problem. I don't want to fix it.
The text was updated successfully, but these errors were encountered: