Displaying 20 results from an estimated 11007 matches for "sums".
Did you mean:
sum
2009 Oct 26
1
[PATCH] Fix miscompile of SSE resampler
From: Thorvald Natvig <slicer at users.sourceforge.net>
Some optimizing compilers miscompile the current SSE optimizations when
full optimizations are enabled. By using output value pointer instead of
a return value, we can bypass this misbehaviour.
---
libspeex/resample.c | 8 ++++----
libspeex/resample_sse.h | 24 ++++++++----------------
2 files changed, 12 insertions(+), 20
2005 Jun 24
1
r programming help II
Dear List,
Suppose we have a variable K.JUN defined as (with
1=wet, 0=dry):
K.JUN1984 = c(1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
K.JUN1985 = c(0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,
1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1)
K.JUN1986 = c(0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1)
2007 Aug 24
1
Speex on ARM7
Hello
I'm testing SPEEX on embedded board using ARM7 (Atmel). ARM7 don't have
floating point so I'm using FIXED_POINT. Unfortunately the encoding speed is
about 5 times slower then necessary for real time.
ARM7 is slow for 16/8 bits operations.
The sequence:
static inline spx_word32_t compute_pitch_error(spx_word16_t *C, spx_word16_t
*g, spx_word16_t pitch_control)
{
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...or very
large files the block count would grow linearly with
file size to outrageous numbers (65536/GB). An iso image
would need over 40,000 blocks and with the fixed sum size of
4+2 bytes had a measurable sum collision rate. With the sum
collisions the file would have to be redone with 4+16 byte
sums killing efficiency. Additionally all those blocks
meant a good deal of processing to find matching blocks and
a sizable memory and network load.
varsumlen2.patch calculates the block size to be a rounded square
root of the file size with a 700byte minimum. In this way
block sizes and counts grow...
2011 Aug 14
3
Not sure how to use aggregate, colSums, by
I have a data frame called test shown below that i would like to summarize in
a particular way :
I want to show the column sums (columns y ,f) grouped by country (column
e1). However, I'm looking for the data to be split according to column e2.
In other words, two tables of sum by country. One table for "con" and one
table for "std" shown in column e2. Finally at the bottom of the two tables,
I would...
2008 Nov 26
1
SSE2 code won't compile in VC
Jean-Marc,
At least VS2005 (what I'm using) won't compile resample_sse.h with
_USE_SSE2 defined because it refuses to cast __m128 to __m128d and vice
versa. While there are intrinsics to do the casts, I thought it would be
simpler to just use an intrinsic that accomplishes the same thing
without all the casting. Thanks,
--John
@@ -91,7 +91,7 @@ static inline double
2003 Dec 30
1
Accuracy: Correct sums in rowSums(), colSums() (PR#6196)
Full_Name: Nick Efthymiou
Version: R1.5.0 and above
OS: Red Hat Linux
Submission from: (NULL) (162.93.14.73)
With the introduction of the functions rowSums(), colSums(), rowMeans() and
colMeans() in R1.5.0, function "SEXP do_colsum(SEXP call, SEXP op, SEXP args,
SEXP rho)" was added to perform the fast summations. We have an excellent
opportunity to improve the accuracy by implementing Kahan summation here.
Kahan summation is described in...
2001 Aug 21
4
looking for a smarter way
I have two problems where I've come up with some code that will do the
analysis that I want, but it looks pretty clumsy. In the first case, I
calculate the variance on five different columns for each of 14 clusters and
get them into one matrix. I get the job done, but I would have thought that
it could be done in one or two lines, not six, and be generalized so that it
didn't matter how
2011 Feb 04
4
aggregate function - na.action
Can someone please tell me what is up with na.action in aggregate?
My (somewhat) reproducible example:
(I say somewhat because some lines wouldn't run in a separate session, more
below)
set.seed(100)
dat=data.frame(
x1=sample(c(NA,'m','f'), 100, replace=TRUE),
x2=sample(c(NA, 1:10), 100, replace=TRUE),
x3=sample(c(NA,letters[1:5]), 100, replace=TRUE),
2007 Oct 18
12
first cut at blockless given/when/then
Hi all,
I committed a first cut at blockless Givens/Whens/Thens to RSpec''s trunk:
cd /path/to/rspec/project
svn up
cd rspec
bin/spec examples/story/calculator.rb
Take a look at examples/story/calculator.rb to see what''s going on.
Needs docs!!!!
Thoughts welcome.
I''ve also got a cut at the plain text parser checked in, but it''s not
hooked up to anything
2018 Mar 16
1
Discrepancy: R sum() VS C or Fortran sum
My simple functions were to compare the result with the gfortran
compiler sum() function. I thought that the Fortran sum could not be
less precise than R. I was wrong. I am impressed. The R sum does in fact
match the result if we use the Kahan algorithm.
P.
I am glad to see that R sum() is more accurate than the gfortran
compiler sum.
On 16/03/18 11:37 AM, luke-tierney at uiowa.edu wrote:
2018 Mar 16
3
Discrepancy: R sum() VS C or Fortran sum
Hi all,
I found a discrepancy between the sum() in R and either a sum done in C
or Fortran for vector of just 5 elements. The difference is very small,
but this is a very small part of a much larger numerical problem in
which first and second derivatives are computed numerically. This is
part of a numerical method course I am teaching in which I want to
compare speeds of R versus Fortran (We
2014 Feb 08
3
[PATCH 1/2] arm: Use the UAL syntax for ldr<cc>h instructions
On Fri, 7 Feb 2014, Timothy B. Terriberry wrote:
> Martin Storsjo wrote:
>> This is required in order to build using the built-in assembler
>> in clang.
>
> These patches break the gcc build (with "Error: bad instruction").
Ah, right, sorry about that.
> Documentation I've seen is contradictory on which order ({cond}{size} or
> {size}{cond}) is correct.
2009 Jun 02
2
reference counting bug: overwriting for loop 'seq' variable
It looks like the 'seq' variable to 'for' can be altered from
within the loop, leading to incorrect answers. E.g., in
the following I'd expect 'sum' to be 1+2=3, but R 2.10.0
(svn 48686) gives 44.5.
> x = c(1,2); sum = 0; for (i in x) { x[i+1] = i + 42.5; sum = sum +
i }; sum
[1] 44.5
or, with a debugging cat()s,
> x = c(1,2); sum = 0; for (i in x) {
2010 Jul 07
2
Sum vectors and numbers
We want to sum many vectors and numbers together as a vector if there is
at least one vector in the arguments.
For example, 1 + c(2,3) = c(3,4).
Since we are not sure arguments to sum, we are using sum function:
sum(v1,v2,...,n1,n2,..).
The problem is that sum returns the sum of all the values present in its
arguments:
sum(1,c(2,3))=6
sum(1,2,3)=6
We do not want to turn sum(v1,v2,...,n1,n2,..) to
2003 Mar 23
1
[RFC] dynamic checksum size
...le at the time.
The two attached patches implement per-file dynamic checksum
lengths.
The dynsumlen patch lays the groundwork. It makes the
checksum length a per-file attribute alongside the block
size. This required a protocol bump and reaching into
almost every routine that touches block checksums. I found
that there was a great deal of code duplication involved
with reading and writing the sum_struct fields. I have
eliminated the duplication by consolidating that transmission
in the new (read|write)_sum_head functions. A added bonus
is that write_sum_head replaces the send_null_sums func...
2010 Jun 24
5
Best way to compute a sum
> a <- 0 ; for(i in (1:200000000)) a <- a + 1/i
> b <- 0 ; for(i in (200000000:1)) b <- b + 1/i
> c <- sum(1/(1:200000000))
> d <- sum(1/(200000000:1))
> order(c(a,b,c,d))
[1] 1 2 4 3
> b<c
[1] TRUE
> c==d
[1] FALSE
I'd expected b being the largest, since we sum up the smallest
numbers first. Instead, c is the largest, which is
2012 Feb 10
2
Discrete Event Simulation problem
Hi All,
I am attempting to simulation an inventory model on R and I am having some
problems. I believe the problem is when I define my demand rate is stays
constant throughout so when I do need to reorder the model does not
recognise it as I have the initial supply arrival time set to infinity at
the start as no order has been played but I have an if statement saying, if
the level falls below a
2012 Sep 20
3
Problem with Newton_Raphson
Hello,
I have being trying to estimate the parameters of the?generalized?exponential distribution. The random number generation for the GE distribution is?x<-(-log(1-U^(1/p1))/b), where U stands for uniform dist. The data i have generated to estimate the parameters is right censored and the code is given below; The problem is that, the newton-Raphson approach isnt working and i do not know what
2014 Jul 03
5
[LLVMdev] Global constructors "get lost" when transforming bitcode files
Hello,
A strange problem appears when upgrading from release_34 to testing. Some
transformations to bitcode files cause registered global_ctors to not be
called. Here's an example (I've also attached the complete example and
pasted it below):
This works:
clang -fsanitize=address -flto -c -o sum.o sum.c
clang -fsanitize=address -o sum sum.o
This doesn't work:
clang