more speedup via float casting