added rounding constant to fix errors related to casting floating pt numbers