Fixed a floating-point bug

We ended up with negative values being computed, since the database stored
single precision floating point, where as JavaScript computes exclusively using
double precision (i.e. 32-bit) floats.

In other words, we get a value of 1.99, but the database would store the
value as 2, since it would round the value.

If the newly retrieved inputed value never changed from the last, then we get
an arithmetic of

    kwh - old_kwh < 0

Where kwh = 1.99 represents the data retrieved, and old_kwh = 2 represents the
data in the database.