numerical-analysis

How to find mantissa length on a particular machine?

I'm wanting to find the number of mantissa digits and the unit round-off on a particular computer. I have an understanding of what these are, just no idea how to find them - though I understand they can vary from computer to computer. I need this number in order to perform certain aspects of numerical analysis, like analyzing errors. ...

Best algorithm for avoiding loss of precision?

A recent homework assignment I have received asks us to take expressions which could create a loss of precision when performed in the computer, and alter them so that this loss is avoided. Unfortunately, the directions for doing this haven't been made very clear. From watching various examples being performed, I know that there are cert...

Using Taylor Series to Avoid Loss of Precision

I'm trying to use Taylor series to develop a numerically sound algorithm for solving a function. I've been at it for quite a while, but haven't had any luck yet. I'm not sure what I'm doing wrong. The function is f(x)=1 + x - sin(x)/ln(1+x) x~0 Also: why does loss of precision even occur in this function? when x is close to zero, s...

How to do numerical integration with quantum harmonic oscillator wavefunction?

How to do numerical integration (what numerical method, and what tricks to use) for one-dimensional integration over infinite range, where one or more functions in the integrand are 1d quantum harmonic oscillator wave functions. Among others I want to calculate matrix elements of some function in the harmonic oscillator basis: phin(x...

Signal processing library in Java?

I'd like to compute power spectral density of time series; do some bandpass, lowpass, and highpass filtering; maybe some other basic stuff. Is there a nice open-source Java library to do this? I've hunted a bit without success (e.g., Googling "power spectral density java" or "signal processing java" and clicking through links, looking ...

Minimization of f(x,y) where x and y are integers

Hi I was wondering if anyone had any suggestions for minimizing a function, f(x,y), where x and y are integers. I have researched lots of minimization and optimization techniques, like BFGS and others out of GSL, and things out of Numerical Recipes. So far, I have tried implenting a couple of different schemes. The first works by pick...

Algorithm for multidimensional optimization / root-finding / something

I have five values, A, B, C, D and E. Given the constraint A + B + C + D + E = 1, and five functions F(A), F(B), F(C), F(D), F(E), I need to solve for A through E such that F(A) = F(B) = F(C) = F(D) = F(E). What's the best algorithm/approach to use for this? I don't care if I have to write it myself, I would just like to know where to...

polynomial evaluation accuracy, multiplication versus division

let us say I have have polynomial in x, divided by a power of x: p = (a + x(b + x(c + ..)))/(x**n) efficiency aside, which would be more accurate computation numerically, the above or using division: p = (((a/x + b)/x + c)/x + ...) thanks ...

how do tell if its better to standardize your data matrix first when you do principal component analysis in R ?

Hi guys , Im trying to do principal component analysis in R . There is 2 ways of doing it , I believe. One is doing principal component analysis right away the other way is standardizing the matrix first using s = scale(m)and then apply principal component analysis. How do I tell what result is better ? What values in particular s...

Analyzing noisy data

I recently launched a rocket with a barometric altimeter that is accurate to roughly 10 ft (calculated via data acquired during flight). The recorded data is in time increments of 0.05 sec per sample and a graph of altitude vs. time looks pretty much like it should when zoomed out over the entire flight. The problem is when I try to ca...

Articles on analysis of mixed precision numerical algorithms?

Hi! Many numerical algorithms tend to run on 32/64bit floating points. However, what if you had access to lower precision (and less power hungry) co-processors? How can then be utilized in numerical algorithms? Does anyone know of good books/articles that address these issues? Thanks! ...

Implementation of GNU Scientific Library?

Does anyone know a collection of articles or books that describes the implementation of the GNU Scientific Library? This question is not about using the GSL; it's about how the GSL is implemented, their design decisions / tradeoffs. Thanks! ...

Convergence of BFGS for convex over-parameterized problems

It is "well-known" that the BFGS optimization algorithm is superlinearly convergent for strictly convex problems, but is there any analysis for problems that are non-strictly convex. For example, suppose that f(x) is convex for some scalar x. Then, suppose we optimize over g(x1,x2)=f(x1+x2). Will this still always be superlinearly con...

When to use DBL_EPSILON/epsilon

The DBL_EPSILON/std::numeric_limits::epsilon will give me the smallest value that will make a difference when adding with one. I'm having trouble understanding how to apply this knowledge into something useful. The epsilon is much larger than the smallest value the computer can handle, so It would seem like a correct assumption that it...

Parallelising Cholesky decomposition for use in training a machine learning algorithm

I am trying to work out if I can parallelise the training aspect of a machine learning algorithm. The computationally expensive part of the training involves Cholesky decomposing a positive-definite matrix (covariance matrix). I'll try and frame the question purely in terms of the matrix algebra. Let me know if you need any more info. L...

Most efficient way to find min and max of a sin/cos curve in C#

Background: I have a function in my program that takes a set of points and finds the minimum and maximum on the curve generated by those points. The thing is it is incredibly slow as it uses a while loop to figure out the min/max based on approximated error. Not completely sure what formal method this is because I did not write it myself...

How to compute exact complexity of an algorithm?

Without resorting to asymptotic notation, is tedious step counting the only way to get the time complexity of an algorithm? And without step count of each line of code can we arrive at a big-O representation of any program? Details: trying to find out the complexity of several numerical analysis algorithms to decide which will be best s...

Addition vs Subtraction in loss of significance with floating-points

While learning about precision in floating point arithmetic and different methods to avoid it (using a conjugate, taylor series,...) books frequently mention the subtraction of two very similar numbers or one large and one small number as the biggest cause of error. How come it is only subtraction that causes this and not addition? As I ...

Bounding this program to determine the sum of reciprocal integers not containing zero

Let A denote the set of positive integers whose decimal representation does not contain the digit 0. The sum of the reciprocals of the elements in A is known to be 23.10345. Ex. 1,2,3,4,5,6,7,8,9,11-19,21-29,31-39,41-49,51-59,61-69,71-79,81-89,91-99,111-119, ... Then take the reciprocal of each number, and sum the total. How can this ...

How can prove this function(absolute error)?

hi all. absolute error propagation. prove this e_(x/y=) (¯y e_(x-) ¯x e_y)/¯(y^2 ) ...