public UInt128 Visit(CosmosFloat64 cosmosFloat64, UInt128 seed) { UInt128 hash = MurmurHash3.Hash128(CosmosNumberHasher.Float64HashSeed, seed); double value = cosmosFloat64.GetValue(); // Normalize 0.0 and -0.0 value // https://stackoverflow.com/questions/3139538/is-minus-zero-0-equivalent-to-zero-0-in-c-sharp if (value == 0.0) { value = 0; } hash = MurmurHash3.Hash128((UInt128)BitConverter.DoubleToInt64Bits(value), hash); return(hash); }
public void Visit(CosmosFloat64 cosmosFloat64) { this.stringBuilder.AppendFormat("C_Float64({0:R})", cosmosFloat64.GetValue()); }