I'm searching for a hash function that takes as input any integer (positive or negative, though it could be constrained to the int range if this makes it easier), and returns a real number between -1 and 1. Is there such a function, or any obvious way to build it from another hash function?
The function doesn't have to be secure, as long as its sufficiently "random". Bonus points if a C/C++ implementation exists.