Using floating point math to compute a hash of a string seems a bit overkill. At least one problem with your formula is that permutations of the same string will cause collisions, since multiplication is commutative.
In your case hash('abc') = (cos('a') * cos('b')) * cos('c')
, which is equal to hash('cab') = (cos('c') * cos('a')) * cos('b')
, except possibly for some minor floating point errors.