Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Murmurhash doesn't equal known murmurhashes. #14

Open
guloic opened this issue Feb 27, 2021 · 2 comments
Open

Murmurhash doesn't equal known murmurhashes. #14

guloic opened this issue Feb 27, 2021 · 2 comments

Comments

@guloic
Copy link

guloic commented Feb 27, 2021

Environment

System: Windows 10, 64 bit.
Nodejs Version: 10.23.2

Steps to Reproduce

// add at the end of murmurhash2_gc.js
module.exports.murmurhash2_32_gc = murmurhash2_32_gc;

// add at the end of murmurhash3_gc.js
module.exports.murmurhash3_32_gc = murmurhash3_32_gc;

// then run the following code
var mmh2 = require('./murmurhash2_gc.js')

mmh2.murmurhash2_32_gc('foo')
// prints 2414502773

var mmh3 = require('./murmurhash3_gc.js')

mmh3.murmurhash3_32_gc('foo');
// prints 4138058784

Expected

One of those outputs needs to be equal to -156908512 which is the known murmurhash for foo

@guloic
Copy link
Author

guloic commented Feb 27, 2021

Created PR - https://github.com/garycourt/murmurhash-js/pull/15/files

@wpwoodjr
Copy link

Gary's version is returning the unsigned value, which is the correct value per https://github.com/hajimes/mmh3#how-to-use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants