use javascript pow for floats