bewest / decoding-carelink

python serial driver for mm comlink2 protocol
http://bewest.github.io/decoding-carelink
Other
71 stars 52 forks source link

Fix rounding errors in basal rate calculation #150

Closed ps2 closed 8 years ago

ps2 commented 8 years ago

Dividing by 40 ends up with less fewer issues than multiplying by 0.025.

38 * 0.025 0.9500000000000001 38 / 40.0 0.95