search for: sumf

Displaying 4 results from an estimated 4 matches for "sumf".

Did you mean: sum
2018 Mar 16
3
Discrepancy: R sum() VS C or Fortran sum
...ome numbers, it is different. The following example, shows what happens: set.seed(12233) n <- 5 a <- runif(n,1,5) e <- runif(n, 5*(1:n),10*(1:n)) s <- runif(1, 1.2, 4) p <- runif(5, 3, 10) x <- c(e[-5], (sum(e*p)-sum(e[-5]*p[-5]))/p[5]) u <- a^(1/s)*x^((s-1)/s) dyn.load("sumF.so") u[1] <- u[1]+.0001 ### If we do not add .0001, all differences are 0 s1 <- sum(u) s2 <- .Fortran("sumf", as.double(u), as.integer(n), sf1=double(1), sf2=double(1))[3:4] s3 <- .C("sumc", as.double(u), as.integer(n), sC=double(1))[[3]] s1-s2...
2018 Mar 16
1
Discrepancy: R sum() VS C or Fortran sum
...t; set.seed(12233) >> n <- 5 >> a <- runif(n,1,5) >> e <- runif(n, 5*(1:n),10*(1:n)) >> s <- runif(1, 1.2, 4) >> p <- runif(5, 3, 10) >> x <- c(e[-5], (sum(e*p)-sum(e[-5]*p[-5]))/p[5]) >> u <- a^(1/s)*x^((s-1)/s) >> dyn.load("sumF.so") >> >> u[1] <- u[1]+.0001 ### If we do not add .0001, all differences are 0 >> s1 <- sum(u) >> s2 <- .Fortran("sumf", as.double(u), as.integer(n), sf1=double(1), >> sf2=double(1))[3:4] >> s3 <- .C("sumc", as....
2018 Mar 16
0
Discrepancy: R sum() VS C or Fortran sum
...ple, shows what happens: > > set.seed(12233) > n <- 5 > a <- runif(n,1,5) > e <- runif(n, 5*(1:n),10*(1:n)) > s <- runif(1, 1.2, 4) > p <- runif(5, 3, 10) > x <- c(e[-5], (sum(e*p)-sum(e[-5]*p[-5]))/p[5]) > u <- a^(1/s)*x^((s-1)/s) > dyn.load("sumF.so") > > u[1] <- u[1]+.0001 ### If we do not add .0001, all differences are 0 > s1 <- sum(u) > s2 <- .Fortran("sumf", as.double(u), as.integer(n), sf1=double(1), > sf2=double(1))[3:4] > s3 <- .C("sumc", as.double(u), as.integer(n)...
2010 Feb 25
1
Help with simple bootstrap test
Hi all Forgive me, I'm a total R newbie, and this seems to be a straightforward simple bootstrap problem, but after a whole day of trying to figure out how to do it I'm ready to give up. Part of the problem is that every example and every help page seems to be about doing something more far more complex. I'm got a table with 40 columns and 750 rows. I sum all the values across the