### Nim Version 2.2.2 ### Description The hash proc for floats casts float to int even if these types are not of the same size. ### Current Output ```text ``` ### Expected Output ```text Valid hash or error ``` ### Known Workarounds Custom hash proc: ```nim proc hash*(x: float): Hash {.inline.} = let y = x + 0.0 when nimvm: # workaround a JS VM bug: bug #16547 result = hashWangYi1(cast[int64](float64(y))) else: when not defined(js): when sizeof(system.int) == 4: result = hashWangYi1(cast[int64](float64(y))) else: result = hashWangYi1(cast[Hash](y)) else: result = hashWangYiJS(toBits(y)) ``` ### Additional Information _No response_