The hash function wasn't gated by the use-new-nan-definition field, which meant it returned different results for -0 (which in the new definition is the same as +0, and in the old definition was not).
This also changes the method call for the real hash function with use-new-nan-definition enabled, but the two functions have the same implementation, so the change is purely for clarity/consistency.
Motivation and Context
Fixes a bug
Impact
Fixes a bug in the hash function for double/real types for -0 when use-new-nan-definition is false. It will incorrectly hash -0 to the same value as 0, which should only happen when use-new-nan-definition is true.
Description
The hash function wasn't gated by the use-new-nan-definition field, which meant it returned different results for -0 (which in the new definition is the same as +0, and in the old definition was not).
This also changes the method call for the real hash function with use-new-nan-definition enabled, but the two functions have the same implementation, so the change is purely for clarity/consistency.
Motivation and Context
Fixes a bug
Impact
Fixes a bug in the hash function for double/real types for -0 when use-new-nan-definition is false. It will incorrectly hash -0 to the same value as 0, which should only happen when use-new-nan-definition is true.
Test Plan
Added unit tests
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.