mbridak / not1mm

Not1MM != N1MM, An amateur radio contest logger for Linux.
GNU General Public License v3.0
99 stars 21 forks source link

Wacky long ADIF frequencies #4

Closed mbridak closed 1 year ago

mbridak commented 1 year ago

The ADIF writer sometimes outputs wacky long frequencies.

14.029219999999999 The frequency recorded in the database was 14029.22 a quick check with python shows why. >>> a=14029.22 >>> a / 1000 14.029219999999999
mbridak commented 1 year ago

Okay, fixed that one. Seems we needed to use an import and special function 'cause the floating point in python is... Interesting...

from decimal import Decimal a = 14029.22 b = Decimal(str(a)) / 1000 str(b) '14.02922'

Fixed with version 23-5-27