improved rand for floats