martykan / forecastie

A simple, opensource weather app for Android.
Other
867 stars 335 forks source link

Precipitation Chance Float Representation Error #674

Closed greenbagels closed 2 years ago

greenbagels commented 2 years ago

Using the 1.22.1 version of the app from F-Droid, the precipitation chance in the daily forecast sometimes demonstrates floating-point representation error, as shown in this picture:

image

This would have been expected as of the commit that added precipitation chance support (f25c9db1b4e6895e82396eeba3d9f37c3988de3f), as the percent chance used was just the raw floating-point value:

https://github.com/martykan/forecastie/blob/f25c9db1b4e6895e82396eeba3d9f37c3988de3f/app/src/main/java/cz/martykan/forecastie/utils/UnitConvertor.java#L63-L65

To my understanding, this should have been fixed in a7134dc8d774a0a9bd66624ce1dfcff35ace6088, when the code was changed to:

https://github.com/martykan/forecastie/blob/2d42ad4cd5e35e3a80a6cfe24c88ffac43ecd0b6/app/src/main/java/cz/martykan/forecastie/utils/UnitConvertor.java#L63-L65

Yet this issue is still visible; any thoughts?

nicorikken commented 2 years ago

I can confirm the issue being present in 1.22.1 via F-Droid, I just noticed it.

robinpaulson commented 2 years ago

Hi guys, can you look through existing issues before opening dupes? #649

greenbagels commented 2 years ago

My bad, I used the issue search with poorly chosen terms rather than going through the list manually. Closing this issue as a dupe!