aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/nif_SUITE_data
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-04-01 15:30:12 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-04-10 15:50:36 +0200
commit2a0ff8b50a68d51e44fddf36867f390b64a4f2bf (patch)
treed9d090305c992874320ca19dcf9381259e0b8088 /erts/emulator/test/nif_SUITE_data
parentcc722af4d62d749d2a75155e91a2a1562aeb2a5a (diff)
downloadotp-2a0ff8b50a68d51e44fddf36867f390b64a4f2bf.tar.gz
otp-2a0ff8b50a68d51e44fddf36867f390b64a4f2bf.tar.bz2
otp-2a0ff8b50a68d51e44fddf36867f390b64a4f2bf.zip
erts: Ensure hashing of zero is consistent
Erlang treats positive and negative zero as equal, meaning, true = 0.0 =:= 0.0/-1 However, Erlangs hash functions: hash, phash and phash2 did not reflect this behaviour. Meaning, the hash values produced by the different hash functions would not be identical for positive and negative zero. This commit ensures that hash value of positive zero is always produced regardless of the signedness of the zero float, i.e. true = erlang:phash2(0.0) =:= erlang:phash2(0.0/-1)
Diffstat (limited to 'erts/emulator/test/nif_SUITE_data')
0 files changed, 0 insertions, 0 deletions