modified math functions to float