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

random_projection division bug? #9

Closed
Wiijah opened this issue Nov 12, 2017 · 1 comment
Closed

random_projection division bug? #9

Wiijah opened this issue Nov 12, 2017 · 1 comment

Comments

@Wiijah
Copy link

Wiijah commented Nov 12, 2017

In random_projection, the reference solution contains the line
double p=16/n;

where n is an int. This will round to 0 when n > 16, at least on my machine. Hence, the output for this puzzle becomes all 0. Is this correct behaviour?

@m8pple
Copy link
Contributor

m8pple commented Nov 12, 2017

I'm really not doing well this year on the details.

I tweaked this at the last minute in order to change the sparsity, but managed to
remove the .0 off the previous constant. Of course, by that point I'd taken out some
of the logging that checked it is doing something sensible, as otherwise it gives
too many hints about how to attack it.

I'm double-checking now, but I'm pretty sure it should be:

double p=16.0/n;

This should give a sparse projection, but not an all zero one - as you point
out, this results in a completely trivial problem.

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