Skip to content

Commit

Permalink
Merge eff071f into 2f9a888
Browse files Browse the repository at this point in the history
  • Loading branch information
kullrich committed Dec 18, 2021
2 parents 2f9a888 + eff071f commit 6adcac3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/scrm/random/fastfunc.h
Expand Up @@ -86,7 +86,8 @@ inline double FastFunc::fastexp_lo(double y) {

inline double FastFunc::fastlog(double x) {
const float offset = 2047; // as int64_t: 0x409ffc00000....
double y = x;
double y = 0.0;
y = x;
int64_t* yint = (int64_t*)(&y);
int expon = ((*yint) >> 52) - 1023; // base-2 exponent of float
int index = ((*yint) >> (52-10)) & 1023; // upper 10 bits of mantissa
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-summary-statistics.R
Expand Up @@ -81,7 +81,7 @@ test_that("Frequency spectrum import works", {
expect_is(sum_stats$sfs, "matrix")
expect_equal(nrow(sum_stats$sfs), 5)
expect_equal(ncol(sum_stats$sfs), 6)
for (i in seq_len(sum_stats$sfs)) {
for (i in seq_len(length(sum_stats$seg_sites))) {
expect_equal(sum(sum_stats$sfs[i, ]), ncol(sum_stats$seg_sites[[i]]))
}
})

0 comments on commit 6adcac3

Please sign in to comment.