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

Question on how to set up cracking on java doubles? #45

Open
sonhnguyenn opened this issue Aug 5, 2020 · 1 comment
Open

Question on how to set up cracking on java doubles? #45

sonhnguyenn opened this issue Aug 5, 2020 · 1 comment

Comments

@sonhnguyenn
Copy link

I am wondering how can I set this up to run on a set of floats? In java code is .nextDouble(), which is a float between 0 and 1.

@altf4
Copy link
Owner

altf4 commented Aug 6, 2020

Looks like it wouldn't be too hard to support? Maybe the implementation depends on the actual JRE though. Not sure about that.

http://developer.classpath.org/doc/java/util/Random-source.html

369: public double nextDouble()
370: {
371: return (((long) next(26) << 27) + next(27)) / (double) (1L << 53);
372: }

and you can see that the next(int) function is the same as untwister's Java::next(int)

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