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

Numeric precision problems #30

Open
llrs opened this issue Dec 12, 2019 · 1 comment
Open

Numeric precision problems #30

llrs opened this issue Dec 12, 2019 · 1 comment

Comments

@llrs
Copy link
Member

llrs commented Dec 12, 2019

Related to *_size being slow and related to #29 (which aims to reduce the time of calculation) of the set size.

Using this function we can calculate the number of combinations:

combn_pos <- function(x) {
    y0 <- seq(from = 0, to = x, by = 1)
    y <- choose(x, y0)
    names(y) <- as.character(y0)
    y
}
y <- combn_pos(1030)
y[!is.infinite(y)]

Up to 499 elements out of 1030 it is possible to calculate the number of combinations. Or y3 <- combn_pos(1029) and we don't have Inf and we can calculate the combinations for up to 514 elements. More than this is only Inf.

@llrs
Copy link
Member Author

llrs commented Dec 12, 2019

Also multiplying 729 numbers between 0 and 1 seems to make the result 0 (the opposite case than the issue above). It seems that we can arrive to the floating precision problems quickly with this method

@llrs llrs changed the title Search space Numeric precision problems Sep 17, 2020
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

1 participant