The bug looks to me to be caused by floating point inaccuracy. Not much you can do about it, but I don't think it does anything other than show a weird number.
Source: Am hobbyist programmer.