learn the programming language for computing functions about integers

Posted by asd on Programmers See other posts from Programmers or by asd
Published on 2011-01-28T07:41:29Z Indexed on 2011/01/28 23:38 UTC
Read the original article Hit count: 318

Filed under:

Hi

I know something about Pascal, Mathematica and Matlab, but I dont have any idea about C,C++,C# languages.

I want to learn one of the languages that they they are fast and exact to compute some arithmetic functions for large numbers(for example larger than $10^3000$). I asked somebody and he said he used C++ and he said I computed this sequence in less than 10 min.

I want to know C, C++, C# and visual kind of theses programs and know which is better for my goal.

Let $f$ be an arithmetic function and A={k1,k2,...,kn} are integers in increasing order.

Now I want to start with k1 and compare f(ki) with f(k1). If f(ki)>f(k1), put ki as k1.

Now start with ki, and compare f(kj) with f(ki), for j>i. If f(kj)>f(ki), put kj as ki, and repeat this procedure.

At the end we will have a sub sequence B={L1,...,Lm} of A by this property: f(L(i+1))>f(L(i)), for any 1<=i<=m-1

I have written a code for this program with Mathematica, and it take some hours to compute f of ki's or the set B for large numbers.

For example, let f is the divisor function of integers. Do you know how to write the code for my purpose in Mathematica or Matlab. Mathematica is preferable.

© Programmers or respective owner

Related posts about programming-languages