generallized round, ceil, floor function

modified logdb version to 1.9.5