Displaying 3 results from an estimated 3 matches for "rhapson".
2011 Feb 06
5
Help with integrating R and c/c++
Hi,
I have been using R for close to two years now and have grown quite
comfortable with the language. I am presently trying to implement an
optimization routine in R (Newton Rhapson). I have some R functions that
calculate the gradient and hessian (pre requisite matrices) fairly
efficiently. Now, I have to call this function iteratively until some
convergance criterion is reached. I think the standard method of doing this
in most programming languages is a while loop. However,...
2000 Nov 26
5
Another good optimization (for PPC only, though)
...one - B*y0*y0);
/* Now that we have a good estimate of 1/sqrt(x) we need to invert it. We will also approximate this. */
B = y1;
#ifdef __GNUC__
asm("fres %0,%1" : "=f" (y0) : "f" (B));
#else
y0 = __fres(B);
#endif
/* Do a Newton-Rhapson refinement step on the reciprocal estimate */
y1 = y0 + y0*(1.0 - B*y0);
return y1;
}
#else
static inline double _fast_sqrt(double x)
{
return sqrt(x);
}
#endif
-tim
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubsc...
2000 Nov 15
8
Optimisations
Looking through the archives I have seen talk of making CPU specific
optimisations for Vorbis, a la MMX/3DNow!/SSE. The feeling I gather is to
wait until something is working well in C before committing to any kind of
specific optimisation. What if oft used and needed DSP functions were
identified and standardised DSP functionality be written for Vorbis? This
would seperate the basically